[0m11:25:30.855864 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002100B74D460>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002100B714B90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002100B874710>]}


============================== 11:25:30.889927 | 9958a47b-cc76-4713-9ff8-e623cbd36525 ==============================
[0m11:25:30.889927 [info ] [MainThread]: Running with dbt=1.11.5
[0m11:25:30.890933 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'None', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt debug', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m11:25:30.992487 [info ] [MainThread]: dbt version: 1.11.5
[0m11:25:30.992487 [info ] [MainThread]: python version: 3.12.12
[0m11:25:30.993508 [info ] [MainThread]: python path: C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\.venv\Scripts\python.exe
[0m11:25:30.993508 [info ] [MainThread]: os info: Windows-11-10.0.26200-SP0
[0m11:25:31.149624 [info ] [MainThread]: Using profiles dir at C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics
[0m11:25:31.150343 [info ] [MainThread]: Using profiles.yml file at C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\profiles.yml
[0m11:25:31.151357 [info ] [MainThread]: Using dbt_project.yml file at C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\dbt_project.yml
[0m11:25:31.155380 [info ] [MainThread]: adapter type: duckdb
[0m11:25:31.155886 [info ] [MainThread]: adapter version: 1.10.0
[0m11:25:31.248836 [info ] [MainThread]: Configuration:
[0m11:25:31.250333 [info ] [MainThread]:   profiles.yml file [[32mOK found and valid[0m]
[0m11:25:31.250333 [info ] [MainThread]:   dbt_project.yml file [[32mOK found and valid[0m]
[0m11:25:31.251340 [info ] [MainThread]: Required dependencies:
[0m11:25:31.251959 [debug] [MainThread]: Executing "git --help"
[0m11:25:31.316308 [debug] [MainThread]: STDOUT: "b"usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]\n           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-lazy-fetch]\n           [--no-optional-locks] [--no-advice] [--bare] [--git-dir=<path>]\n           [--work-tree=<path>] [--namespace=<name>] [--config-env=<name>=<envvar>]\n           <command> [<args>]\n\nThese are common Git commands used in various situations:\n\nstart a working area (see also: git help tutorial)\n   clone      Clone a repository into a new directory\n   init       Create an empty Git repository or reinitialize an existing one\n\nwork on the current change (see also: git help everyday)\n   add        Add file contents to the index\n   mv         Move or rename a file, a directory, or a symlink\n   restore    Restore working tree files\n   rm         Remove files from the working tree and from the index\n\nexamine the history and state (see also: git help revisions)\n   bisect     Use binary search to find the commit that introduced a bug\n   diff       Show changes between commits, commit and working tree, etc\n   grep       Print lines matching a pattern\n   log        Show commit logs\n   show       Show various types of objects\n   status     Show the working tree status\n\ngrow, mark and tweak your common history\n   backfill   Download missing objects in a partial clone\n   branch     List, create, or delete branches\n   commit     Record changes to the repository\n   merge      Join two or more development histories together\n   rebase     Reapply commits on top of another base tip\n   reset      Reset current HEAD to the specified state\n   switch     Switch branches\n   tag        Create, list, delete or verify tags\n\ncollaborate (see also: git help workflows)\n   fetch      Download objects and refs from another repository\n   pull       Fetch from and integrate with another repository or a local branch\n   push       Update remote refs along with associated objects\n\n'git help -a' and 'git help -g' list available subcommands and some\nconcept guides. See 'git help <command>' or 'git help <concept>'\nto read about a specific subcommand or concept.\nSee 'git help git' for an overview of the system.\n""
[0m11:25:31.317005 [debug] [MainThread]: STDERR: "b''"
[0m11:25:31.317005 [info ] [MainThread]:  - git [[32mOK found[0m]

[0m11:25:31.318035 [info ] [MainThread]: Connection:
[0m11:25:31.319200 [info ] [MainThread]:   database: gold_warehouse
[0m11:25:31.319200 [info ] [MainThread]:   schema: main
[0m11:25:31.320711 [info ] [MainThread]:   path: c:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\data\gold_warehouse.duckdb
[0m11:25:31.320711 [info ] [MainThread]:   config_options: None
[0m11:25:31.320711 [info ] [MainThread]:   extensions: ['httpfs', 'parquet']
[0m11:25:31.320711 [info ] [MainThread]:   settings: {}
[0m11:25:31.322421 [info ] [MainThread]:   external_root: .
[0m11:25:31.322421 [info ] [MainThread]:   use_credential_provider: None
[0m11:25:31.322421 [info ] [MainThread]:   attach: [{'path': 'c:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\data\\bronze_warehouse.duckdb', 'type': None, 'alias': 'bronze', 'secret': None, 'read_only': False, 'options': None, 'is_ducklake': None}]
[0m11:25:31.322421 [info ] [MainThread]:   filesystems: None
[0m11:25:31.323969 [info ] [MainThread]:   remote: None
[0m11:25:31.323969 [info ] [MainThread]:   plugins: None
[0m11:25:31.323969 [info ] [MainThread]:   disable_transactions: False
[0m11:25:31.323969 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m11:25:31.576882 [debug] [MainThread]: Acquiring new duckdb connection 'debug'
[0m11:25:37.242537 [debug] [MainThread]: Using duckdb connection "debug"
[0m11:25:37.244331 [debug] [MainThread]: On debug: select 1 as id
[0m11:25:37.244331 [debug] [MainThread]: Opening a new connection, currently in state init
[0m11:25:39.294809 [debug] [MainThread]: SQL status: OK in 2.050 seconds
[0m11:25:39.295843 [debug] [MainThread]: On debug: Close
[0m11:25:39.295843 [info ] [MainThread]:   Connection test: [[32mOK connection ok[0m]

[0m11:25:39.296965 [info ] [MainThread]: [32mAll checks passed![0m
[0m11:25:39.298074 [debug] [MainThread]: Command `dbt debug` succeeded at 11:25:39.296965 after 8.68 seconds
[0m11:25:39.298074 [debug] [MainThread]: Connection 'debug' was properly closed.
[0m11:25:39.298074 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002100DF7DD00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002100E023F80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002100C1C3620>]}
[0m11:25:39.298074 [debug] [MainThread]: Flushing usage events
[0m11:25:40.101779 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m11:28:23.374373 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002327DF0C7A0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002327DF0C890>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002327D761F40>]}


============================== 11:28:23.381077 | b57c52c1-2082-4ab8-965a-9eb02e92bce3 ==============================
[0m11:28:23.381077 [info ] [MainThread]: Running with dbt=1.11.5
[0m11:28:23.382220 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt debug', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m11:28:23.401798 [info ] [MainThread]: dbt version: 1.11.5
[0m11:28:23.401798 [info ] [MainThread]: python version: 3.12.12
[0m11:28:23.402802 [info ] [MainThread]: python path: C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\.venv\Scripts\python.exe
[0m11:28:23.402802 [info ] [MainThread]: os info: Windows-11-10.0.26200-SP0
[0m11:28:23.508189 [info ] [MainThread]: Using profiles dir at C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics
[0m11:28:23.509331 [info ] [MainThread]: Using profiles.yml file at C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\profiles.yml
[0m11:28:23.510525 [info ] [MainThread]: Using dbt_project.yml file at C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\dbt_project.yml
[0m11:28:23.515191 [info ] [MainThread]: adapter type: duckdb
[0m11:28:23.516856 [info ] [MainThread]: adapter version: 1.10.0
[0m11:28:23.596581 [info ] [MainThread]: Configuration:
[0m11:28:23.597587 [info ] [MainThread]:   profiles.yml file [[32mOK found and valid[0m]
[0m11:28:23.597587 [info ] [MainThread]:   dbt_project.yml file [[32mOK found and valid[0m]
[0m11:28:23.598585 [info ] [MainThread]: Required dependencies:
[0m11:28:23.598585 [debug] [MainThread]: Executing "git --help"
[0m11:28:23.634327 [debug] [MainThread]: STDOUT: "b"usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]\n           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-lazy-fetch]\n           [--no-optional-locks] [--no-advice] [--bare] [--git-dir=<path>]\n           [--work-tree=<path>] [--namespace=<name>] [--config-env=<name>=<envvar>]\n           <command> [<args>]\n\nThese are common Git commands used in various situations:\n\nstart a working area (see also: git help tutorial)\n   clone      Clone a repository into a new directory\n   init       Create an empty Git repository or reinitialize an existing one\n\nwork on the current change (see also: git help everyday)\n   add        Add file contents to the index\n   mv         Move or rename a file, a directory, or a symlink\n   restore    Restore working tree files\n   rm         Remove files from the working tree and from the index\n\nexamine the history and state (see also: git help revisions)\n   bisect     Use binary search to find the commit that introduced a bug\n   diff       Show changes between commits, commit and working tree, etc\n   grep       Print lines matching a pattern\n   log        Show commit logs\n   show       Show various types of objects\n   status     Show the working tree status\n\ngrow, mark and tweak your common history\n   backfill   Download missing objects in a partial clone\n   branch     List, create, or delete branches\n   commit     Record changes to the repository\n   merge      Join two or more development histories together\n   rebase     Reapply commits on top of another base tip\n   reset      Reset current HEAD to the specified state\n   switch     Switch branches\n   tag        Create, list, delete or verify tags\n\ncollaborate (see also: git help workflows)\n   fetch      Download objects and refs from another repository\n   pull       Fetch from and integrate with another repository or a local branch\n   push       Update remote refs along with associated objects\n\n'git help -a' and 'git help -g' list available subcommands and some\nconcept guides. See 'git help <command>' or 'git help <concept>'\nto read about a specific subcommand or concept.\nSee 'git help git' for an overview of the system.\n""
[0m11:28:23.634863 [debug] [MainThread]: STDERR: "b''"
[0m11:28:23.634863 [info ] [MainThread]:  - git [[32mOK found[0m]

[0m11:28:23.635543 [info ] [MainThread]: Connection:
[0m11:28:23.636559 [info ] [MainThread]:   database: gold_warehouse
[0m11:28:23.636559 [info ] [MainThread]:   schema: main
[0m11:28:23.638070 [info ] [MainThread]:   path: c:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\data\gold_warehouse.duckdb
[0m11:28:23.638070 [info ] [MainThread]:   config_options: None
[0m11:28:23.638070 [info ] [MainThread]:   extensions: ['httpfs', 'parquet']
[0m11:28:23.639075 [info ] [MainThread]:   settings: {}
[0m11:28:23.639075 [info ] [MainThread]:   external_root: .
[0m11:28:23.640085 [info ] [MainThread]:   use_credential_provider: None
[0m11:28:23.640085 [info ] [MainThread]:   attach: [{'path': 'c:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\data\\bronze_warehouse.duckdb', 'type': None, 'alias': 'bronze', 'secret': None, 'read_only': False, 'options': None, 'is_ducklake': None}]
[0m11:28:23.640085 [info ] [MainThread]:   filesystems: None
[0m11:28:23.641078 [info ] [MainThread]:   remote: None
[0m11:28:23.641078 [info ] [MainThread]:   plugins: None
[0m11:28:23.642080 [info ] [MainThread]:   disable_transactions: False
[0m11:28:23.642080 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m11:28:23.843079 [debug] [MainThread]: Acquiring new duckdb connection 'debug'
[0m11:28:23.902897 [debug] [MainThread]: Using duckdb connection "debug"
[0m11:28:23.902897 [debug] [MainThread]: On debug: select 1 as id
[0m11:28:23.902897 [debug] [MainThread]: Opening a new connection, currently in state init
[0m11:28:24.043849 [debug] [MainThread]: SQL status: OK in 0.141 seconds
[0m11:28:24.044861 [debug] [MainThread]: On debug: Close
[0m11:28:24.044861 [info ] [MainThread]:   Connection test: [[32mOK connection ok[0m]

[0m11:28:24.045879 [info ] [MainThread]: [32mAll checks passed![0m
[0m11:28:24.047058 [debug] [MainThread]: Command `dbt debug` succeeded at 11:28:24.047058 after 1.06 seconds
[0m11:28:24.047058 [debug] [MainThread]: Connection 'debug' was properly closed.
[0m11:28:24.047058 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002327F9096D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002327D785B80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002327D785F40>]}
[0m11:28:24.048070 [debug] [MainThread]: Flushing usage events
[0m11:28:24.722969 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m11:28:48.670738 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B2350872F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B2329CEDE0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B2329CF6B0>]}


============================== 11:28:48.673885 | 2ce233bf-3018-44cd-a728-cd8802f9450b ==============================
[0m11:28:48.673885 [info ] [MainThread]: Running with dbt=1.11.5
[0m11:28:48.675449 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m11:28:48.874148 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '2ce233bf-3018-44cd-a728-cd8802f9450b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B23695F6B0>]}
[0m11:28:48.921107 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '2ce233bf-3018-44cd-a728-cd8802f9450b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B2369184D0>]}
[0m11:28:48.923218 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m11:28:49.121931 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m11:28:49.121931 [info ] [MainThread]: Unable to do partial parsing because saved manifest not found. Starting full parse.
[0m11:28:49.123395 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '2ce233bf-3018-44cd-a728-cd8802f9450b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B23695F380>]}
[0m11:28:50.013710 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m11:28:50.020471 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '2ce233bf-3018-44cd-a728-cd8802f9450b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B236F37680>]}
[0m11:28:50.073426 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m11:28:50.076232 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m11:28:50.246647 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '2ce233bf-3018-44cd-a728-cd8802f9450b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B2370BE090>]}
[0m11:28:50.246647 [info ] [MainThread]: Found 3 models, 18 sources, 472 macros
[0m11:28:50.248652 [info ] [MainThread]: 
[0m11:28:50.249653 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m11:28:50.250158 [info ] [MainThread]: 
[0m11:28:50.250684 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m11:28:50.254284 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m11:28:50.324397 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m11:28:50.324397 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m11:28:50.324397 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m11:28:50.448622 [debug] [ThreadPool]: SQL status: OK in 0.124 seconds
[0m11:28:50.450129 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m11:28:50.450129 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main_main)
[0m11:28:50.451134 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main_main"
"
[0m11:28:50.455895 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:28:50.455895 [debug] [ThreadPool]: On create_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m11:28:50.455895 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m11:28:50.458157 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m11:28:50.458761 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:28:50.458761 [debug] [ThreadPool]: On create_gold_warehouse_main_main: BEGIN
[0m11:28:50.459767 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:28:50.459767 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:28:50.459767 [debug] [ThreadPool]: On create_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main_main"} */

    
    
        create schema if not exists "gold_warehouse"."main_main"
    
[0m11:28:50.460767 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:28:50.461769 [debug] [ThreadPool]: On create_gold_warehouse_main_main: COMMIT
[0m11:28:50.461769 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:28:50.462275 [debug] [ThreadPool]: On create_gold_warehouse_main_main: COMMIT
[0m11:28:50.463854 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m11:28:50.463854 [debug] [ThreadPool]: On create_gold_warehouse_main_main: Close
[0m11:28:50.464406 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main_main'
[0m11:28:50.470635 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main_main"
[0m11:28:50.470635 [debug] [ThreadPool]: On list_gold_warehouse_main_main: BEGIN
[0m11:28:50.471219 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m11:28:50.471219 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:28:50.471219 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main_main"
[0m11:28:50.471219 [debug] [ThreadPool]: On list_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main_main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m11:28:50.485026 [debug] [ThreadPool]: SQL status: OK in 0.013 seconds
[0m11:28:50.486057 [debug] [ThreadPool]: On list_gold_warehouse_main_main: ROLLBACK
[0m11:28:50.487583 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main_main'
[0m11:28:50.487583 [debug] [ThreadPool]: On list_gold_warehouse_main_main: Close
[0m11:28:50.487583 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '2ce233bf-3018-44cd-a728-cd8802f9450b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B236B02E40>]}
[0m11:28:50.488596 [debug] [MainThread]: Using duckdb connection "master"
[0m11:28:50.489148 [debug] [MainThread]: On master: BEGIN
[0m11:28:50.489148 [debug] [MainThread]: Opening a new connection, currently in state init
[0m11:28:50.489148 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:28:50.489148 [debug] [MainThread]: On master: COMMIT
[0m11:28:50.490177 [debug] [MainThread]: Using duckdb connection "master"
[0m11:28:50.490177 [debug] [MainThread]: On master: COMMIT
[0m11:28:50.490177 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:28:50.490177 [debug] [MainThread]: On master: Close
[0m11:28:50.555930 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m11:28:50.557552 [info ] [Thread-1 (]: 1 of 3 START sql table model main_main.dim_instituicao ......................... [RUN]
[0m11:28:50.558262 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m11:28:50.558796 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m11:28:50.565905 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:28:50.567978 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m11:28:50.601532 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:28:50.609458 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:28:50.610475 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m11:28:50.611487 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m11:28:50.612203 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:28:50.613928 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:28:50.614939 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_financial_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_financial_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Instituição Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."independent_institutions_financial_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m11:28:50.630264 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_financial_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_financial_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Instituição Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."independent_institutions_financial_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m11:28:50.630773 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m11:28:50.632298 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: ROLLBACK
[0m11:28:50.683736 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_instituicao'
[0m11:28:50.684244 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m11:28:50.689055 [debug] [Thread-1 (]: Runtime Error in model dim_instituicao (models\gold\dim_instituicao.sql)
  Catalog Error: Table with name prudential_conglomerates_financial_summary does not exist!
  Did you mean "prudential_conglomerates_summary"?
  
  LINE 22:     FROM "bronze"."main"."prudential_conglomerates_financial_summary...
                    ^
[0m11:28:50.696473 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '2ce233bf-3018-44cd-a728-cd8802f9450b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B236FC7020>]}
[0m11:28:50.697490 [error] [Thread-1 (]: 1 of 3 ERROR creating sql table model main_main.dim_instituicao ................ [[31mERROR[0m in 0.13s]
[0m11:28:50.701152 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m11:28:50.701744 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m11:28:50.702752 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_instituicao' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_instituicao (models\gold\dim_instituicao.sql)
  Catalog Error: Table with name prudential_conglomerates_financial_summary does not exist!
  Did you mean "prudential_conglomerates_summary"?
  
  LINE 22:     FROM "bronze"."main"."prudential_conglomerates_financial_summary...
                    ^.
[0m11:28:50.704262 [info ] [Thread-1 (]: 2 of 3 START sql table model main_main.dim_tempo ............................... [RUN]
[0m11:28:50.705779 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m11:28:50.705779 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m11:28:50.712156 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m11:28:50.714778 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m11:28:50.719001 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m11:28:50.721227 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:28:50.722245 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m11:28:50.722245 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m11:28:50.724039 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:28:50.724039 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:28:50.725801 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_financial_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_financial_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."independent_institutions_financial_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m11:28:50.727330 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_financial_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_financial_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."independent_institutions_financial_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m11:28:50.729048 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m11:28:50.729793 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: ROLLBACK
[0m11:28:50.733484 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_tempo'
[0m11:28:50.734498 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m11:28:50.739029 [debug] [Thread-1 (]: Runtime Error in model dim_tempo (models\gold\dim_tempo.sql)
  Catalog Error: Table with name prudential_conglomerates_financial_summary does not exist!
  Did you mean "prudential_conglomerates_summary"?
  
  LINE 15:     FROM "bronze"."main"."prudential_conglomerates_financial_summary...
                    ^
[0m11:28:50.739669 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '2ce233bf-3018-44cd-a728-cd8802f9450b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B236F830E0>]}
[0m11:28:50.740683 [error] [Thread-1 (]: 2 of 3 ERROR creating sql table model main_main.dim_tempo ...................... [[31mERROR[0m in 0.03s]
[0m11:28:50.741680 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m11:28:50.743198 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:28:50.744208 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_tempo' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_tempo (models\gold\dim_tempo.sql)
  Catalog Error: Table with name prudential_conglomerates_financial_summary does not exist!
  Did you mean "prudential_conglomerates_summary"?
  
  LINE 15:     FROM "bronze"."main"."prudential_conglomerates_financial_summary...
                    ^.
[0m11:28:50.745080 [info ] [Thread-1 (]: 3 of 3 START sql table model main_main.fato_resumo_financeiro .................. [RUN]
[0m11:28:50.745427 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m11:28:50.746435 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:28:50.750365 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:28:50.751944 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:28:50.755487 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:28:50.756099 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:28:50.757766 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m11:28:50.757766 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m11:28:50.758773 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:28:50.759272 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:28:50.759272 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_financial_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_financial_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."independent_institutions_financial_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m11:28:50.760106 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_financial_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_financial_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."independent_institutions_financial_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m11:28:50.761109 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m11:28:50.761109 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: ROLLBACK
[0m11:28:50.764250 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_resumo_financeiro'
[0m11:28:50.764250 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m11:28:50.766861 [debug] [Thread-1 (]: Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Catalog Error: Table with name prudential_conglomerates_financial_summary does not exist!
  Did you mean "prudential_conglomerates_summary"?
  
  LINE 16:     FROM "bronze"."main"."prudential_conglomerates_financial_summary...
                    ^
[0m11:28:50.767370 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '2ce233bf-3018-44cd-a728-cd8802f9450b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B2370F5FA0>]}
[0m11:28:50.768026 [error] [Thread-1 (]: 3 of 3 ERROR creating sql table model main_main.fato_resumo_financeiro ......... [[31mERROR[0m in 0.02s]
[0m11:28:50.768026 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:28:50.769036 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_resumo_financeiro' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Catalog Error: Table with name prudential_conglomerates_financial_summary does not exist!
  Did you mean "prudential_conglomerates_summary"?
  
  LINE 16:     FROM "bronze"."main"."prudential_conglomerates_financial_summary...
                    ^.
[0m11:28:50.770544 [debug] [MainThread]: Using duckdb connection "master"
[0m11:28:50.771125 [debug] [MainThread]: On master: BEGIN
[0m11:28:50.771125 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m11:28:50.772131 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m11:28:50.773304 [debug] [MainThread]: On master: COMMIT
[0m11:28:50.773304 [debug] [MainThread]: Using duckdb connection "master"
[0m11:28:50.773304 [debug] [MainThread]: On master: COMMIT
[0m11:28:50.774304 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:28:50.774304 [debug] [MainThread]: On master: Close
[0m11:28:50.774304 [debug] [MainThread]: Connection 'master' was properly closed.
[0m11:28:50.775892 [debug] [MainThread]: Connection 'create_gold_warehouse_main_main' was properly closed.
[0m11:28:50.775892 [debug] [MainThread]: Connection 'list_gold_warehouse_main_main' was properly closed.
[0m11:28:50.775892 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_resumo_financeiro' was properly closed.
[0m11:28:50.776907 [info ] [MainThread]: 
[0m11:28:50.777411 [info ] [MainThread]: Finished running 3 table models in 0 hours 0 minutes and 0.53 seconds (0.53s).
[0m11:28:50.778416 [debug] [MainThread]: Command end result
[0m11:28:50.801397 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m11:28:50.804197 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m11:28:50.810079 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m11:28:50.810079 [info ] [MainThread]: 
[0m11:28:50.810079 [info ] [MainThread]: [31mCompleted with 3 errors, 0 partial successes, and 0 warnings:[0m
[0m11:28:50.810079 [info ] [MainThread]: 
[0m11:28:50.811585 [error] [MainThread]: [31mFailure in model dim_instituicao (models\gold\dim_instituicao.sql)[0m
[0m11:28:50.812161 [error] [MainThread]:   Runtime Error in model dim_instituicao (models\gold\dim_instituicao.sql)
  Catalog Error: Table with name prudential_conglomerates_financial_summary does not exist!
  Did you mean "prudential_conglomerates_summary"?
  
  LINE 22:     FROM "bronze"."main"."prudential_conglomerates_financial_summary...
                    ^
[0m11:28:50.812161 [info ] [MainThread]: 
[0m11:28:50.813171 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_instituicao.sql
[0m11:28:50.813837 [info ] [MainThread]: 
[0m11:28:50.814353 [error] [MainThread]: [31mFailure in model dim_tempo (models\gold\dim_tempo.sql)[0m
[0m11:28:50.815365 [error] [MainThread]:   Runtime Error in model dim_tempo (models\gold\dim_tempo.sql)
  Catalog Error: Table with name prudential_conglomerates_financial_summary does not exist!
  Did you mean "prudential_conglomerates_summary"?
  
  LINE 15:     FROM "bronze"."main"."prudential_conglomerates_financial_summary...
                    ^
[0m11:28:50.815879 [info ] [MainThread]: 
[0m11:28:50.815879 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_tempo.sql
[0m11:28:50.817441 [info ] [MainThread]: 
[0m11:28:50.818028 [error] [MainThread]: [31mFailure in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)[0m
[0m11:28:50.818028 [error] [MainThread]:   Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Catalog Error: Table with name prudential_conglomerates_financial_summary does not exist!
  Did you mean "prudential_conglomerates_summary"?
  
  LINE 16:     FROM "bronze"."main"."prudential_conglomerates_financial_summary...
                    ^
[0m11:28:50.819036 [info ] [MainThread]: 
[0m11:28:50.819036 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_resumo_financeiro.sql
[0m11:28:50.820548 [info ] [MainThread]: 
[0m11:28:50.821140 [info ] [MainThread]: Done. PASS=0 WARN=0 ERROR=3 SKIP=0 NO-OP=0 TOTAL=3
[0m11:28:50.822151 [debug] [MainThread]: Command `dbt build` failed at 11:28:50.822151 after 2.28 seconds
[0m11:28:50.822661 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B23520E3F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B235521C40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001B235523080>]}
[0m11:28:50.822661 [debug] [MainThread]: Flushing usage events
[0m11:28:51.522611 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m11:29:11.406029 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CA504CA060>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CA504C8380>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CA504F6D50>]}


============================== 11:29:11.412150 | 700d3f1c-16e8-4b49-886c-80937c7f9bb8 ==============================
[0m11:29:11.412150 [info ] [MainThread]: Running with dbt=1.11.5
[0m11:29:11.412150 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'invocation_command': 'dbt run-operation generate_source --args {"schema_name": "main", "database_name": "bronze"}', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m11:29:11.618796 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '700d3f1c-16e8-4b49-886c-80937c7f9bb8', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CA50D465D0>]}
[0m11:29:11.683284 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '700d3f1c-16e8-4b49-886c-80937c7f9bb8', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CA4A51EF60>]}
[0m11:29:11.685458 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m11:29:11.905652 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m11:29:11.996500 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m11:29:11.996500 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m11:29:11.996500 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m11:29:12.001333 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m11:29:12.020494 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '700d3f1c-16e8-4b49-886c-80937c7f9bb8', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CA522A1BE0>]}
[0m11:29:12.069139 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m11:29:12.070666 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m11:29:12.093895 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '700d3f1c-16e8-4b49-886c-80937c7f9bb8', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CA5237E5A0>]}
[0m11:29:12.093895 [info ] [MainThread]: Found 3 models, 18 sources, 472 macros
[0m11:29:12.094813 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '700d3f1c-16e8-4b49-886c-80937c7f9bb8', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CA524692B0>]}
[0m11:29:12.094813 [debug] [MainThread]: Acquiring new duckdb connection 'macro_generate_source'
[0m11:29:12.095331 [debug] [MainThread]: Using duckdb connection "macro_generate_source"
[0m11:29:12.095331 [debug] [MainThread]: On macro_generate_source: BEGIN
[0m11:29:12.095912 [debug] [MainThread]: Opening a new connection, currently in state init
[0m11:29:12.212255 [debug] [MainThread]: SQL status: OK in 0.117 seconds
[0m11:29:12.212255 [debug] [MainThread]: On macro_generate_source: COMMIT
[0m11:29:12.213265 [debug] [MainThread]: Using duckdb connection "macro_generate_source"
[0m11:29:12.213265 [debug] [MainThread]: On macro_generate_source: COMMIT
[0m11:29:12.213265 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:29:12.213859 [debug] [MainThread]: On macro_generate_source: Close
[0m11:29:12.214421 [error] [MainThread]: Encountered an error while running operation: Runtime Error
  dbt could not find a macro with the name "generate_source" in any package
[0m11:29:12.214421 [debug] [MainThread]: Traceback (most recent call last):
  File "C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\.venv\Lib\site-packages\dbt\task\run_operation.py", line 64, in run
    self._run_unsafe(package_name, macro_name)
  File "C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\.venv\Lib\site-packages\dbt\task\run_operation.py", line 45, in _run_unsafe
    res = adapter.execute_macro(
          ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\.venv\Lib\site-packages\dbt\adapters\base\impl.py", line 1304, in execute_macro
    raise DbtRuntimeError(
dbt_common.exceptions.base.DbtRuntimeError: Runtime Error
  dbt could not find a macro with the name "generate_source" in any package

[0m11:29:12.214421 [error] [MainThread]: Encountered an error:
Compilation Error
  dbt could not find a macro with the name 'generate_source' in any package. This can happen when calling a macro that does not exist. Check for typos and/or install package dependencies with "dbt deps".
[0m11:29:12.216588 [debug] [MainThread]: Command `dbt run-operation` failed at 11:29:12.216588 after 0.93 seconds
[0m11:29:12.217118 [debug] [MainThread]: Connection 'macro_generate_source' was properly closed.
[0m11:29:12.217118 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CA5052D3A0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CA523B3440>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CA5237F9B0>]}
[0m11:29:12.217672 [debug] [MainThread]: Flushing usage events
[0m11:29:12.874481 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m11:30:37.949486 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFDA05F920>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFD97F34D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFD9CC9130>]}


============================== 11:30:37.954096 | afcae948-95e0-4d50-ad17-906ef6734710 ==============================
[0m11:30:37.954096 [info ] [MainThread]: Running with dbt=1.11.5
[0m11:30:37.955608 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'invocation_command': 'dbt build', 'use_colors': 'True', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m11:30:38.154030 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'afcae948-95e0-4d50-ad17-906ef6734710', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFD9CCB5C0>]}
[0m11:30:38.201803 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'afcae948-95e0-4d50-ad17-906ef6734710', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFDB745460>]}
[0m11:30:38.204341 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m11:30:38.466867 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m11:30:38.579565 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 4 files changed.
[0m11:30:38.579565 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\bronze\sources.yml
[0m11:30:38.581183 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_resumo_financeiro.sql
[0m11:30:38.581183 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\dim_tempo.sql
[0m11:30:38.581183 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\dim_instituicao.sql
[0m11:30:38.899935 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m11:30:38.908884 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'afcae948-95e0-4d50-ad17-906ef6734710', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFDBD8C5C0>]}
[0m11:30:38.961535 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m11:30:38.963794 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m11:30:39.060493 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'afcae948-95e0-4d50-ad17-906ef6734710', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFDBC84080>]}
[0m11:30:39.060493 [info ] [MainThread]: Found 3 models, 18 sources, 472 macros
[0m11:30:39.062729 [info ] [MainThread]: 
[0m11:30:39.063290 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m11:30:39.063941 [info ] [MainThread]: 
[0m11:30:39.063941 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m11:30:39.069609 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m11:30:39.142541 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m11:30:39.143045 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m11:30:39.143045 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m11:30:39.266998 [debug] [ThreadPool]: SQL status: OK in 0.124 seconds
[0m11:30:39.268999 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m11:30:39.268999 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main_main)
[0m11:30:39.270511 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main_main"
"
[0m11:30:39.278453 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:30:39.278957 [debug] [ThreadPool]: On create_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m11:30:39.279968 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m11:30:39.281478 [debug] [ThreadPool]: SQL status: OK in 0.002 seconds
[0m11:30:39.283088 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:30:39.284099 [debug] [ThreadPool]: On create_gold_warehouse_main_main: BEGIN
[0m11:30:39.284608 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:30:39.285619 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:30:39.286298 [debug] [ThreadPool]: On create_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main_main"} */

    
    
        create schema if not exists "gold_warehouse"."main_main"
    
[0m11:30:39.287305 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:30:39.288826 [debug] [ThreadPool]: On create_gold_warehouse_main_main: COMMIT
[0m11:30:39.289398 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:30:39.289398 [debug] [ThreadPool]: On create_gold_warehouse_main_main: COMMIT
[0m11:30:39.290408 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:30:39.291408 [debug] [ThreadPool]: On create_gold_warehouse_main_main: Close
[0m11:30:39.292406 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main_main'
[0m11:30:39.301126 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main_main"
[0m11:30:39.301636 [debug] [ThreadPool]: On list_gold_warehouse_main_main: BEGIN
[0m11:30:39.302154 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m11:30:39.305313 [debug] [ThreadPool]: SQL status: OK in 0.003 seconds
[0m11:30:39.305313 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main_main"
[0m11:30:39.305908 [debug] [ThreadPool]: On list_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main_main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m11:30:39.317106 [debug] [ThreadPool]: SQL status: OK in 0.011 seconds
[0m11:30:39.317734 [debug] [ThreadPool]: On list_gold_warehouse_main_main: ROLLBACK
[0m11:30:39.318773 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main_main'
[0m11:30:39.318773 [debug] [ThreadPool]: On list_gold_warehouse_main_main: Close
[0m11:30:39.318773 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'afcae948-95e0-4d50-ad17-906ef6734710', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFD713A8D0>]}
[0m11:30:39.320282 [debug] [MainThread]: Using duckdb connection "master"
[0m11:30:39.320282 [debug] [MainThread]: On master: BEGIN
[0m11:30:39.320841 [debug] [MainThread]: Opening a new connection, currently in state init
[0m11:30:39.320841 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:30:39.320841 [debug] [MainThread]: On master: COMMIT
[0m11:30:39.320841 [debug] [MainThread]: Using duckdb connection "master"
[0m11:30:39.321852 [debug] [MainThread]: On master: COMMIT
[0m11:30:39.321852 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:30:39.321852 [debug] [MainThread]: On master: Close
[0m11:30:39.325846 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m11:30:39.325846 [info ] [Thread-1 (]: 1 of 3 START sql table model main_main.dim_instituicao ......................... [RUN]
[0m11:30:39.327361 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m11:30:39.327361 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m11:30:39.333944 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:30:39.334976 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m11:30:39.364758 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:30:39.364758 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:30:39.366279 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m11:30:39.366279 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m11:30:39.366954 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:30:39.366954 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:30:39.366954 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Instituição Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."independent_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m11:30:39.368087 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Instituição Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."independent_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m11:30:39.369360 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m11:30:39.369360 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: ROLLBACK
[0m11:30:39.372964 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_instituicao'
[0m11:30:39.373993 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m11:30:39.375584 [debug] [Thread-1 (]: Runtime Error in model dim_instituicao (models\gold\dim_instituicao.sql)
  Catalog Error: Table with name independent_institutions_summary does not exist!
  Did you mean "individual_institutions_summary"?
  
  LINE 46:     FROM "bronze"."main"."independent_institutions_summary"
                    ^
[0m11:30:39.377641 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'afcae948-95e0-4d50-ad17-906ef6734710', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFD96202C0>]}
[0m11:30:39.378712 [error] [Thread-1 (]: 1 of 3 ERROR creating sql table model main_main.dim_instituicao ................ [[31mERROR[0m in 0.05s]
[0m11:30:39.379730 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m11:30:39.379730 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m11:30:39.379730 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_instituicao' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_instituicao (models\gold\dim_instituicao.sql)
  Catalog Error: Table with name independent_institutions_summary does not exist!
  Did you mean "individual_institutions_summary"?
  
  LINE 46:     FROM "bronze"."main"."independent_institutions_summary"
                    ^.
[0m11:30:39.380733 [info ] [Thread-1 (]: 2 of 3 START sql table model main_main.dim_tempo ............................... [RUN]
[0m11:30:39.380733 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m11:30:39.380733 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m11:30:39.384149 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m11:30:39.385156 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m11:30:39.387662 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m11:30:39.387662 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:30:39.388670 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m11:30:39.389175 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m11:30:39.389175 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:30:39.389175 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:30:39.390212 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."independent_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m11:30:39.390212 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."independent_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m11:30:39.391195 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m11:30:39.391195 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: ROLLBACK
[0m11:30:39.392180 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_tempo'
[0m11:30:39.393837 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m11:30:39.395357 [debug] [Thread-1 (]: Runtime Error in model dim_tempo (models\gold\dim_tempo.sql)
  Catalog Error: Table with name independent_institutions_summary does not exist!
  Did you mean "individual_institutions_summary"?
  
  LINE 21:     FROM "bronze"."main"."independent_institutions_summary"
                    ^
[0m11:30:39.396366 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'afcae948-95e0-4d50-ad17-906ef6734710', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFDC295430>]}
[0m11:30:39.396873 [error] [Thread-1 (]: 2 of 3 ERROR creating sql table model main_main.dim_tempo ...................... [[31mERROR[0m in 0.02s]
[0m11:30:39.396873 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m11:30:39.397878 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:30:39.397878 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_tempo' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_tempo (models\gold\dim_tempo.sql)
  Catalog Error: Table with name independent_institutions_summary does not exist!
  Did you mean "individual_institutions_summary"?
  
  LINE 21:     FROM "bronze"."main"."independent_institutions_summary"
                    ^.
[0m11:30:39.397878 [info ] [Thread-1 (]: 3 of 3 START sql table model main_main.fato_resumo_financeiro .................. [RUN]
[0m11:30:39.399383 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m11:30:39.399383 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:30:39.401544 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:30:39.402551 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:30:39.405083 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:30:39.406256 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:30:39.406256 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m11:30:39.406256 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m11:30:39.408222 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:30:39.408222 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:30:39.408862 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."independent_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m11:30:39.408862 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."independent_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m11:30:39.409892 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m11:30:39.410523 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: ROLLBACK
[0m11:30:39.412715 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_resumo_financeiro'
[0m11:30:39.412715 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m11:30:39.414936 [debug] [Thread-1 (]: Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Catalog Error: Table with name independent_institutions_summary does not exist!
  Did you mean "individual_institutions_summary"?
  
  LINE 28:     FROM "bronze"."main"."independent_institutions_summary"
                    ^
[0m11:30:39.414936 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'afcae948-95e0-4d50-ad17-906ef6734710', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFDC2B36E0>]}
[0m11:30:39.414936 [error] [Thread-1 (]: 3 of 3 ERROR creating sql table model main_main.fato_resumo_financeiro ......... [[31mERROR[0m in 0.02s]
[0m11:30:39.416441 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:30:39.416441 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_resumo_financeiro' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Catalog Error: Table with name independent_institutions_summary does not exist!
  Did you mean "individual_institutions_summary"?
  
  LINE 28:     FROM "bronze"."main"."independent_institutions_summary"
                    ^.
[0m11:30:39.417854 [debug] [MainThread]: Using duckdb connection "master"
[0m11:30:39.417854 [debug] [MainThread]: On master: BEGIN
[0m11:30:39.418860 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m11:30:39.418860 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m11:30:39.420366 [debug] [MainThread]: On master: COMMIT
[0m11:30:39.420366 [debug] [MainThread]: Using duckdb connection "master"
[0m11:30:39.420929 [debug] [MainThread]: On master: COMMIT
[0m11:30:39.420929 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:30:39.420929 [debug] [MainThread]: On master: Close
[0m11:30:39.420929 [debug] [MainThread]: Connection 'master' was properly closed.
[0m11:30:39.421942 [debug] [MainThread]: Connection 'create_gold_warehouse_main_main' was properly closed.
[0m11:30:39.421942 [debug] [MainThread]: Connection 'list_gold_warehouse_main_main' was properly closed.
[0m11:30:39.421942 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_resumo_financeiro' was properly closed.
[0m11:30:39.422476 [info ] [MainThread]: 
[0m11:30:39.422476 [info ] [MainThread]: Finished running 3 table models in 0 hours 0 minutes and 0.36 seconds (0.36s).
[0m11:30:39.422476 [debug] [MainThread]: Command end result
[0m11:30:39.439268 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m11:30:39.441272 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m11:30:39.445022 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m11:30:39.446104 [info ] [MainThread]: 
[0m11:30:39.446641 [info ] [MainThread]: [31mCompleted with 3 errors, 0 partial successes, and 0 warnings:[0m
[0m11:30:39.446641 [info ] [MainThread]: 
[0m11:30:39.446641 [error] [MainThread]: [31mFailure in model dim_instituicao (models\gold\dim_instituicao.sql)[0m
[0m11:30:39.447648 [error] [MainThread]:   Runtime Error in model dim_instituicao (models\gold\dim_instituicao.sql)
  Catalog Error: Table with name independent_institutions_summary does not exist!
  Did you mean "individual_institutions_summary"?
  
  LINE 46:     FROM "bronze"."main"."independent_institutions_summary"
                    ^
[0m11:30:39.447648 [info ] [MainThread]: 
[0m11:30:39.447648 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_instituicao.sql
[0m11:30:39.448646 [info ] [MainThread]: 
[0m11:30:39.448646 [error] [MainThread]: [31mFailure in model dim_tempo (models\gold\dim_tempo.sql)[0m
[0m11:30:39.449646 [error] [MainThread]:   Runtime Error in model dim_tempo (models\gold\dim_tempo.sql)
  Catalog Error: Table with name independent_institutions_summary does not exist!
  Did you mean "individual_institutions_summary"?
  
  LINE 21:     FROM "bronze"."main"."independent_institutions_summary"
                    ^
[0m11:30:39.449646 [info ] [MainThread]: 
[0m11:30:39.450151 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_tempo.sql
[0m11:30:39.450151 [info ] [MainThread]: 
[0m11:30:39.450151 [error] [MainThread]: [31mFailure in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)[0m
[0m11:30:39.450151 [error] [MainThread]:   Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Catalog Error: Table with name independent_institutions_summary does not exist!
  Did you mean "individual_institutions_summary"?
  
  LINE 28:     FROM "bronze"."main"."independent_institutions_summary"
                    ^
[0m11:30:39.451156 [info ] [MainThread]: 
[0m11:30:39.451714 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_resumo_financeiro.sql
[0m11:30:39.451714 [info ] [MainThread]: 
[0m11:30:39.451714 [info ] [MainThread]: Done. PASS=0 WARN=0 ERROR=3 SKIP=0 NO-OP=0 TOTAL=3
[0m11:30:39.452720 [debug] [MainThread]: Command `dbt build` failed at 11:30:39.452720 after 1.69 seconds
[0m11:30:39.452720 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFD9C382C0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFD664E810>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FFD9D2D5B0>]}
[0m11:30:39.452720 [debug] [MainThread]: Flushing usage events
[0m11:30:40.209566 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m11:31:23.485920 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D553606D80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D553348F20>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D553606F00>]}


============================== 11:31:23.490091 | 62664d37-3886-4183-8cd7-651fd09235b1 ==============================
[0m11:31:23.490091 [info ] [MainThread]: Running with dbt=1.11.5
[0m11:31:23.490091 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m11:31:23.705003 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '62664d37-3886-4183-8cd7-651fd09235b1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D554F1B5C0>]}
[0m11:31:23.759786 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '62664d37-3886-4183-8cd7-651fd09235b1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D554EF1FD0>]}
[0m11:31:23.761802 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m11:31:24.004118 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m11:31:24.126686 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 4 files changed.
[0m11:31:24.127226 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\bronze\sources.yml
[0m11:31:24.127226 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\dim_instituicao.sql
[0m11:31:24.127226 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\dim_tempo.sql
[0m11:31:24.128863 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_resumo_financeiro.sql
[0m11:31:24.416284 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m11:31:24.423545 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '62664d37-3886-4183-8cd7-651fd09235b1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D55578E270>]}
[0m11:31:24.469069 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m11:31:24.472015 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m11:31:24.563964 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '62664d37-3886-4183-8cd7-651fd09235b1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D5556BF950>]}
[0m11:31:24.565182 [info ] [MainThread]: Found 3 models, 18 sources, 472 macros
[0m11:31:24.568058 [info ] [MainThread]: 
[0m11:31:24.569063 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m11:31:24.569063 [info ] [MainThread]: 
[0m11:31:24.569063 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m11:31:24.577207 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m11:31:24.658778 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m11:31:24.659374 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m11:31:24.659374 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m11:31:24.752366 [debug] [ThreadPool]: SQL status: OK in 0.093 seconds
[0m11:31:24.753906 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m11:31:24.753906 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main_main)
[0m11:31:24.754912 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main_main"
"
[0m11:31:24.759870 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:31:24.759870 [debug] [ThreadPool]: On create_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m11:31:24.759870 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m11:31:24.761449 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m11:31:24.762463 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:31:24.762463 [debug] [ThreadPool]: On create_gold_warehouse_main_main: BEGIN
[0m11:31:24.763062 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:31:24.763062 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:31:24.763062 [debug] [ThreadPool]: On create_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main_main"} */

    
    
        create schema if not exists "gold_warehouse"."main_main"
    
[0m11:31:24.763761 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:31:24.764418 [debug] [ThreadPool]: On create_gold_warehouse_main_main: COMMIT
[0m11:31:24.764418 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:31:24.764418 [debug] [ThreadPool]: On create_gold_warehouse_main_main: COMMIT
[0m11:31:24.764418 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:31:24.764418 [debug] [ThreadPool]: On create_gold_warehouse_main_main: Close
[0m11:31:24.767264 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main_main'
[0m11:31:24.770963 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main_main"
[0m11:31:24.770963 [debug] [ThreadPool]: On list_gold_warehouse_main_main: BEGIN
[0m11:31:24.771984 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m11:31:24.773172 [debug] [ThreadPool]: SQL status: OK in 0.002 seconds
[0m11:31:24.774171 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main_main"
[0m11:31:24.774682 [debug] [ThreadPool]: On list_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main_main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m11:31:24.784328 [debug] [ThreadPool]: SQL status: OK in 0.010 seconds
[0m11:31:24.785338 [debug] [ThreadPool]: On list_gold_warehouse_main_main: ROLLBACK
[0m11:31:24.786848 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main_main'
[0m11:31:24.787501 [debug] [ThreadPool]: On list_gold_warehouse_main_main: Close
[0m11:31:24.787501 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '62664d37-3886-4183-8cd7-651fd09235b1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D550A5E6F0>]}
[0m11:31:24.787501 [debug] [MainThread]: Using duckdb connection "master"
[0m11:31:24.787501 [debug] [MainThread]: On master: BEGIN
[0m11:31:24.787501 [debug] [MainThread]: Opening a new connection, currently in state init
[0m11:31:24.789127 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:31:24.789127 [debug] [MainThread]: On master: COMMIT
[0m11:31:24.789127 [debug] [MainThread]: Using duckdb connection "master"
[0m11:31:24.789127 [debug] [MainThread]: On master: COMMIT
[0m11:31:24.790131 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:31:24.790131 [debug] [MainThread]: On master: Close
[0m11:31:24.793761 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m11:31:24.793761 [info ] [Thread-1 (]: 1 of 3 START sql table model main_main.dim_instituicao ......................... [RUN]
[0m11:31:24.795273 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m11:31:24.795273 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m11:31:24.801860 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:31:24.802866 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m11:31:24.827303 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:31:24.829910 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:31:24.829910 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m11:31:24.829910 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m11:31:24.831011 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:31:24.831011 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:31:24.831730 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Instituição Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m11:31:24.833376 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Instituição Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m11:31:24.833376 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m11:31:24.833376 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: ROLLBACK
[0m11:31:24.837506 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_instituicao'
[0m11:31:24.839124 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m11:31:24.840676 [debug] [Thread-1 (]: Runtime Error in model dim_instituicao (models\gold\dim_instituicao.sql)
  Binder Error: Referenced column "segmento_resolucao" not found in FROM clause!
  Candidate bindings: "conglomerado_prudencial", "numero_de_agencias", "numero_de_postos_de_atendimento", "conglomerado", "tipo_de_controle"
  
  LINE 42:         segmento_resolucao,
                   ^
[0m11:31:24.842235 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '62664d37-3886-4183-8cd7-651fd09235b1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D552F403B0>]}
[0m11:31:24.842235 [error] [Thread-1 (]: 1 of 3 ERROR creating sql table model main_main.dim_instituicao ................ [[31mERROR[0m in 0.05s]
[0m11:31:24.843854 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m11:31:24.843854 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m11:31:24.844889 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_instituicao' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_instituicao (models\gold\dim_instituicao.sql)
  Binder Error: Referenced column "segmento_resolucao" not found in FROM clause!
  Candidate bindings: "conglomerado_prudencial", "numero_de_agencias", "numero_de_postos_de_atendimento", "conglomerado", "tipo_de_controle"
  
  LINE 42:         segmento_resolucao,
                   ^.
[0m11:31:24.844889 [info ] [Thread-1 (]: 2 of 3 START sql table model main_main.dim_tempo ............................... [RUN]
[0m11:31:24.845927 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m11:31:24.845927 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m11:31:24.849530 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m11:31:24.850036 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m11:31:24.852686 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m11:31:24.852686 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:31:24.854191 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m11:31:24.854191 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m11:31:24.854191 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:31:24.855195 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:31:24.855195 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m11:31:24.890097 [debug] [Thread-1 (]: SQL status: OK in 0.035 seconds
[0m11:31:24.894952 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:31:24.894952 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main_main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m11:31:24.896569 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:31:24.905011 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m11:31:24.906017 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:31:24.906523 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m11:31:24.908771 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m11:31:24.913137 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:31:24.913137 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main_main"."dim_tempo__dbt_backup" cascade
    
[0m11:31:24.913901 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:31:24.914911 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m11:31:24.915913 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '62664d37-3886-4183-8cd7-651fd09235b1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D55095DFD0>]}
[0m11:31:24.916424 [info ] [Thread-1 (]: 2 of 3 OK created sql table model main_main.dim_tempo .......................... [[32mOK[0m in 0.07s]
[0m11:31:24.916931 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m11:31:24.917732 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:31:24.917732 [info ] [Thread-1 (]: 3 of 3 START sql table model main_main.fato_resumo_financeiro .................. [RUN]
[0m11:31:24.917732 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m11:31:24.918747 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:31:24.920763 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:31:24.920763 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:31:24.925736 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:31:24.927478 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:31:24.928013 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m11:31:24.928535 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m11:31:24.928535 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:31:24.929545 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:31:24.929545 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m11:31:25.129012 [debug] [Thread-1 (]: SQL status: OK in 0.199 seconds
[0m11:31:25.131219 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:31:25.131582 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m11:31:25.132086 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:31:25.133446 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m11:31:25.133446 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:31:25.133446 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m11:31:25.192234 [debug] [Thread-1 (]: SQL status: OK in 0.058 seconds
[0m11:31:25.193782 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:31:25.194305 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m11:31:25.194910 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:31:25.195914 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m11:31:25.196419 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '62664d37-3886-4183-8cd7-651fd09235b1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D558C58650>]}
[0m11:31:25.196419 [info ] [Thread-1 (]: 3 of 3 OK created sql table model main_main.fato_resumo_financeiro ............. [[32mOK[0m in 0.28s]
[0m11:31:25.197426 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:31:25.198424 [debug] [MainThread]: Using duckdb connection "master"
[0m11:31:25.198424 [debug] [MainThread]: On master: BEGIN
[0m11:31:25.198424 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m11:31:25.198424 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:31:25.199929 [debug] [MainThread]: On master: COMMIT
[0m11:31:25.199929 [debug] [MainThread]: Using duckdb connection "master"
[0m11:31:25.199929 [debug] [MainThread]: On master: COMMIT
[0m11:31:25.199929 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:31:25.199929 [debug] [MainThread]: On master: Close
[0m11:31:25.199929 [debug] [MainThread]: Connection 'master' was properly closed.
[0m11:31:25.199929 [debug] [MainThread]: Connection 'create_gold_warehouse_main_main' was properly closed.
[0m11:31:25.201537 [debug] [MainThread]: Connection 'list_gold_warehouse_main_main' was properly closed.
[0m11:31:25.201537 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_resumo_financeiro' was properly closed.
[0m11:31:25.201537 [info ] [MainThread]: 
[0m11:31:25.202292 [info ] [MainThread]: Finished running 3 table models in 0 hours 0 minutes and 0.63 seconds (0.63s).
[0m11:31:25.202292 [debug] [MainThread]: Command end result
[0m11:31:25.219871 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m11:31:25.221717 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m11:31:25.226930 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m11:31:25.227515 [info ] [MainThread]: 
[0m11:31:25.227515 [info ] [MainThread]: [31mCompleted with 1 error, 0 partial successes, and 0 warnings:[0m
[0m11:31:25.227515 [info ] [MainThread]: 
[0m11:31:25.228522 [error] [MainThread]: [31mFailure in model dim_instituicao (models\gold\dim_instituicao.sql)[0m
[0m11:31:25.229028 [error] [MainThread]:   Runtime Error in model dim_instituicao (models\gold\dim_instituicao.sql)
  Binder Error: Referenced column "segmento_resolucao" not found in FROM clause!
  Candidate bindings: "conglomerado_prudencial", "numero_de_agencias", "numero_de_postos_de_atendimento", "conglomerado", "tipo_de_controle"
  
  LINE 42:         segmento_resolucao,
                   ^
[0m11:31:25.229531 [info ] [MainThread]: 
[0m11:31:25.229531 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_instituicao.sql
[0m11:31:25.229531 [info ] [MainThread]: 
[0m11:31:25.229531 [info ] [MainThread]: Done. PASS=2 WARN=0 ERROR=1 SKIP=0 NO-OP=0 TOTAL=3
[0m11:31:25.231635 [debug] [MainThread]: Command `dbt build` failed at 11:31:25.231635 after 1.89 seconds
[0m11:31:25.231635 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D558C44A10>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D552FD77D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D553E68740>]}
[0m11:31:25.232272 [debug] [MainThread]: Flushing usage events
[0m11:31:25.840930 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m11:32:17.310285 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625D11A450>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625D118230>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625D119CD0>]}


============================== 11:32:17.314300 | 3df86498-cda9-47e3-aeef-b26d003379f1 ==============================
[0m11:32:17.314300 [info ] [MainThread]: Running with dbt=1.11.5
[0m11:32:17.315321 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m11:32:17.509819 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '3df86498-cda9-47e3-aeef-b26d003379f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625CAA1EE0>]}
[0m11:32:17.562226 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '3df86498-cda9-47e3-aeef-b26d003379f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625E9C9040>]}
[0m11:32:17.565273 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m11:32:17.766498 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m11:32:17.850178 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 2 files changed.
[0m11:32:17.851781 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\bronze\sources.yml
[0m11:32:17.851781 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\dim_instituicao.sql
[0m11:32:18.133974 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m11:32:18.142239 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '3df86498-cda9-47e3-aeef-b26d003379f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625F2C70E0>]}
[0m11:32:18.192137 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m11:32:18.194233 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m11:32:18.276976 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '3df86498-cda9-47e3-aeef-b26d003379f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625F24E540>]}
[0m11:32:18.278034 [info ] [MainThread]: Found 3 models, 19 sources, 472 macros
[0m11:32:18.281084 [info ] [MainThread]: 
[0m11:32:18.281864 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m11:32:18.282350 [info ] [MainThread]: 
[0m11:32:18.282853 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m11:32:18.287713 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m11:32:18.379505 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m11:32:18.379505 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m11:32:18.379505 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m11:32:18.504825 [debug] [ThreadPool]: SQL status: OK in 0.125 seconds
[0m11:32:18.505884 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m11:32:18.506434 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main_main)
[0m11:32:18.506974 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main_main"
"
[0m11:32:18.511954 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:32:18.512501 [debug] [ThreadPool]: On create_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m11:32:18.512501 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m11:32:18.513592 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m11:32:18.514681 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:32:18.515219 [debug] [ThreadPool]: On create_gold_warehouse_main_main: BEGIN
[0m11:32:18.515219 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:32:18.515835 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:32:18.515835 [debug] [ThreadPool]: On create_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main_main"} */

    
    
        create schema if not exists "gold_warehouse"."main_main"
    
[0m11:32:18.516348 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:32:18.516903 [debug] [ThreadPool]: On create_gold_warehouse_main_main: COMMIT
[0m11:32:18.516903 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:32:18.517449 [debug] [ThreadPool]: On create_gold_warehouse_main_main: COMMIT
[0m11:32:18.517449 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:32:18.517994 [debug] [ThreadPool]: On create_gold_warehouse_main_main: Close
[0m11:32:18.519106 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main_main'
[0m11:32:18.524163 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main_main"
[0m11:32:18.524730 [debug] [ThreadPool]: On list_gold_warehouse_main_main: BEGIN
[0m11:32:18.524730 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m11:32:18.524730 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:32:18.525735 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main_main"
[0m11:32:18.525735 [debug] [ThreadPool]: On list_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main_main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m11:32:18.534851 [debug] [ThreadPool]: SQL status: OK in 0.009 seconds
[0m11:32:18.535970 [debug] [ThreadPool]: On list_gold_warehouse_main_main: ROLLBACK
[0m11:32:18.537587 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main_main'
[0m11:32:18.537587 [debug] [ThreadPool]: On list_gold_warehouse_main_main: Close
[0m11:32:18.538678 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '3df86498-cda9-47e3-aeef-b26d003379f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625A666E10>]}
[0m11:32:18.539286 [debug] [MainThread]: Using duckdb connection "master"
[0m11:32:18.539822 [debug] [MainThread]: On master: BEGIN
[0m11:32:18.539822 [debug] [MainThread]: Opening a new connection, currently in state init
[0m11:32:18.540563 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:32:18.540563 [debug] [MainThread]: On master: COMMIT
[0m11:32:18.540563 [debug] [MainThread]: Using duckdb connection "master"
[0m11:32:18.541098 [debug] [MainThread]: On master: COMMIT
[0m11:32:18.541098 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:32:18.541631 [debug] [MainThread]: On master: Close
[0m11:32:18.544816 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m11:32:18.545381 [info ] [Thread-1 (]: 1 of 3 START sql table model main_main.dim_instituicao ......................... [RUN]
[0m11:32:18.545911 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m11:32:18.545911 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m11:32:18.551695 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:32:18.552702 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m11:32:18.598952 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:32:18.601749 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:32:18.602270 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m11:32:18.602270 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m11:32:18.603796 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:32:18.603796 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:32:18.605562 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento_resolucao,
        'Instituição Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m11:32:18.718471 [debug] [Thread-1 (]: SQL status: OK in 0.112 seconds
[0m11:32:18.722559 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:32:18.722559 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main_main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m11:32:18.724065 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:32:18.732927 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m11:32:18.733511 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:32:18.733511 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m11:32:18.763567 [debug] [Thread-1 (]: SQL status: OK in 0.030 seconds
[0m11:32:18.767991 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:32:18.768552 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main_main"."dim_instituicao__dbt_backup" cascade
    
[0m11:32:18.769107 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:32:18.771174 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m11:32:18.772686 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '3df86498-cda9-47e3-aeef-b26d003379f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625F68CA40>]}
[0m11:32:18.772686 [info ] [Thread-1 (]: 1 of 3 OK created sql table model main_main.dim_instituicao .................... [[32mOK[0m in 0.23s]
[0m11:32:18.774225 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m11:32:18.774225 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m11:32:18.774225 [info ] [Thread-1 (]: 2 of 3 START sql table model main_main.dim_tempo ............................... [RUN]
[0m11:32:18.775825 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m11:32:18.775825 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m11:32:18.778522 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m11:32:18.778522 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m11:32:18.781167 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m11:32:18.781788 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:32:18.781788 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m11:32:18.781788 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m11:32:18.781788 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:32:18.783427 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:32:18.783427 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m11:32:18.798100 [debug] [Thread-1 (]: SQL status: OK in 0.014 seconds
[0m11:32:18.803350 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:32:18.804357 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main_main'
      AND table_name = 'dim_tempo'
  
[0m11:32:18.805366 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:32:18.805952 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:32:18.805952 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main_main'
      AND table_name = 'dim_tempo'
  
[0m11:32:18.807713 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:32:18.811473 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:32:18.811473 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main_main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m11:32:18.812608 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:32:18.815961 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:32:18.816497 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main_main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m11:32:18.817019 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:32:18.820622 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m11:32:18.821321 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:32:18.821321 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m11:32:18.822325 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:32:18.824983 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:32:18.824983 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main_main"."dim_tempo__dbt_backup" cascade
    
[0m11:32:18.825984 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:32:18.826624 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m11:32:18.827637 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '3df86498-cda9-47e3-aeef-b26d003379f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625F769E20>]}
[0m11:32:18.827637 [info ] [Thread-1 (]: 2 of 3 OK created sql table model main_main.dim_tempo .......................... [[32mOK[0m in 0.05s]
[0m11:32:18.828837 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m11:32:18.828837 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:32:18.828837 [info ] [Thread-1 (]: 3 of 3 START sql table model main_main.fato_resumo_financeiro .................. [RUN]
[0m11:32:18.829862 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m11:32:18.829862 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:32:18.832139 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:32:18.833652 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:32:18.835798 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:32:18.837302 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:32:18.837807 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m11:32:18.837807 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m11:32:18.837807 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:32:18.838814 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:32:18.838814 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m11:32:19.002588 [debug] [Thread-1 (]: SQL status: OK in 0.164 seconds
[0m11:32:19.004406 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:32:19.004406 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main_main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m11:32:19.005411 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:32:19.007174 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:32:19.007174 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main_main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m11:32:19.008200 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:32:19.010710 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:32:19.010710 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main_main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m11:32:19.012217 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:32:19.013316 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:32:19.014322 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m11:32:19.014827 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:32:19.016333 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m11:32:19.016333 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:32:19.016333 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m11:32:19.168892 [debug] [Thread-1 (]: SQL status: OK in 0.152 seconds
[0m11:32:19.170744 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:32:19.170744 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m11:32:19.173099 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m11:32:19.174132 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m11:32:19.174665 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '3df86498-cda9-47e3-aeef-b26d003379f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625F25EE40>]}
[0m11:32:19.174665 [info ] [Thread-1 (]: 3 of 3 OK created sql table model main_main.fato_resumo_financeiro ............. [[32mOK[0m in 0.34s]
[0m11:32:19.175674 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:32:19.176682 [debug] [MainThread]: Using duckdb connection "master"
[0m11:32:19.177188 [debug] [MainThread]: On master: BEGIN
[0m11:32:19.177188 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m11:32:19.177985 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:32:19.177985 [debug] [MainThread]: On master: COMMIT
[0m11:32:19.177985 [debug] [MainThread]: Using duckdb connection "master"
[0m11:32:19.177985 [debug] [MainThread]: On master: COMMIT
[0m11:32:19.177985 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:32:19.178989 [debug] [MainThread]: On master: Close
[0m11:32:19.178989 [debug] [MainThread]: Connection 'master' was properly closed.
[0m11:32:19.179534 [debug] [MainThread]: Connection 'create_gold_warehouse_main_main' was properly closed.
[0m11:32:19.179534 [debug] [MainThread]: Connection 'list_gold_warehouse_main_main' was properly closed.
[0m11:32:19.179534 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_resumo_financeiro' was properly closed.
[0m11:32:19.179534 [info ] [MainThread]: 
[0m11:32:19.179534 [info ] [MainThread]: Finished running 3 table models in 0 hours 0 minutes and 0.90 seconds (0.90s).
[0m11:32:19.181109 [debug] [MainThread]: Command end result
[0m11:32:19.195997 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m11:32:19.198506 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m11:32:19.204149 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m11:32:19.205288 [info ] [MainThread]: 
[0m11:32:19.205834 [info ] [MainThread]: [32mCompleted successfully[0m
[0m11:32:19.205834 [info ] [MainThread]: 
[0m11:32:19.205834 [info ] [MainThread]: Done. PASS=3 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=3
[0m11:32:19.207988 [debug] [MainThread]: Command `dbt build` succeeded at 11:32:19.207418 after 2.07 seconds
[0m11:32:19.207988 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026259A9E6F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625CB961E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002625F190950>]}
[0m11:32:19.208570 [debug] [MainThread]: Flushing usage events
[0m11:32:19.951896 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m11:41:36.255407 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000233FF27AF30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000233FF27B0E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000233FF27B1D0>]}


============================== 11:41:36.259463 | 93fe82f9-20a6-4aee-adab-b5ec5d48e9ff ==============================
[0m11:41:36.259463 [info ] [MainThread]: Running with dbt=1.11.5
[0m11:41:36.260469 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m11:41:36.437456 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '93fe82f9-20a6-4aee-adab-b5ec5d48e9ff', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000233FFD19010>]}
[0m11:41:36.486744 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '93fe82f9-20a6-4aee-adab-b5ec5d48e9ff', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000233FEDFAFF0>]}
[0m11:41:36.488874 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m11:41:36.687341 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m11:41:36.743729 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m11:41:36.743729 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '93fe82f9-20a6-4aee-adab-b5ec5d48e9ff', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000233FF27A990>]}
[0m11:41:37.556035 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m11:41:37.563739 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '93fe82f9-20a6-4aee-adab-b5ec5d48e9ff', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023381233C20>]}
[0m11:41:37.605900 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m11:41:37.608706 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m11:41:37.644857 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '93fe82f9-20a6-4aee-adab-b5ec5d48e9ff', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002338138EE70>]}
[0m11:41:37.644857 [info ] [MainThread]: Found 3 models, 19 sources, 472 macros
[0m11:41:37.646874 [info ] [MainThread]: 
[0m11:41:37.647906 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m11:41:37.647906 [info ] [MainThread]: 
[0m11:41:37.647906 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m11:41:37.652405 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m11:41:37.717004 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m11:41:37.717004 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m11:41:37.717004 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m11:41:37.855809 [debug] [ThreadPool]: SQL status: OK in 0.139 seconds
[0m11:41:37.857491 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m11:41:37.858260 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main_main)
[0m11:41:37.858820 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main_main"
"
[0m11:41:37.862850 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:41:37.863651 [debug] [ThreadPool]: On create_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m11:41:37.863651 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m11:41:37.864769 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m11:41:37.864769 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:41:37.864769 [debug] [ThreadPool]: On create_gold_warehouse_main_main: BEGIN
[0m11:41:37.864769 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:41:37.866285 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:41:37.866285 [debug] [ThreadPool]: On create_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main_main"} */

    
    
        create schema if not exists "gold_warehouse"."main_main"
    
[0m11:41:37.866822 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:41:37.867418 [debug] [ThreadPool]: On create_gold_warehouse_main_main: COMMIT
[0m11:41:37.867418 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main_main"
[0m11:41:37.867951 [debug] [ThreadPool]: On create_gold_warehouse_main_main: COMMIT
[0m11:41:37.867951 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:41:37.867951 [debug] [ThreadPool]: On create_gold_warehouse_main_main: Close
[0m11:41:37.868957 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main_main'
[0m11:41:37.873924 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main_main"
[0m11:41:37.873924 [debug] [ThreadPool]: On list_gold_warehouse_main_main: BEGIN
[0m11:41:37.874932 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m11:41:37.874932 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m11:41:37.874932 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main_main"
[0m11:41:37.874932 [debug] [ThreadPool]: On list_gold_warehouse_main_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main_main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m11:41:37.884458 [debug] [ThreadPool]: SQL status: OK in 0.009 seconds
[0m11:41:37.886485 [debug] [ThreadPool]: On list_gold_warehouse_main_main: ROLLBACK
[0m11:41:37.886485 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main_main'
[0m11:41:37.887538 [debug] [ThreadPool]: On list_gold_warehouse_main_main: Close
[0m11:41:37.888544 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '93fe82f9-20a6-4aee-adab-b5ec5d48e9ff', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000233813EB950>]}
[0m11:41:37.888544 [debug] [MainThread]: Using duckdb connection "master"
[0m11:41:37.889078 [debug] [MainThread]: On master: BEGIN
[0m11:41:37.889078 [debug] [MainThread]: Opening a new connection, currently in state init
[0m11:41:37.889599 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:41:37.889599 [debug] [MainThread]: On master: COMMIT
[0m11:41:37.889599 [debug] [MainThread]: Using duckdb connection "master"
[0m11:41:37.889599 [debug] [MainThread]: On master: COMMIT
[0m11:41:37.889599 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:41:37.890610 [debug] [MainThread]: On master: Close
[0m11:41:37.893883 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m11:41:37.893883 [info ] [Thread-1 (]: 1 of 3 START sql table model main_main.dim_instituicao ......................... [RUN]
[0m11:41:37.893883 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m11:41:37.894887 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m11:41:37.900243 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:41:37.901266 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m11:41:37.923275 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:41:37.923275 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:41:37.924276 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m11:41:37.924780 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m11:41:37.924780 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:41:37.924780 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:41:37.925805 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento_resolucao,
        'Instituição Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m11:41:38.013171 [debug] [Thread-1 (]: SQL status: OK in 0.087 seconds
[0m11:41:38.016803 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:41:38.017712 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main_main'
      AND table_name = 'dim_instituicao'
  
[0m11:41:38.018716 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:41:38.021442 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:41:38.021442 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main_main'
      AND table_name = 'dim_instituicao'
  
[0m11:41:38.021442 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:41:38.025974 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:41:38.026985 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main_main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m11:41:38.027488 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:41:38.029267 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:41:38.029267 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main_main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m11:41:38.029929 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:41:38.039711 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m11:41:38.039711 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:41:38.040716 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m11:41:38.068957 [debug] [Thread-1 (]: SQL status: OK in 0.028 seconds
[0m11:41:38.073822 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m11:41:38.073822 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main_main"."dim_instituicao__dbt_backup" cascade
    
[0m11:41:38.074910 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:41:38.076527 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m11:41:38.079264 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '93fe82f9-20a6-4aee-adab-b5ec5d48e9ff', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000233813723C0>]}
[0m11:41:38.079793 [info ] [Thread-1 (]: 1 of 3 OK created sql table model main_main.dim_instituicao .................... [[32mOK[0m in 0.18s]
[0m11:41:38.080546 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m11:41:38.081167 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m11:41:38.081167 [info ] [Thread-1 (]: 2 of 3 START sql table model main_main.dim_tempo ............................... [RUN]
[0m11:41:38.081828 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m11:41:38.081828 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m11:41:38.084669 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m11:41:38.085860 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m11:41:38.088067 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m11:41:38.088578 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:41:38.089272 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m11:41:38.089272 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m11:41:38.089785 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:41:38.090377 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:41:38.090377 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m11:41:38.105141 [debug] [Thread-1 (]: SQL status: OK in 0.014 seconds
[0m11:41:38.107413 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:41:38.107413 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main_main'
      AND table_name = 'dim_tempo'
  
[0m11:41:38.108925 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:41:38.109932 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:41:38.109932 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main_main'
      AND table_name = 'dim_tempo'
  
[0m11:41:38.111437 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:41:38.113402 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:41:38.114010 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main_main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m11:41:38.114010 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:41:38.116520 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:41:38.116520 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main_main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m11:41:38.117025 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:41:38.118536 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m11:41:38.118536 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:41:38.118536 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m11:41:38.120687 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m11:41:38.122896 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m11:41:38.122896 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main_main"."dim_tempo__dbt_backup" cascade
    
[0m11:41:38.124126 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:41:38.125415 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m11:41:38.125415 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '93fe82f9-20a6-4aee-adab-b5ec5d48e9ff', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000233FFCF2AB0>]}
[0m11:41:38.126319 [info ] [Thread-1 (]: 2 of 3 OK created sql table model main_main.dim_tempo .......................... [[32mOK[0m in 0.04s]
[0m11:41:38.126945 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m11:41:38.126945 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:41:38.126945 [info ] [Thread-1 (]: 3 of 3 START sql table model main_main.fato_resumo_financeiro .................. [RUN]
[0m11:41:38.127801 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m11:41:38.127801 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:41:38.130456 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:41:38.130963 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:41:38.133305 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:41:38.134353 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:41:38.134353 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m11:41:38.134353 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m11:41:38.134353 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:41:38.135364 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:41:38.135364 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m11:41:38.297588 [debug] [Thread-1 (]: SQL status: OK in 0.162 seconds
[0m11:41:38.297588 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:41:38.298699 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main_main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m11:41:38.298699 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:41:38.300332 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:41:38.300661 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main_main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m11:41:38.301271 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m11:41:38.303167 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:41:38.304178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main_main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m11:41:38.304816 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:41:38.306250 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:41:38.306250 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m11:41:38.306250 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m11:41:38.308949 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m11:41:38.308949 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:41:38.308949 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m11:41:38.470859 [debug] [Thread-1 (]: SQL status: OK in 0.161 seconds
[0m11:41:38.472275 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m11:41:38.472275 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main_main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m11:41:38.474305 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m11:41:38.475851 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m11:41:38.475851 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '93fe82f9-20a6-4aee-adab-b5ec5d48e9ff', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002338186E210>]}
[0m11:41:38.477045 [info ] [Thread-1 (]: 3 of 3 OK created sql table model main_main.fato_resumo_financeiro ............. [[32mOK[0m in 0.35s]
[0m11:41:38.477639 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m11:41:38.479148 [debug] [MainThread]: Using duckdb connection "master"
[0m11:41:38.479148 [debug] [MainThread]: On master: BEGIN
[0m11:41:38.479659 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m11:41:38.479659 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:41:38.479659 [debug] [MainThread]: On master: COMMIT
[0m11:41:38.480666 [debug] [MainThread]: Using duckdb connection "master"
[0m11:41:38.480666 [debug] [MainThread]: On master: COMMIT
[0m11:41:38.481171 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m11:41:38.481171 [debug] [MainThread]: On master: Close
[0m11:41:38.481171 [debug] [MainThread]: Connection 'master' was properly closed.
[0m11:41:38.481676 [debug] [MainThread]: Connection 'create_gold_warehouse_main_main' was properly closed.
[0m11:41:38.481676 [debug] [MainThread]: Connection 'list_gold_warehouse_main_main' was properly closed.
[0m11:41:38.481676 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_resumo_financeiro' was properly closed.
[0m11:41:38.482353 [info ] [MainThread]: 
[0m11:41:38.482353 [info ] [MainThread]: Finished running 3 table models in 0 hours 0 minutes and 0.83 seconds (0.83s).
[0m11:41:38.482884 [debug] [MainThread]: Command end result
[0m11:41:38.496362 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m11:41:38.498584 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m11:41:38.503145 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m11:41:38.503145 [info ] [MainThread]: 
[0m11:41:38.504144 [info ] [MainThread]: [32mCompleted successfully[0m
[0m11:41:38.504144 [info ] [MainThread]: 
[0m11:41:38.504144 [info ] [MainThread]: Done. PASS=3 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=3
[0m11:41:38.505241 [debug] [MainThread]: Command `dbt build` succeeded at 11:41:38.505241 after 2.36 seconds
[0m11:41:38.505778 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000233FFAF7D40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000233FEBE4DD0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000233FF327470>]}
[0m11:41:38.505778 [debug] [MainThread]: Flushing usage events
[0m11:41:39.379553 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:25:09.052737 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DB26358AA0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DB26E60650>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DB25A4E9C0>]}


============================== 16:25:09.058850 | 7ad2eee1-a482-44de-b775-a91b257cd256 ==============================
[0m16:25:09.058850 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:25:09.059583 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'invocation_command': 'dbt build', 'use_colors': 'True', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:25:09.278783 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '7ad2eee1-a482-44de-b775-a91b257cd256', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DB2AA0B560>]}
[0m16:25:09.327140 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '7ad2eee1-a482-44de-b775-a91b257cd256', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DB2915C8C0>]}
[0m16:25:09.330801 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:25:09.556049 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:25:09.614360 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m16:25:09.615371 [info ] [MainThread]: Unable to do partial parsing because a project config has changed
[0m16:25:09.615875 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '7ad2eee1-a482-44de-b775-a91b257cd256', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DB290E6B10>]}
[0m16:25:10.511348 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m16:25:10.518083 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '7ad2eee1-a482-44de-b775-a91b257cd256', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DB2B190860>]}
[0m16:25:10.628869 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:25:10.631521 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:25:10.701549 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '7ad2eee1-a482-44de-b775-a91b257cd256', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DB2B307FB0>]}
[0m16:25:10.702558 [info ] [MainThread]: Found 3 models, 19 sources, 472 macros
[0m16:25:10.705583 [info ] [MainThread]: 
[0m16:25:10.706179 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:25:10.706179 [info ] [MainThread]: 
[0m16:25:10.706179 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:25:10.709840 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:25:10.897688 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:25:10.898689 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:25:10.899337 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:25:11.128640 [debug] [ThreadPool]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:25:11.128640 [debug] [ThreadPool]: DuckDB adapter: Rolling back transaction.
[0m16:25:11.129644 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:25:11.129644 [debug] [MainThread]: Connection 'list_gold_warehouse' was properly closed.
[0m16:25:11.129644 [info ] [MainThread]: 
[0m16:25:11.130673 [info ] [MainThread]: Finished running  in 0 hours 0 minutes and 0.42 seconds (0.42s).
[0m16:25:11.130673 [error] [MainThread]: Encountered an error:
Runtime Error
  'utf-8' codec can't decode byte 0xe1 in position 115: invalid continuation byte
[0m16:25:11.131795 [debug] [MainThread]: Command `dbt build` failed at 16:25:11.131795 after 2.42 seconds
[0m16:25:11.132361 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DB26358AA0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DB2B13A5A0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DB2653A210>]}
[0m16:25:11.132361 [debug] [MainThread]: Flushing usage events
[0m16:25:11.797891 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:25:39.185332 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026682B219A0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026683C19E20>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026680F2DB50>]}


============================== 16:25:39.192610 | 093c7b73-05b8-4bed-9b8a-b41a7b533bf7 ==============================
[0m16:25:39.192610 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:25:39.193625 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:25:39.396514 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '093c7b73-05b8-4bed-9b8a-b41a7b533bf7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026684FFFAD0>]}
[0m16:25:39.446089 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '093c7b73-05b8-4bed-9b8a-b41a7b533bf7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026680C94110>]}
[0m16:25:39.448190 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:25:39.664107 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:25:39.718806 [info ] [MainThread]: Unable to do partial parsing because a project config has changed
[0m16:25:39.718806 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '093c7b73-05b8-4bed-9b8a-b41a7b533bf7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002668370A6C0>]}
[0m16:25:40.594346 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m16:25:40.601534 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '093c7b73-05b8-4bed-9b8a-b41a7b533bf7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000266854D62A0>]}
[0m16:25:40.654248 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:25:40.657368 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:25:40.704336 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '093c7b73-05b8-4bed-9b8a-b41a7b533bf7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026685787530>]}
[0m16:25:40.704336 [info ] [MainThread]: Found 3 models, 19 sources, 472 macros
[0m16:25:40.710430 [info ] [MainThread]: 
[0m16:25:40.711986 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:25:40.712593 [info ] [MainThread]: 
[0m16:25:40.713124 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:25:40.718002 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:25:40.785946 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:25:40.785946 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:25:40.785946 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:25:40.971016 [debug] [ThreadPool]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:25:40.972022 [debug] [ThreadPool]: DuckDB adapter: Rolling back transaction.
[0m16:25:40.972528 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:25:40.972528 [debug] [MainThread]: Connection 'list_gold_warehouse' was properly closed.
[0m16:25:40.972528 [info ] [MainThread]: 
[0m16:25:40.972528 [info ] [MainThread]: Finished running  in 0 hours 0 minutes and 0.26 seconds (0.26s).
[0m16:25:40.974032 [error] [MainThread]: Encountered an error:
Runtime Error
  'utf-8' codec can't decode byte 0xe1 in position 115: invalid continuation byte
[0m16:25:40.974032 [debug] [MainThread]: Command `dbt build` failed at 16:25:40.974032 after 1.92 seconds
[0m16:25:40.975548 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026683046450>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000266856A3920>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000266859A5C70>]}
[0m16:25:40.975548 [debug] [MainThread]: Flushing usage events
[0m16:25:41.784335 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:26:13.987724 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028D4667AC90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028D462C0920>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028D45B93EF0>]}


============================== 16:26:13.992291 | f6cc3281-bd9b-4b64-a15d-7636d391444d ==============================
[0m16:26:13.992291 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:26:13.992797 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'None', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt debug', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:26:14.012448 [info ] [MainThread]: dbt version: 1.11.5
[0m16:26:14.013002 [info ] [MainThread]: python version: 3.12.12
[0m16:26:14.013619 [info ] [MainThread]: python path: C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\.venv\Scripts\python.exe
[0m16:26:14.013619 [info ] [MainThread]: os info: Windows-11-10.0.26200-SP0
[0m16:26:14.099775 [info ] [MainThread]: Using profiles dir at C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics
[0m16:26:14.100436 [info ] [MainThread]: Using profiles.yml file at C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\profiles.yml
[0m16:26:14.100436 [info ] [MainThread]: Using dbt_project.yml file at C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\dbt_project.yml
[0m16:26:14.103334 [info ] [MainThread]: adapter type: duckdb
[0m16:26:14.103334 [info ] [MainThread]: adapter version: 1.10.0
[0m16:26:14.181912 [info ] [MainThread]: Configuration:
[0m16:26:14.182454 [info ] [MainThread]:   profiles.yml file [[32mOK found and valid[0m]
[0m16:26:14.182454 [info ] [MainThread]:   dbt_project.yml file [[32mOK found and valid[0m]
[0m16:26:14.183459 [info ] [MainThread]: Required dependencies:
[0m16:26:14.183459 [debug] [MainThread]: Executing "git --help"
[0m16:26:14.228761 [debug] [MainThread]: STDOUT: "b"usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]\n           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-lazy-fetch]\n           [--no-optional-locks] [--no-advice] [--bare] [--git-dir=<path>]\n           [--work-tree=<path>] [--namespace=<name>] [--config-env=<name>=<envvar>]\n           <command> [<args>]\n\nThese are common Git commands used in various situations:\n\nstart a working area (see also: git help tutorial)\n   clone      Clone a repository into a new directory\n   init       Create an empty Git repository or reinitialize an existing one\n\nwork on the current change (see also: git help everyday)\n   add        Add file contents to the index\n   mv         Move or rename a file, a directory, or a symlink\n   restore    Restore working tree files\n   rm         Remove files from the working tree and from the index\n\nexamine the history and state (see also: git help revisions)\n   bisect     Use binary search to find the commit that introduced a bug\n   diff       Show changes between commits, commit and working tree, etc\n   grep       Print lines matching a pattern\n   log        Show commit logs\n   show       Show various types of objects\n   status     Show the working tree status\n\ngrow, mark and tweak your common history\n   backfill   Download missing objects in a partial clone\n   branch     List, create, or delete branches\n   commit     Record changes to the repository\n   merge      Join two or more development histories together\n   rebase     Reapply commits on top of another base tip\n   reset      Reset current HEAD to the specified state\n   switch     Switch branches\n   tag        Create, list, delete or verify tags\n\ncollaborate (see also: git help workflows)\n   fetch      Download objects and refs from another repository\n   pull       Fetch from and integrate with another repository or a local branch\n   push       Update remote refs along with associated objects\n\n'git help -a' and 'git help -g' list available subcommands and some\nconcept guides. See 'git help <command>' or 'git help <concept>'\nto read about a specific subcommand or concept.\nSee 'git help git' for an overview of the system.\n""
[0m16:26:14.230283 [debug] [MainThread]: STDERR: "b''"
[0m16:26:14.230916 [info ] [MainThread]:  - git [[32mOK found[0m]

[0m16:26:14.230916 [info ] [MainThread]: Connection:
[0m16:26:14.230916 [info ] [MainThread]:   database: gold_warehouse
[0m16:26:14.231959 [info ] [MainThread]:   schema: main
[0m16:26:14.232497 [info ] [MainThread]:   path: c:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\data\gold_warehouse.duckdb
[0m16:26:14.233005 [info ] [MainThread]:   config_options: None
[0m16:26:14.233005 [info ] [MainThread]:   extensions: ['httpfs', 'parquet']
[0m16:26:14.234015 [info ] [MainThread]:   settings: {}
[0m16:26:14.234015 [info ] [MainThread]:   external_root: .
[0m16:26:14.234522 [info ] [MainThread]:   use_credential_provider: None
[0m16:26:14.234522 [info ] [MainThread]:   attach: [{'path': 'c:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\data\\bronze_warehouse.duckdb', 'type': None, 'alias': 'bronze', 'secret': None, 'read_only': False, 'options': None, 'is_ducklake': None}]
[0m16:26:14.234522 [info ] [MainThread]:   filesystems: None
[0m16:26:14.235532 [info ] [MainThread]:   remote: None
[0m16:26:14.235532 [info ] [MainThread]:   plugins: None
[0m16:26:14.235532 [info ] [MainThread]:   disable_transactions: False
[0m16:26:14.236134 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:26:14.458908 [debug] [MainThread]: Acquiring new duckdb connection 'debug'
[0m16:26:14.514269 [debug] [MainThread]: Using duckdb connection "debug"
[0m16:26:14.514269 [debug] [MainThread]: On debug: select 1 as id
[0m16:26:14.514269 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:26:15.063408 [debug] [MainThread]: SQL status: OK in 0.549 seconds
[0m16:26:15.064175 [debug] [MainThread]: On debug: Close
[0m16:26:15.065228 [info ] [MainThread]:   Connection test: [[32mOK connection ok[0m]

[0m16:26:15.066740 [info ] [MainThread]: [32mAll checks passed![0m
[0m16:26:15.069065 [debug] [MainThread]: Command `dbt debug` succeeded at 16:26:15.069065 after 1.22 seconds
[0m16:26:15.069065 [debug] [MainThread]: Connection 'debug' was properly closed.
[0m16:26:15.069065 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028D46B68A40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028D48599FA0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028D46EB0980>]}
[0m16:26:15.069065 [debug] [MainThread]: Flushing usage events
[0m16:26:15.794038 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:26:51.110329 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016973E0DD90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016973E0EA20>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016973E0DD00>]}


============================== 16:26:51.118053 | 7ac4fbd8-dac3-43c2-855c-bb28f6a77d6e ==============================
[0m16:26:51.118053 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:26:51.119183 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:26:51.325636 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '7ac4fbd8-dac3-43c2-855c-bb28f6a77d6e', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016973E0CF80>]}
[0m16:26:51.372186 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '7ac4fbd8-dac3-43c2-855c-bb28f6a77d6e', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016973730D70>]}
[0m16:26:51.375212 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:26:51.593877 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:26:51.702804 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 1 files changed.
[0m16:26:51.704315 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\dim_instituicao.sql
[0m16:26:51.898365 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m16:26:51.907827 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '7ac4fbd8-dac3-43c2-855c-bb28f6a77d6e', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016975EA2090>]}
[0m16:26:51.953928 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:26:51.956022 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:26:51.992384 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '7ac4fbd8-dac3-43c2-855c-bb28f6a77d6e', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016975D6A270>]}
[0m16:26:51.992384 [info ] [MainThread]: Found 3 models, 19 sources, 472 macros
[0m16:26:51.995413 [info ] [MainThread]: 
[0m16:26:51.995944 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:26:51.995944 [info ] [MainThread]: 
[0m16:26:51.996473 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:26:52.000152 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:26:52.077551 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:26:52.078557 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:26:52.079062 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:26:52.160300 [debug] [ThreadPool]: SQL status: OK in 0.081 seconds
[0m16:26:52.161805 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:26:52.162969 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:26:52.163651 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:26:52.168511 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:26:52.169516 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:26:52.169516 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:26:52.170517 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:26:52.171022 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:26:52.171022 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:26:52.172029 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:26:52.172029 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:26:52.172533 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:26:52.172533 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:26:52.174040 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:26:52.174040 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:26:52.174649 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:26:52.174649 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:26:52.174649 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:26:52.176163 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:26:52.180338 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:26:52.180338 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:26:52.180843 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:26:52.180843 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:26:52.180843 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:26:52.181849 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:26:52.191163 [debug] [ThreadPool]: SQL status: OK in 0.010 seconds
[0m16:26:52.192668 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:26:52.194684 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:26:52.194684 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:26:52.195702 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '7ac4fbd8-dac3-43c2-855c-bb28f6a77d6e', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016976020080>]}
[0m16:26:52.196211 [debug] [MainThread]: Using duckdb connection "master"
[0m16:26:52.196762 [debug] [MainThread]: On master: BEGIN
[0m16:26:52.196762 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:26:52.196762 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:26:52.197769 [debug] [MainThread]: On master: COMMIT
[0m16:26:52.197769 [debug] [MainThread]: Using duckdb connection "master"
[0m16:26:52.197769 [debug] [MainThread]: On master: COMMIT
[0m16:26:52.197769 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:26:52.198769 [debug] [MainThread]: On master: Close
[0m16:26:52.202792 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:26:52.202792 [info ] [Thread-1 (]: 1 of 3 START sql table model main.dim_instituicao .............................. [RUN]
[0m16:26:52.202792 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:26:52.204296 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:26:52.209517 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:26:52.210521 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:26:52.281735 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:26:52.283548 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:26:52.283548 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:26:52.284086 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:26:52.284693 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:26:52.284693 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:26:52.285231 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento_resolucao,
        'Instituicao Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m16:26:52.395305 [debug] [Thread-1 (]: SQL status: OK in 0.110 seconds
[0m16:26:52.400029 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:26:52.401052 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:26:52.402589 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:26:52.411647 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:26:52.412152 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:26:52.412152 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:26:52.442728 [debug] [Thread-1 (]: SQL status: OK in 0.031 seconds
[0m16:26:52.447512 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:26:52.447512 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:26:52.448492 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:26:52.450125 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:26:52.451758 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7ac4fbd8-dac3-43c2-855c-bb28f6a77d6e', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000169763E3680>]}
[0m16:26:52.452788 [info ] [Thread-1 (]: 1 of 3 OK created sql table model main.dim_instituicao ......................... [[32mOK[0m in 0.25s]
[0m16:26:52.453385 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:26:52.453910 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:26:52.453910 [info ] [Thread-1 (]: 2 of 3 START sql table model main.dim_tempo .................................... [RUN]
[0m16:26:52.453910 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:26:52.455441 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:26:52.457624 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:26:52.458837 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:26:52.459867 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:26:52.461399 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:26:52.462005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:26:52.462005 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:26:52.462593 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:26:52.463117 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:26:52.463117 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:26:52.474005 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:26:52.476627 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:26:52.477633 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:26:52.478682 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:26:52.479755 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:26:52.479755 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:26:52.479755 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:26:52.479755 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:26:52.484135 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:26:52.484135 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:26:52.484135 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:26:52.485680 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:26:52.485680 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7ac4fbd8-dac3-43c2-855c-bb28f6a77d6e', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000169746B8E00>]}
[0m16:26:52.486692 [info ] [Thread-1 (]: 2 of 3 OK created sql table model main.dim_tempo ............................... [[32mOK[0m in 0.03s]
[0m16:26:52.486692 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:26:52.487691 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:26:52.487691 [info ] [Thread-1 (]: 3 of 3 START sql table model main.fato_resumo_financeiro ....................... [RUN]
[0m16:26:52.487691 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:26:52.488738 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:26:52.491368 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:26:52.491368 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:26:52.493940 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:26:52.495043 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:26:52.495043 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:26:52.495567 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:26:52.496099 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:26:52.496099 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:26:52.496626 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m16:26:52.670176 [debug] [Thread-1 (]: SQL status: OK in 0.173 seconds
[0m16:26:52.672525 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:26:52.673077 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:26:52.673636 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:26:52.674758 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:26:52.674758 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:26:52.674758 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:26:52.836300 [debug] [Thread-1 (]: SQL status: OK in 0.161 seconds
[0m16:26:52.839615 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:26:52.839615 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:26:52.840626 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:26:52.841153 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:26:52.841153 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7ac4fbd8-dac3-43c2-855c-bb28f6a77d6e', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016975CF13D0>]}
[0m16:26:52.842694 [info ] [Thread-1 (]: 3 of 3 OK created sql table model main.fato_resumo_financeiro .................. [[32mOK[0m in 0.35s]
[0m16:26:52.842694 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:26:52.843701 [debug] [MainThread]: Using duckdb connection "master"
[0m16:26:52.843701 [debug] [MainThread]: On master: BEGIN
[0m16:26:52.844709 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:26:52.844709 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:26:52.845256 [debug] [MainThread]: On master: COMMIT
[0m16:26:52.845256 [debug] [MainThread]: Using duckdb connection "master"
[0m16:26:52.845256 [debug] [MainThread]: On master: COMMIT
[0m16:26:52.845256 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:26:52.846260 [debug] [MainThread]: On master: Close
[0m16:26:52.846260 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:26:52.846765 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:26:52.846765 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:26:52.846765 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_resumo_financeiro' was properly closed.
[0m16:26:52.846765 [info ] [MainThread]: 
[0m16:26:52.847771 [info ] [MainThread]: Finished running 3 table models in 0 hours 0 minutes and 0.85 seconds (0.85s).
[0m16:26:52.848770 [debug] [MainThread]: Command end result
[0m16:26:52.865252 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:26:52.867925 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:26:52.874120 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:26:52.874120 [info ] [MainThread]: 
[0m16:26:52.874120 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:26:52.875663 [info ] [MainThread]: 
[0m16:26:52.875663 [info ] [MainThread]: Done. PASS=3 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=3
[0m16:26:52.877173 [debug] [MainThread]: Command `dbt build` succeeded at 16:26:52.877173 after 1.90 seconds
[0m16:26:52.877173 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016973A12450>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000169740CAB40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000169761FB1D0>]}
[0m16:26:52.877173 [debug] [MainThread]: Flushing usage events
[0m16:26:53.537684 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:33:32.327861 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C242B84A0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C25CBDDF0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C25D06EA0>]}


============================== 16:33:32.340617 | b4836a61-a3e5-406a-961c-f6e8042c4fb9 ==============================
[0m16:33:32.340617 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:33:32.342307 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'None', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'invocation_command': 'dbt seed', 'use_colors': 'True', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:33:33.014438 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'b4836a61-a3e5-406a-961c-f6e8042c4fb9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C25D30D40>]}
[0m16:33:33.174481 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'b4836a61-a3e5-406a-961c-f6e8042c4fb9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C27D0A120>]}
[0m16:33:33.182277 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:33:34.250015 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:33:34.610382 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 4 files added, 0 files changed.
[0m16:33:34.612623 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://seeds\dim_faixa_vencimento.csv
[0m16:33:34.613134 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\fato_balanco_patrimonial.sql
[0m16:33:34.614439 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\fato_demonstracao_resultado.sql
[0m16:33:34.616070 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://seeds\dim_produto_credito.csv
[0m16:33:35.422737 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m16:33:35.454331 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'b4836a61-a3e5-406a-961c-f6e8042c4fb9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C2841B590>]}
[0m16:33:35.683266 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:33:35.689602 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:33:35.789637 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'b4836a61-a3e5-406a-961c-f6e8042c4fb9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C281BDCD0>]}
[0m16:33:35.790740 [info ] [MainThread]: Found 5 models, 2 seeds, 19 sources, 472 macros
[0m16:33:35.791825 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'b4836a61-a3e5-406a-961c-f6e8042c4fb9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C28215DC0>]}
[0m16:33:35.797938 [info ] [MainThread]: 
[0m16:33:35.800794 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:33:35.805903 [info ] [MainThread]: 
[0m16:33:35.808009 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:33:35.830827 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:33:36.245407 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:33:36.246418 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:33:36.246418 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:33:36.484104 [debug] [ThreadPool]: SQL status: OK in 0.237 seconds
[0m16:33:36.486412 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:33:36.487412 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:33:36.489004 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:33:36.501896 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:33:36.501896 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:33:36.502900 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:33:36.504438 [debug] [ThreadPool]: SQL status: OK in 0.002 seconds
[0m16:33:36.508190 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:33:36.508862 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:33:36.509881 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:33:36.510403 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:33:36.511431 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:33:36.513243 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:33:36.513900 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:33:36.514908 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:33:36.514908 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:33:36.516433 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:33:36.516957 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:33:36.521032 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:33:36.530876 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:33:36.531893 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:33:36.533262 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:33:36.534290 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:33:36.534824 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:33:36.535833 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:33:36.568490 [debug] [ThreadPool]: SQL status: OK in 0.032 seconds
[0m16:33:36.571268 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:33:36.573851 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:33:36.574403 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:33:36.576746 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'b4836a61-a3e5-406a-961c-f6e8042c4fb9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C284A0B60>]}
[0m16:33:36.577363 [debug] [MainThread]: Using duckdb connection "master"
[0m16:33:36.577363 [debug] [MainThread]: On master: BEGIN
[0m16:33:36.578995 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:33:36.580668 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:33:36.581782 [debug] [MainThread]: On master: COMMIT
[0m16:33:36.582084 [debug] [MainThread]: Using duckdb connection "master"
[0m16:33:36.582084 [debug] [MainThread]: On master: COMMIT
[0m16:33:36.585078 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:33:36.585078 [debug] [MainThread]: On master: Close
[0m16:33:36.610493 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:33:36.612041 [info ] [Thread-1 (]: 1 of 2 START seed file main.dim_faixa_vencimento ............................... [RUN]
[0m16:33:36.613955 [debug] [Thread-1 (]: Acquiring new duckdb connection 'seed.bacen_ifdata_analytics.dim_faixa_vencimento'
[0m16:33:36.615629 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:33:36.616726 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:33:36.704139 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:33:36.705154 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:33:36.706306 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:33:36.709859 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:33:36.711456 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:33:36.712049 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m16:33:36.714914 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:33:36.742192 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:33:36.742192 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:33:36.764004 [debug] [Thread-1 (]: SQL status: OK in 0.020 seconds
[0m16:33:36.779617 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:33:36.829766 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:33:36.830890 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:33:36.831502 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:33:36.837489 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:33:36.843073 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:33:36.850217 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b4836a61-a3e5-406a-961c-f6e8042c4fb9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C23731B20>]}
[0m16:33:36.851300 [info ] [Thread-1 (]: 1 of 2 OK loaded seed file main.dim_faixa_vencimento ........................... [[32mINSERT 7[0m in 0.23s]
[0m16:33:36.853116 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:33:36.854991 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.dim_produto_credito
[0m16:33:36.856147 [info ] [Thread-1 (]: 2 of 2 START seed file main.dim_produto_credito ................................ [RUN]
[0m16:33:36.858464 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.dim_faixa_vencimento, now seed.bacen_ifdata_analytics.dim_produto_credito)
[0m16:33:36.861016 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.dim_produto_credito
[0m16:33:36.863431 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.dim_produto_credito
[0m16:33:36.877859 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.dim_produto_credito"
[0m16:33:36.879372 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:33:36.879372 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:36.885908 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:33:36.888391 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.dim_produto_credito"
[0m16:33:36.889407 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.dim_produto_credito"} */

    create table "gold_warehouse"."main"."dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m16:33:36.893487 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:36.900808 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.dim_produto_credito"
[0m16:33:36.902827 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.dim_produto_credito: 
          COPY "gold_warehouse"."main"."dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:33:36.910583 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:33:36.913146 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.dim_produto_credito"
[0m16:33:36.920755 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:33:36.922632 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.dim_produto_credito"
[0m16:33:36.924365 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:33:36.927382 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:33:36.932932 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:33:36.935491 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b4836a61-a3e5-406a-961c-f6e8042c4fb9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C2886AC60>]}
[0m16:33:36.938015 [info ] [Thread-1 (]: 2 of 2 OK loaded seed file main.dim_produto_credito ............................ [[32mINSERT 14[0m in 0.08s]
[0m16:33:36.940737 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.dim_produto_credito
[0m16:33:36.944580 [debug] [MainThread]: Using duckdb connection "master"
[0m16:33:36.945110 [debug] [MainThread]: On master: BEGIN
[0m16:33:36.946120 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:33:36.946636 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:33:36.947653 [debug] [MainThread]: On master: COMMIT
[0m16:33:36.948654 [debug] [MainThread]: Using duckdb connection "master"
[0m16:33:36.950681 [debug] [MainThread]: On master: COMMIT
[0m16:33:36.952228 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:33:36.953250 [debug] [MainThread]: On master: Close
[0m16:33:36.954245 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:33:36.955503 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:33:36.957533 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:33:36.958538 [debug] [MainThread]: Connection 'seed.bacen_ifdata_analytics.dim_produto_credito' was properly closed.
[0m16:33:36.959528 [info ] [MainThread]: 
[0m16:33:36.960534 [info ] [MainThread]: Finished running 2 seeds in 0 hours 0 minutes and 1.15 seconds (1.15s).
[0m16:33:36.963854 [debug] [MainThread]: Command end result
[0m16:33:37.038210 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:33:37.047090 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:33:37.059233 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:33:37.063342 [info ] [MainThread]: 
[0m16:33:37.064957 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:33:37.066133 [info ] [MainThread]: 
[0m16:33:37.068172 [info ] [MainThread]: Done. PASS=2 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=2
[0m16:33:37.070706 [debug] [MainThread]: Command `dbt seed` succeeded at 16:33:37.070706 after 4.93 seconds
[0m16:33:37.072391 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C267A0A40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C27F88CB0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027C27F5FBC0>]}
[0m16:33:37.076881 [debug] [MainThread]: Flushing usage events
[0m16:33:37.833347 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:36:41.215082 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000199EA5C82C0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000199E9AA3500>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000199E9AA2A20>]}


============================== 16:36:41.220692 | 893b5ed7-6db7-4b78-9aa2-6de831a363f6 ==============================
[0m16:36:41.220692 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:36:41.221199 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:36:41.479537 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '893b5ed7-6db7-4b78-9aa2-6de831a363f6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000199E78CEF60>]}
[0m16:36:41.532251 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '893b5ed7-6db7-4b78-9aa2-6de831a363f6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000199E742EDB0>]}
[0m16:36:41.590967 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:36:41.867427 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:36:41.975753 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 3 files added, 0 files changed.
[0m16:36:41.975753 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\dim_produto_credito.sql
[0m16:36:41.975753 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\fato_carteira_credito_produto.sql
[0m16:36:41.975753 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\dim_faixa_vencimento.sql
[0m16:36:42.167123 [warn ] [MainThread]: [[33mWARNING[0m]: Deprecated functionality
Found resources with the same name 'dim_produto_credito' in package
'bacen_ifdata_analytics': 'seed.bacen_ifdata_analytics.dim_produto_credito' and
'model.bacen_ifdata_analytics.dim_produto_credito'. Please update one of the
resources to have a unique name.
[0m16:36:42.167637 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '893b5ed7-6db7-4b78-9aa2-6de831a363f6', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000199E7F6A900>]}
[0m16:36:42.168172 [error] [MainThread]: Encountered an error:
Compilation Error
  dbt found two resources with the database representation ""gold_warehouse"."main"."dim_produto_credito"".
  dbt cannot create two resources with identical database representations. To fix this,
  change the configuration of one of these resources:
  - seed.bacen_ifdata_analytics.dim_produto_credito (seeds\dim_produto_credito.csv)
  - model.bacen_ifdata_analytics.dim_produto_credito (models\gold\dim_produto_credito.sql)
[0m16:36:42.168172 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- DuplicateNameDistinctNodeTypesDeprecation: 1 occurrence
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:36:42.169179 [debug] [MainThread]: Command `dbt build` failed at 16:36:42.169179 after 1.29 seconds
[0m16:36:42.169179 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000199EA8FE000>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000199EBBA87D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000199EC019940>]}
[0m16:36:42.169179 [debug] [MainThread]: Flushing usage events
[0m16:36:42.842704 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:37:43.960676 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002707533BF50>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027074725CD0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027074E28290>]}


============================== 16:37:43.965588 | be78815b-3793-411b-9d92-c46e25c12490 ==============================
[0m16:37:43.965588 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:37:43.966098 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:37:44.168143 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000270747B3F50>]}
[0m16:37:44.222174 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000270756D17F0>]}
[0m16:37:44.224267 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:37:44.450123 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:37:44.589872 [debug] [MainThread]: Partial parsing enabled: 2 files deleted, 2 files added, 2 files changed.
[0m16:37:44.590462 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://seeds\seed_dim_faixa_vencimento.csv
[0m16:37:44.591031 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://seeds\seed_dim_produto_credito.csv
[0m16:37:44.591595 [debug] [MainThread]: Partial parsing: deleted file: bacen_ifdata_analytics://seeds\dim_faixa_vencimento.csv
[0m16:37:44.591595 [debug] [MainThread]: Partial parsing: deleted file: bacen_ifdata_analytics://seeds\dim_produto_credito.csv
[0m16:37:44.592190 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\dim_faixa_vencimento.sql
[0m16:37:44.592190 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\dim_produto_credito.sql
[0m16:37:44.887503 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m16:37:44.897915 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027076F9CBF0>]}
[0m16:37:44.955829 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:37:44.958776 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:37:45.067491 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027073F2A900>]}
[0m16:37:45.068133 [info ] [MainThread]: Found 8 models, 2 seeds, 19 sources, 472 macros
[0m16:37:45.072990 [info ] [MainThread]: 
[0m16:37:45.074489 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:37:45.074489 [info ] [MainThread]: 
[0m16:37:45.075996 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:37:45.079694 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:37:45.164486 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:37:45.164486 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:37:45.164486 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:37:45.892437 [debug] [ThreadPool]: SQL status: OK in 0.728 seconds
[0m16:37:45.895546 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:37:45.896061 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:37:45.896696 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:37:45.901784 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:37:45.902790 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:37:45.902790 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:37:45.902790 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:37:45.904321 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:37:45.904321 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:37:45.905336 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:37:45.905336 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:37:45.905336 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:37:45.905897 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:37:45.907406 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:37:45.907406 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:37:45.907989 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:37:45.907989 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:37:45.908573 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:37:45.910190 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:37:45.914425 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:37:45.914425 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:37:45.914425 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:37:45.916045 [debug] [ThreadPool]: SQL status: OK in 0.002 seconds
[0m16:37:45.916045 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:37:45.917158 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:37:45.926631 [debug] [ThreadPool]: SQL status: OK in 0.010 seconds
[0m16:37:45.928699 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:37:45.929744 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:37:45.930266 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:37:45.930815 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027077045370>]}
[0m16:37:45.930815 [debug] [MainThread]: Using duckdb connection "master"
[0m16:37:45.931828 [debug] [MainThread]: On master: BEGIN
[0m16:37:45.931828 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:37:45.931828 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:37:45.931828 [debug] [MainThread]: On master: COMMIT
[0m16:37:45.931828 [debug] [MainThread]: Using duckdb connection "master"
[0m16:37:45.931828 [debug] [MainThread]: On master: COMMIT
[0m16:37:45.931828 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:37:45.931828 [debug] [MainThread]: On master: Close
[0m16:37:45.936290 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:37:45.936290 [info ] [Thread-1 (]: 1 of 10 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:37:45.937290 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:37:45.937793 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:37:45.942520 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:37:45.944193 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:37:45.968454 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:37:45.970463 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:37:45.971084 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:37:45.971084 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:37:45.971084 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:45.972096 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:37:45.972600 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento_resolucao,
        'Instituicao Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m16:37:46.105706 [debug] [Thread-1 (]: SQL status: OK in 0.133 seconds
[0m16:37:46.110071 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:37:46.110071 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:37:46.111581 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:46.112693 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:37:46.113206 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:37:46.114839 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:46.120508 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:37:46.121129 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:37:46.123177 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:37:46.124181 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:37:46.126064 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:37:46.126658 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:46.138861 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:37:46.138861 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:37:46.139438 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:37:46.231991 [debug] [Thread-1 (]: SQL status: OK in 0.093 seconds
[0m16:37:46.238899 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:37:46.239449 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:37:46.241457 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:46.242961 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:37:46.245017 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027077410800>]}
[0m16:37:46.246101 [info ] [Thread-1 (]: 1 of 10 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.31s]
[0m16:37:46.246724 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:37:46.246724 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:37:46.247729 [info ] [Thread-1 (]: 2 of 10 START sql table model main.dim_tempo ................................... [RUN]
[0m16:37:46.247729 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:37:46.247729 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:37:46.252491 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:37:46.252491 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:37:46.256747 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:37:46.258821 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:37:46.258821 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:37:46.258821 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:37:46.259860 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:46.259860 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:37:46.260827 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:37:46.277576 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:37:46.278580 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:37:46.278580 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:37:46.279642 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:46.280146 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:37:46.281152 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:37:46.281746 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:46.285340 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:37:46.286343 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:37:46.287346 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:46.289359 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:37:46.290391 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:37:46.290391 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:46.291380 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:37:46.292385 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:37:46.292385 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:37:46.293991 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:46.296640 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:37:46.296640 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:37:46.297645 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:46.299129 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:37:46.299659 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027077459790>]}
[0m16:37:46.300322 [info ] [Thread-1 (]: 2 of 10 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.05s]
[0m16:37:46.300901 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:37:46.301414 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:37:46.301949 [info ] [Thread-1 (]: 3 of 10 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:37:46.302968 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:37:46.302968 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:37:46.306492 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:37:46.308130 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:37:46.311687 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:37:46.312785 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:37:46.312785 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:37:46.313366 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:37:46.313958 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:46.313958 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:37:46.314963 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH ativos_passivos AS (
    -- Conglomerados Prudenciais
    SELECT 
        a.codigo, 
        a.data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."prudential_conglomerates_assets" a
    JOIN "bronze"."main"."prudential_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        a.codigo, 
        a.data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."financial_conglomerates_assets" a
    JOIN "bronze"."main"."financial_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT 
        a.codigo, 
        a.data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."individual_institutions_assets" a
    JOIN "bronze"."main"."individual_institutions_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base
)

SELECT
    md5(cast(ap.codigo as varchar)) as id_instituicao,
    strftime(ap.data_base, '%Y%m%d')::int as id_data,
    ap.disponibilidades,
    ap.operacoes_de_credito,
    ap.tvm as titulos_valores_mobiliarios,
    ap.ativo_total,
    ap.depositos_vista,
    ap.depositos_a_prazo,
    ap.captacoes,
    ap.patrimonio_liquido,
    ap.passivo_total
FROM ativos_passivos ap
    );
  
  
[0m16:37:46.643905 [debug] [Thread-1 (]: SQL status: OK in 0.328 seconds
[0m16:37:46.646429 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:37:46.646429 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:37:46.646957 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:46.648469 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:37:46.648469 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:37:46.649473 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:37:46.944965 [debug] [Thread-1 (]: SQL status: OK in 0.296 seconds
[0m16:37:46.947474 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:37:46.947474 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:37:46.947474 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:46.948486 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:37:46.948486 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000270747B27B0>]}
[0m16:37:46.949989 [info ] [Thread-1 (]: 3 of 10 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.65s]
[0m16:37:46.949989 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:37:46.950994 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:37:46.950994 [info ] [Thread-1 (]: 4 of 10 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:37:46.950994 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:37:46.952111 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:37:46.956250 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:37:46.957766 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:37:46.961337 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:37:46.962848 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:37:46.963431 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:37:46.963431 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:37:46.964444 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:46.964444 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:37:46.964948 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."prudential_conglomerates_income_statement"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."financial_conglomerates_income_statement"

    UNION ALL

    -- Instituições Individuais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."individual_institutions_income_statement"
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    rendas_operacoes_de_credito,
    receitas_intermediacao_financeira,
    despesas_captacao,
    despesas_intermediacao_financeira,
    resultado_intermediacao_financeira,
    rendas_prestacao_servicos,
    despesas_pessoal,
    despesas_administrativas,
    resultado_operacional,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas
FROM dre
    );
  
  
[0m16:37:46.974036 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."prudential_conglomerates_income_statement"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."financial_conglomerates_income_statement"

    UNION ALL

    -- Instituições Individuais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."individual_institutions_income_statement"
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    rendas_operacoes_de_credito,
    receitas_intermediacao_financeira,
    despesas_captacao,
    despesas_intermediacao_financeira,
    resultado_intermediacao_financeira,
    rendas_prestacao_servicos,
    despesas_pessoal,
    despesas_administrativas,
    resultado_operacional,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas
FROM dre
    );
  
  
[0m16:37:46.974036 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:37:46.975906 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: ROLLBACK
[0m16:37:46.983409 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_demonstracao_resultado'
[0m16:37:46.984415 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:37:46.985926 [debug] [Thread-1 (]: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Binder Error: Referenced column "juros_sobre_capital_social_cooperativas" not found in FROM clause!
  Candidate bindings: "juros_sobre_capital_proprio", "rendas_aplicacoes_compulsorias", "outras_receitas_despesas_operacionais", "outras_receitas_operacionais", "resultado_antes_tributacao_participacao"
  
  LINE 28:         juros_sobre_capital_social_cooperativas
                   ^
[0m16:37:46.985926 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027076E46BD0>]}
[0m16:37:46.985926 [error] [Thread-1 (]: 4 of 10 ERROR creating sql table model main.fato_demonstracao_resultado ........ [[31mERROR[0m in 0.03s]
[0m16:37:46.987432 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:37:46.987432 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:37:46.989074 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_demonstracao_resultado' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Binder Error: Referenced column "juros_sobre_capital_social_cooperativas" not found in FROM clause!
  Candidate bindings: "juros_sobre_capital_proprio", "rendas_aplicacoes_compulsorias", "outras_receitas_despesas_operacionais", "outras_receitas_operacionais", "resultado_antes_tributacao_participacao"
  
  LINE 28:         juros_sobre_capital_social_cooperativas
                   ^.
[0m16:37:46.989074 [info ] [Thread-1 (]: 5 of 10 START sql table model main.fato_resumo_financeiro ...................... [RUN]
[0m16:37:46.990080 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:37:46.990080 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:37:46.992586 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:37:46.993609 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:37:46.996907 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:37:46.998483 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:37:46.998483 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:37:46.999185 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:37:46.999696 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.000490 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:37:47.000490 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m16:37:47.181161 [debug] [Thread-1 (]: SQL status: OK in 0.179 seconds
[0m16:37:47.181806 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:37:47.181806 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:37:47.183438 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:47.184032 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:37:47.185046 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:37:47.186040 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:47.187545 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:37:47.187545 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:37:47.189256 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:47.191265 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:37:47.191265 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:37:47.191265 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:47.192768 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:37:47.192768 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:37:47.193778 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:37:47.268915 [debug] [Thread-1 (]: SQL status: OK in 0.076 seconds
[0m16:37:47.271006 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:37:47.272011 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:37:47.272516 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.274024 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:37:47.274024 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027077384EC0>]}
[0m16:37:47.275599 [info ] [Thread-1 (]: 5 of 10 OK created sql table model main.fato_resumo_financeiro ................. [[32mOK[0m in 0.28s]
[0m16:37:47.275599 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:37:47.276603 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:37:47.277110 [info ] [Thread-1 (]: 6 of 10 START seed file main.seed_dim_faixa_vencimento ......................... [RUN]
[0m16:37:47.277110 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:37:47.277632 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:37:47.277632 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:37:47.295036 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:37:47.295036 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:37:47.295036 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:37:47.296600 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.296600 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:37:47.297613 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m16:37:47.298125 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:47.306276 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:37:47.306276 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:37:47.315934 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:37:47.319211 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:37:47.322386 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:37:47.322386 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:37:47.322386 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:37:47.324626 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.325669 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:37:47.326795 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002707748D100>]}
[0m16:37:47.326795 [info ] [Thread-1 (]: 6 of 10 OK loaded seed file main.seed_dim_faixa_vencimento ..................... [[32mINSERT 7[0m in 0.05s]
[0m16:37:47.326795 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:37:47.328242 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:37:47.328784 [info ] [Thread-1 (]: 7 of 10 START seed file main.seed_dim_produto_credito .......................... [RUN]
[0m16:37:47.328784 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:37:47.329790 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:37:47.329790 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:37:47.333328 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:37:47.333833 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:37:47.333833 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:37:47.334338 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:47.334338 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:37:47.334338 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m16:37:47.335345 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:47.336352 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:37:47.336352 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:37:47.337858 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:37:47.338865 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:37:47.340993 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:37:47.340993 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:37:47.342615 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:37:47.343621 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.344697 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:37:47.344697 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002707743C0E0>]}
[0m16:37:47.346347 [info ] [Thread-1 (]: 7 of 10 OK loaded seed file main.seed_dim_produto_credito ...................... [[32mINSERT 14[0m in 0.02s]
[0m16:37:47.347360 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:37:47.347360 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:37:47.347360 [info ] [Thread-1 (]: 8 of 10 START sql table model main.dim_faixa_vencimento ........................ [RUN]
[0m16:37:47.348453 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:37:47.348453 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:37:47.351600 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:37:47.352608 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:37:47.356145 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:37:47.357680 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:37:47.358183 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:37:47.358781 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:37:47.359790 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.359790 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:37:47.359790 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:37:47.361297 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.363323 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:37:47.363698 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:37:47.364200 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.365208 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:37:47.366209 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:37:47.366963 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:47.369214 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:37:47.369214 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m16:37:47.369214 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:47.374345 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:37:47.375455 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:37:47.376065 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:47.377623 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:37:47.378130 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:37:47.378130 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:37:47.379645 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.381844 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:37:47.381844 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:37:47.383456 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.385068 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:37:47.386067 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027077496DE0>]}
[0m16:37:47.386711 [info ] [Thread-1 (]: 8 of 10 OK created sql table model main.dim_faixa_vencimento ................... [[32mOK[0m in 0.04s]
[0m16:37:47.388224 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:37:47.388224 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:37:47.388729 [info ] [Thread-1 (]: 9 of 10 START sql table model main.dim_produto_credito ......................... [RUN]
[0m16:37:47.389350 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:37:47.389350 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:37:47.391354 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:37:47.392357 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:37:47.396325 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:37:47.397331 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:37:47.397331 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:37:47.397331 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:37:47.399962 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.399962 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:37:47.399962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:37:47.403097 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.404733 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:37:47.406474 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:37:47.408704 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.412910 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:37:47.413526 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:37:47.416056 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.422559 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:37:47.424071 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m16:37:47.424520 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:47.427603 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:37:47.428614 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:37:47.429642 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.432061 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:37:47.432061 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:37:47.433205 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:37:47.435998 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:37:47.442239 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:37:47.442773 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:37:47.443783 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:37:47.444808 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:37:47.445885 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027077444140>]}
[0m16:37:47.446408 [info ] [Thread-1 (]: 9 of 10 OK created sql table model main.dim_produto_credito .................... [[32mOK[0m in 0.06s]
[0m16:37:47.446408 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:37:47.447423 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:37:47.448445 [info ] [Thread-1 (]: 10 of 10 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:37:47.449632 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:37:47.450209 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:37:47.452731 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:37:47.455245 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:37:47.458292 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:37:47.459297 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:37:47.459297 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:37:47.459297 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:37:47.460315 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:47.460315 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:37:47.460315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:37:59.742739 [debug] [Thread-1 (]: SQL status: OK in 12.282 seconds
[0m16:37:59.745290 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:37:59.745290 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:37:59.746323 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:59.746323 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:37:59.747927 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:37:59.747927 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:37:59.842259 [debug] [Thread-1 (]: SQL status: OK in 0.095 seconds
[0m16:37:59.845316 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:37:59.845841 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:37:59.845841 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:37:59.847509 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:37:59.847509 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'be78815b-3793-411b-9d92-c46e25c12490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027002FBFAD0>]}
[0m16:37:59.848520 [info ] [Thread-1 (]: 10 of 10 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 12.40s]
[0m16:37:59.848520 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:37:59.850029 [debug] [MainThread]: Using duckdb connection "master"
[0m16:37:59.850029 [debug] [MainThread]: On master: BEGIN
[0m16:37:59.850029 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:37:59.851033 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:37:59.851536 [debug] [MainThread]: On master: COMMIT
[0m16:37:59.851536 [debug] [MainThread]: Using duckdb connection "master"
[0m16:37:59.851536 [debug] [MainThread]: On master: COMMIT
[0m16:37:59.852542 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:37:59.852542 [debug] [MainThread]: On master: Close
[0m16:37:59.852542 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:37:59.852542 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:37:59.852542 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:37:59.852542 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_carteira_credito_produto' was properly closed.
[0m16:37:59.852542 [info ] [MainThread]: 
[0m16:37:59.854051 [info ] [MainThread]: Finished running 2 seeds, 8 table models in 0 hours 0 minutes and 14.78 seconds (14.78s).
[0m16:37:59.855591 [debug] [MainThread]: Command end result
[0m16:37:59.878709 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:37:59.881379 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:37:59.889724 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:37:59.889724 [info ] [MainThread]: 
[0m16:37:59.890856 [info ] [MainThread]: [31mCompleted with 1 error, 0 partial successes, and 0 warnings:[0m
[0m16:37:59.890856 [info ] [MainThread]: 
[0m16:37:59.890856 [error] [MainThread]: [31mFailure in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)[0m
[0m16:37:59.892362 [error] [MainThread]:   Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Binder Error: Referenced column "juros_sobre_capital_social_cooperativas" not found in FROM clause!
  Candidate bindings: "juros_sobre_capital_proprio", "rendas_aplicacoes_compulsorias", "outras_receitas_despesas_operacionais", "outras_receitas_operacionais", "resultado_antes_tributacao_participacao"
  
  LINE 28:         juros_sobre_capital_social_cooperativas
                   ^
[0m16:37:59.892362 [info ] [MainThread]: 
[0m16:37:59.892362 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_demonstracao_resultado.sql
[0m16:37:59.893926 [info ] [MainThread]: 
[0m16:37:59.894934 [info ] [MainThread]: Done. PASS=9 WARN=0 ERROR=1 SKIP=0 NO-OP=0 TOTAL=10
[0m16:37:59.896096 [debug] [MainThread]: Command `dbt build` failed at 16:37:59.894934 after 16.11 seconds
[0m16:37:59.896096 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002707533BF50>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000270752DDDF0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027074E8E1B0>]}
[0m16:37:59.896661 [debug] [MainThread]: Flushing usage events
[0m16:38:00.904222 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:39:11.991477 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001234F481A90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000012351EC8B00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000012351EC9220>]}


============================== 16:39:11.995301 | 6d17d88c-8d44-41ae-b134-953d064aa198 ==============================
[0m16:39:11.995301 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:39:11.996305 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:39:12.185880 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000012351BD3A10>]}
[0m16:39:12.234359 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000012352B43470>]}
[0m16:39:12.235872 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:39:12.452621 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:39:12.550505 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 1 files changed.
[0m16:39:12.550505 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_demonstracao_resultado.sql
[0m16:39:12.760494 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m16:39:12.769634 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001235434A000>]}
[0m16:39:12.824481 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:39:12.826000 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:39:12.870775 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000123542FF6B0>]}
[0m16:39:12.871281 [info ] [MainThread]: Found 8 models, 2 seeds, 19 sources, 472 macros
[0m16:39:12.873294 [info ] [MainThread]: 
[0m16:39:12.874292 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:39:12.874795 [info ] [MainThread]: 
[0m16:39:12.874795 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:39:12.879943 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:39:12.959809 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:39:12.961331 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:39:12.961331 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:39:13.106186 [debug] [ThreadPool]: SQL status: OK in 0.145 seconds
[0m16:39:13.106186 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:39:13.107742 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:39:13.107742 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:39:13.113508 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:39:13.113508 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:39:13.114069 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:39:13.115084 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:39:13.115084 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:39:13.116108 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:39:13.116108 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:39:13.116108 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:39:13.116108 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:39:13.116108 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:39:13.118067 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:39:13.118067 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:39:13.118067 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:39:13.118067 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:39:13.119071 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:39:13.120576 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:39:13.125427 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:39:13.125427 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:39:13.125427 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:39:13.125427 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:39:13.127049 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:39:13.127049 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:39:13.137546 [debug] [ThreadPool]: SQL status: OK in 0.010 seconds
[0m16:39:13.137546 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:39:13.182089 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:39:13.182628 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:39:13.184226 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000123543299D0>]}
[0m16:39:13.184226 [debug] [MainThread]: Using duckdb connection "master"
[0m16:39:13.184226 [debug] [MainThread]: On master: BEGIN
[0m16:39:13.184226 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:39:13.185979 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:39:13.185979 [debug] [MainThread]: On master: COMMIT
[0m16:39:13.185979 [debug] [MainThread]: Using duckdb connection "master"
[0m16:39:13.185979 [debug] [MainThread]: On master: COMMIT
[0m16:39:13.187503 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:39:13.187503 [debug] [MainThread]: On master: Close
[0m16:39:13.192290 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:39:13.192290 [info ] [Thread-1 (]: 1 of 10 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:39:13.194033 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:39:13.194033 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:39:13.202430 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:13.202430 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:39:13.230332 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:13.230949 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:13.230949 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:39:13.230949 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:39:13.232349 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.232349 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:13.232349 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento_resolucao,
        'Instituicao Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m16:39:13.352087 [debug] [Thread-1 (]: SQL status: OK in 0.119 seconds
[0m16:39:13.356051 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:13.356677 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:39:13.357686 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.358805 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:13.358805 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:39:13.360040 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.365873 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:13.365873 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:39:13.366390 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.368511 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:13.369517 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:39:13.369517 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.382043 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:39:13.382627 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:13.383172 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:39:13.418057 [debug] [Thread-1 (]: SQL status: OK in 0.034 seconds
[0m16:39:13.420777 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:13.422616 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:39:13.422616 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.425478 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:39:13.427556 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000123541881A0>]}
[0m16:39:13.427556 [info ] [Thread-1 (]: 1 of 10 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.23s]
[0m16:39:13.428561 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:39:13.429067 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:39:13.429601 [info ] [Thread-1 (]: 2 of 10 START sql table model main.dim_tempo ................................... [RUN]
[0m16:39:13.429601 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:39:13.429601 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:39:13.432399 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:13.433428 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:39:13.434937 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:13.436023 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:13.436023 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:39:13.436023 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.437531 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.437531 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:13.437531 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:39:13.452623 [debug] [Thread-1 (]: SQL status: OK in 0.015 seconds
[0m16:39:13.456057 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:13.456057 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:39:13.456057 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.458759 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:13.458759 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:39:13.460593 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.464508 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:13.464508 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:39:13.464508 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.467690 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:13.468201 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:39:13.468201 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.469207 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:39:13.469207 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:13.469207 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:39:13.472501 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.474695 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:13.475342 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:39:13.476738 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.477848 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:39:13.477848 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000012354837B30>]}
[0m16:39:13.478854 [info ] [Thread-1 (]: 2 of 10 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.05s]
[0m16:39:13.478854 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:39:13.480029 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:39:13.480029 [info ] [Thread-1 (]: 3 of 10 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:39:13.480573 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:39:13.481081 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:39:13.483776 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:13.484282 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:39:13.486287 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:13.487810 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:13.488342 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:39:13.488342 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.488856 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.488856 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:13.489464 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH ativos_passivos AS (
    -- Conglomerados Prudenciais
    SELECT 
        a.codigo, 
        a.data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."prudential_conglomerates_assets" a
    JOIN "bronze"."main"."prudential_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        a.codigo, 
        a.data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."financial_conglomerates_assets" a
    JOIN "bronze"."main"."financial_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT 
        a.codigo, 
        a.data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."individual_institutions_assets" a
    JOIN "bronze"."main"."individual_institutions_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base
)

SELECT
    md5(cast(ap.codigo as varchar)) as id_instituicao,
    strftime(ap.data_base, '%Y%m%d')::int as id_data,
    ap.disponibilidades,
    ap.operacoes_de_credito,
    ap.tvm as titulos_valores_mobiliarios,
    ap.ativo_total,
    ap.depositos_vista,
    ap.depositos_a_prazo,
    ap.captacoes,
    ap.patrimonio_liquido,
    ap.passivo_total
FROM ativos_passivos ap
    );
  
  
[0m16:39:13.751771 [debug] [Thread-1 (]: SQL status: OK in 0.262 seconds
[0m16:39:13.752877 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:13.752877 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:39:13.752877 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.755191 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:13.755191 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:39:13.755981 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.758254 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:13.758803 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:39:13.758803 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.761355 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:13.761355 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:39:13.761355 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.762871 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:39:13.763389 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:13.763389 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:39:13.982104 [debug] [Thread-1 (]: SQL status: OK in 0.218 seconds
[0m16:39:13.984167 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:13.984167 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:39:13.986180 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.987688 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:39:13.988369 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000012354774080>]}
[0m16:39:13.988884 [info ] [Thread-1 (]: 3 of 10 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.51s]
[0m16:39:13.988884 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:39:13.989482 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:39:13.989482 [info ] [Thread-1 (]: 4 of 10 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:39:13.990487 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:39:13.990487 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:39:13.992502 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:13.994286 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:39:13.997574 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:13.998101 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:13.998607 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:39:13.998607 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.998607 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.999611 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:14.000197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."prudential_conglomerates_income_statement"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."financial_conglomerates_income_statement"

    UNION ALL

    -- Instituições Individuais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."individual_institutions_income_statement"
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    rendas_operacoes_de_credito,
    receitas_intermediacao_financeira,
    despesas_captacao,
    despesas_intermediacao_financeira,
    resultado_intermediacao_financeira,
    rendas_prestacao_servicos,
    despesas_pessoal,
    despesas_administrativas,
    resultado_operacional,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas
FROM dre
    );
  
  
[0m16:39:14.311450 [debug] [Thread-1 (]: SQL status: OK in 0.311 seconds
[0m16:39:14.314571 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:14.314571 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:39:14.314571 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.316886 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:39:14.317403 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:14.317403 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:39:14.446354 [debug] [Thread-1 (]: SQL status: OK in 0.130 seconds
[0m16:39:14.450045 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:14.450045 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:39:14.451064 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.451571 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:39:14.451571 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001235486A5D0>]}
[0m16:39:14.452602 [info ] [Thread-1 (]: 4 of 10 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.46s]
[0m16:39:14.452602 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:39:14.452602 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:39:14.454110 [info ] [Thread-1 (]: 5 of 10 START sql table model main.fato_resumo_financeiro ...................... [RUN]
[0m16:39:14.454110 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:39:14.454110 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:39:14.456329 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:14.457846 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:39:14.462180 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:14.463191 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:14.463801 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:39:14.463801 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:14.464345 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.464345 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:14.464345 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m16:39:14.627610 [debug] [Thread-1 (]: SQL status: OK in 0.163 seconds
[0m16:39:14.628616 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:14.628616 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:39:14.630101 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.631145 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:14.631658 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:39:14.632368 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.634485 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:14.634485 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:39:14.635026 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.637549 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:14.637549 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:39:14.637549 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.639317 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:39:14.639317 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:14.639317 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:39:14.708148 [debug] [Thread-1 (]: SQL status: OK in 0.068 seconds
[0m16:39:14.709912 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:14.711471 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:39:14.712834 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.714114 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:39:14.714114 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001235478F6E0>]}
[0m16:39:14.715124 [info ] [Thread-1 (]: 5 of 10 OK created sql table model main.fato_resumo_financeiro ................. [[32mOK[0m in 0.26s]
[0m16:39:14.716131 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:39:14.717375 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:39:14.717375 [info ] [Thread-1 (]: 6 of 10 START seed file main.seed_dim_faixa_vencimento ......................... [RUN]
[0m16:39:14.718093 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:39:14.718755 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:39:14.718755 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:39:14.735868 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:39:14.735868 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:39:14.735868 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:14.735868 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.735868 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:39:14.737420 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */
truncate table "gold_warehouse"."main"."seed_dim_faixa_vencimento"
[0m16:39:14.737990 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.748826 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:39:14.748826 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:39:14.753978 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:14.758820 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:39:14.760008 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:39:14.761533 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:39:14.762228 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:39:14.764751 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:14.766274 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:39:14.766825 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000012354174560>]}
[0m16:39:14.766825 [info ] [Thread-1 (]: 6 of 10 OK loaded seed file main.seed_dim_faixa_vencimento ..................... [[32mINSERT 7[0m in 0.05s]
[0m16:39:14.767871 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:39:14.767871 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:39:14.768877 [info ] [Thread-1 (]: 7 of 10 START seed file main.seed_dim_produto_credito .......................... [RUN]
[0m16:39:14.768877 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:39:14.769886 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:39:14.769886 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:39:14.773985 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:39:14.773985 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:39:14.775652 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:14.775955 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.775955 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:39:14.776661 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */
truncate table "gold_warehouse"."main"."seed_dim_produto_credito"
[0m16:39:14.777167 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.777707 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:39:14.778371 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:39:14.780621 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:14.781141 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:39:14.782866 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:39:14.783391 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:39:14.783391 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:39:14.784743 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.785794 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:39:14.785794 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001235486DFA0>]}
[0m16:39:14.786780 [info ] [Thread-1 (]: 7 of 10 OK loaded seed file main.seed_dim_produto_credito ...................... [[32mINSERT 14[0m in 0.02s]
[0m16:39:14.787761 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:39:14.788273 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:39:14.788778 [info ] [Thread-1 (]: 8 of 10 START sql table model main.dim_faixa_vencimento ........................ [RUN]
[0m16:39:14.789386 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:39:14.789386 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:39:14.791395 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:14.792399 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:39:14.796215 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:14.797375 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:14.797375 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:39:14.797375 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:14.798385 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.799386 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:14.799386 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:39:14.799930 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.801535 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:14.801535 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:39:14.802543 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.802543 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:14.802543 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:39:14.804047 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.807774 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:14.808352 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m16:39:14.809404 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.812959 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:14.812959 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:39:14.813910 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.816061 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:39:14.816061 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:14.817172 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:39:14.818712 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.820720 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:14.820720 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:39:14.822494 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.824221 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:39:14.824221 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001235476B470>]}
[0m16:39:14.825838 [info ] [Thread-1 (]: 8 of 10 OK created sql table model main.dim_faixa_vencimento ................... [[32mOK[0m in 0.04s]
[0m16:39:14.827368 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:39:14.827368 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:39:14.827937 [info ] [Thread-1 (]: 9 of 10 START sql table model main.dim_produto_credito ......................... [RUN]
[0m16:39:14.828949 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:39:14.829458 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:39:14.831207 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:14.831882 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:39:14.836601 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:14.837598 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:14.838879 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:39:14.838879 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:14.839489 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.840506 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:14.840506 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:39:14.841512 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.845119 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:14.845119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:39:14.846541 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.847554 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:14.848086 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:39:14.848086 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.851760 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:14.851760 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m16:39:14.852775 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.856722 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:14.856722 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:39:14.858788 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.859974 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:39:14.861513 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:14.862111 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:39:14.863572 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.866117 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:14.867299 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:39:14.868881 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.868881 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:39:14.870436 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001235478FF50>]}
[0m16:39:14.871012 [info ] [Thread-1 (]: 9 of 10 OK created sql table model main.dim_produto_credito .................... [[32mOK[0m in 0.04s]
[0m16:39:14.872064 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:39:14.873238 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:39:14.874443 [info ] [Thread-1 (]: 10 of 10 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:39:14.875458 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:39:14.875970 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:39:14.879614 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:14.881333 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:39:14.886654 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:14.887671 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:14.888184 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:39:14.888184 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:14.889416 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.889416 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:14.890018 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:39:27.663890 [debug] [Thread-1 (]: SQL status: OK in 12.773 seconds
[0m16:39:27.664897 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:27.664897 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:39:27.665916 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:27.665916 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:27.667051 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:39:27.667601 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:27.669314 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:27.670314 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto" rename to "fato_carteira_credito_produto__dbt_backup"
[0m16:39:27.670930 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:27.671965 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:27.673078 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:39:27.673078 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:27.674604 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:39:27.674604 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:27.674604 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:39:27.711274 [debug] [Thread-1 (]: SQL status: OK in 0.036 seconds
[0m16:39:27.714091 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:27.715127 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:39:27.717133 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:27.718778 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:39:27.719323 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '6d17d88c-8d44-41ae-b134-953d064aa198', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000123541B8200>]}
[0m16:39:27.719888 [info ] [Thread-1 (]: 10 of 10 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 12.84s]
[0m16:39:27.720413 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:39:27.721460 [debug] [MainThread]: Using duckdb connection "master"
[0m16:39:27.722005 [debug] [MainThread]: On master: BEGIN
[0m16:39:27.722005 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:39:27.722559 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:39:27.722559 [debug] [MainThread]: On master: COMMIT
[0m16:39:27.723091 [debug] [MainThread]: Using duckdb connection "master"
[0m16:39:27.723091 [debug] [MainThread]: On master: COMMIT
[0m16:39:27.723631 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:39:27.723631 [debug] [MainThread]: On master: Close
[0m16:39:27.724159 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:39:27.724159 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:39:27.724779 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:39:27.724779 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_carteira_credito_produto' was properly closed.
[0m16:39:27.724779 [info ] [MainThread]: 
[0m16:39:27.724779 [info ] [MainThread]: Finished running 2 seeds, 8 table models in 0 hours 0 minutes and 14.85 seconds (14.85s).
[0m16:39:27.726880 [debug] [MainThread]: Command end result
[0m16:39:27.747572 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:39:27.750242 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:39:27.756034 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:39:27.756034 [info ] [MainThread]: 
[0m16:39:27.757054 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:39:27.757561 [info ] [MainThread]: 
[0m16:39:27.758165 [info ] [MainThread]: Done. PASS=10 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=10
[0m16:39:27.759894 [debug] [MainThread]: Command `dbt build` succeeded at 16:39:27.759894 after 15.96 seconds
[0m16:39:27.759894 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000012351FC1460>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000012351FC21E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000012351FC0A70>]}
[0m16:39:27.759894 [debug] [MainThread]: Flushing usage events
[0m16:39:28.505723 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:44:19.146896 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000296ECAC84D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000296EC5D2240>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000296ECAC8680>]}


============================== 16:44:19.150948 | 36a536b4-3db5-4ec8-b318-4e960a6efe31 ==============================
[0m16:44:19.150948 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:44:19.151454 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'None', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt seed', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:44:19.362730 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '36a536b4-3db5-4ec8-b318-4e960a6efe31', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000296EEAD3590>]}
[0m16:44:19.412605 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '36a536b4-3db5-4ec8-b318-4e960a6efe31', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000296ED5E0470>]}
[0m16:44:19.414957 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:44:19.670925 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:44:19.779291 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 4 files added, 0 files changed.
[0m16:44:19.779291 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://seeds\seed_dim_atividade.csv
[0m16:44:19.779291 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://seeds\seed_dim_risco.csv
[0m16:44:19.779291 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://seeds\seed_dim_regiao.csv
[0m16:44:19.779291 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://seeds\seed_dim_porte.csv
[0m16:44:19.964056 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m16:44:19.974575 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '36a536b4-3db5-4ec8-b318-4e960a6efe31', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000296EF145340>]}
[0m16:44:20.037662 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:44:20.040636 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:44:20.074345 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '36a536b4-3db5-4ec8-b318-4e960a6efe31', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000296EEF55FA0>]}
[0m16:44:20.074854 [info ] [MainThread]: Found 8 models, 6 seeds, 19 sources, 472 macros
[0m16:44:20.075861 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '36a536b4-3db5-4ec8-b318-4e960a6efe31', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000296EEB07D70>]}
[0m16:44:20.077372 [info ] [MainThread]: 
[0m16:44:20.077372 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:44:20.077372 [info ] [MainThread]: 
[0m16:44:20.078886 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:44:20.083620 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:44:20.175881 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:44:20.176393 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:44:20.176393 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:44:20.367397 [debug] [ThreadPool]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:44:20.367955 [debug] [ThreadPool]: DuckDB adapter: Rolling back transaction.
[0m16:44:20.368467 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:44:20.368467 [debug] [MainThread]: Connection 'list_gold_warehouse' was properly closed.
[0m16:44:20.369473 [info ] [MainThread]: 
[0m16:44:20.370472 [info ] [MainThread]: Finished running  in 0 hours 0 minutes and 0.29 seconds (0.29s).
[0m16:44:20.370472 [error] [MainThread]: Encountered an error:
Runtime Error
  'utf-8' codec can't decode byte 0xe1 in position 115: invalid continuation byte
[0m16:44:20.372603 [debug] [MainThread]: Command `dbt seed` failed at 16:44:20.372603 after 1.52 seconds
[0m16:44:20.372603 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000296ECF4B7A0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000296EED0FC80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000296EEFA3020>]}
[0m16:44:20.374112 [debug] [MainThread]: Flushing usage events
[0m16:44:21.040079 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:45:51.667004 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E74540F50>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E745419D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E74BF6AE0>]}


============================== 16:45:51.672631 | 31c01394-af70-4990-a882-a04fd37b6fdc ==============================
[0m16:45:51.672631 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:45:51.672631 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'None', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt seed', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:45:51.864984 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '31c01394-af70-4990-a882-a04fd37b6fdc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E76684B00>]}
[0m16:45:51.910746 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '31c01394-af70-4990-a882-a04fd37b6fdc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E7662B290>]}
[0m16:45:51.912948 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:45:52.142246 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:45:52.242275 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 4 files added, 2 files changed.
[0m16:45:52.242275 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\dim_regiao.sql
[0m16:45:52.242275 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\dim_risco.sql
[0m16:45:52.242275 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\dim_porte.sql
[0m16:45:52.243939 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\dim_atividade.sql
[0m16:45:52.243939 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://seeds\seed_dim_faixa_vencimento.csv
[0m16:45:52.243939 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://seeds\seed_dim_produto_credito.csv
[0m16:45:52.572466 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m16:45:52.582327 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '31c01394-af70-4990-a882-a04fd37b6fdc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E76C6B590>]}
[0m16:45:52.639584 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:45:52.640592 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:45:52.717111 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '31c01394-af70-4990-a882-a04fd37b6fdc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E76CA2150>]}
[0m16:45:52.717111 [info ] [MainThread]: Found 12 models, 6 seeds, 19 sources, 472 macros
[0m16:45:52.718626 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '31c01394-af70-4990-a882-a04fd37b6fdc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E769AFEC0>]}
[0m16:45:52.721136 [info ] [MainThread]: 
[0m16:45:52.722142 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:45:52.722646 [info ] [MainThread]: 
[0m16:45:52.722646 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:45:52.727418 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:45:52.807927 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:45:52.808594 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:45:52.808594 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:45:52.900808 [debug] [ThreadPool]: SQL status: OK in 0.092 seconds
[0m16:45:52.901313 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:45:52.901959 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:45:52.902964 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:45:52.908054 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:45:52.908568 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:45:52.908568 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:45:52.910276 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:45:52.911314 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:45:52.911314 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:45:52.912429 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:45:52.912429 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:45:52.912960 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:45:52.912960 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:45:52.914028 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:45:52.914028 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:45:52.914028 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:45:52.915034 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:45:52.915034 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:45:52.917039 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:45:52.921110 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:45:52.921110 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:45:52.922117 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:45:52.922623 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:45:52.922623 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:45:52.922623 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:45:52.933983 [debug] [ThreadPool]: SQL status: OK in 0.011 seconds
[0m16:45:52.935007 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:45:52.936004 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:45:52.936004 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:45:52.937526 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '31c01394-af70-4990-a882-a04fd37b6fdc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E76ECE1E0>]}
[0m16:45:52.937526 [debug] [MainThread]: Using duckdb connection "master"
[0m16:45:52.938556 [debug] [MainThread]: On master: BEGIN
[0m16:45:52.938556 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:45:52.938556 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:45:52.938556 [debug] [MainThread]: On master: COMMIT
[0m16:45:52.938556 [debug] [MainThread]: Using duckdb connection "master"
[0m16:45:52.939638 [debug] [MainThread]: On master: COMMIT
[0m16:45:52.939638 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:45:52.939638 [debug] [MainThread]: On master: Close
[0m16:45:52.942615 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:45:52.943684 [info ] [Thread-1 (]: 1 of 6 START seed file main.seed_dim_atividade ................................. [RUN]
[0m16:45:52.944723 [debug] [Thread-1 (]: Acquiring new duckdb connection 'seed.bacen_ifdata_analytics.seed_dim_atividade'
[0m16:45:52.944723 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:45:52.944723 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:45:52.964494 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:52.964494 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:45:52.966048 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:45:52.966048 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:52.967138 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:52.967138 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m16:45:52.968968 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:52.977297 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:52.978821 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:52.982319 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:52.985885 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:52.997868 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:45:52.997868 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:52.998849 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:45:53.003472 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:53.005042 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:45:53.007185 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '31c01394-af70-4990-a882-a04fd37b6fdc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E76C68560>]}
[0m16:45:53.007185 [info ] [Thread-1 (]: 1 of 6 OK loaded seed file main.seed_dim_atividade ............................. [[32mINSERT 10[0m in 0.06s]
[0m16:45:53.008237 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:45:53.008755 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:45:53.008755 [info ] [Thread-1 (]: 2 of 6 START seed file main.seed_dim_faixa_vencimento .......................... [RUN]
[0m16:45:53.009760 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:45:53.009760 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:45:53.009760 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:45:53.021875 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:53.022381 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:45:53.022381 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:53.022381 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:53.022381 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:53.022381 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */
truncate table "gold_warehouse"."main"."seed_dim_faixa_vencimento"
[0m16:45:53.023886 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:53.025459 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:53.025459 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:53.027150 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:53.027150 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:53.033352 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:45:53.033352 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:53.034358 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:45:53.035866 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:53.036869 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:45:53.036869 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '31c01394-af70-4990-a882-a04fd37b6fdc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E76FAB020>]}
[0m16:45:53.037916 [info ] [Thread-1 (]: 2 of 6 OK loaded seed file main.seed_dim_faixa_vencimento ...................... [[32mINSERT 7[0m in 0.03s]
[0m16:45:53.039653 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:45:53.039653 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:45:53.040659 [info ] [Thread-1 (]: 3 of 6 START seed file main.seed_dim_porte ..................................... [RUN]
[0m16:45:53.041664 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:45:53.041664 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:45:53.042661 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:45:53.045152 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:53.046212 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:45:53.046212 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:53.046716 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:53.046716 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:53.046716 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m16:45:53.047723 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:53.049741 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:53.050264 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:53.053967 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:53.054990 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:53.056028 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:45:53.056028 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:53.056028 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:45:53.058277 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:53.058794 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:45:53.059464 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '31c01394-af70-4990-a882-a04fd37b6fdc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E77077FB0>]}
[0m16:45:53.060475 [info ] [Thread-1 (]: 3 of 6 OK loaded seed file main.seed_dim_porte ................................. [[32mINSERT 6[0m in 0.02s]
[0m16:45:53.061983 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:45:53.063182 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:45:53.063797 [info ] [Thread-1 (]: 4 of 6 START seed file main.seed_dim_produto_credito ........................... [RUN]
[0m16:45:53.065458 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:45:53.065983 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:45:53.065983 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:45:53.074304 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:53.074811 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:45:53.074811 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:53.075818 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:53.076828 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:53.076828 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */
truncate table "gold_warehouse"."main"."seed_dim_produto_credito"
[0m16:45:53.077334 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:53.079772 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:53.079772 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:53.083787 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:53.084292 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:53.087305 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:45:53.087812 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:53.087812 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:45:53.090431 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:53.091425 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:45:53.092425 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '31c01394-af70-4990-a882-a04fd37b6fdc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E77063CE0>]}
[0m16:45:53.092933 [info ] [Thread-1 (]: 4 of 6 OK loaded seed file main.seed_dim_produto_credito ....................... [[32mINSERT 14[0m in 0.03s]
[0m16:45:53.093941 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:45:53.093941 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:45:53.095457 [info ] [Thread-1 (]: 5 of 6 START seed file main.seed_dim_regiao .................................... [RUN]
[0m16:45:53.095982 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:45:53.096537 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:45:53.097542 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:45:53.102698 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:53.102698 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:45:53.104207 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:53.104207 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:53.105218 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:53.105218 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m16:45:53.106315 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:53.107835 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:53.108343 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:53.112002 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:53.113070 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:53.116284 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:45:53.116792 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:53.117366 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:45:53.119460 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:53.121405 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:45:53.121929 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '31c01394-af70-4990-a882-a04fd37b6fdc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E7709A060>]}
[0m16:45:53.122981 [info ] [Thread-1 (]: 5 of 6 OK loaded seed file main.seed_dim_regiao ................................ [[32mINSERT 7[0m in 0.03s]
[0m16:45:53.124585 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:45:53.125112 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:45:53.125628 [info ] [Thread-1 (]: 6 of 6 START seed file main.seed_dim_risco ..................................... [RUN]
[0m16:45:53.126700 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:45:53.128216 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:45:53.128736 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:45:53.132417 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:53.132936 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:45:53.133496 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:53.134012 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:53.134547 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:53.134547 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m16:45:53.135557 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:53.137555 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:53.138061 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:53.141877 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:53.143101 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:53.146726 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:45:53.146726 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:53.146726 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:45:53.148734 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:53.150401 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:45:53.150401 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '31c01394-af70-4990-a882-a04fd37b6fdc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E770A5E50>]}
[0m16:45:53.151948 [info ] [Thread-1 (]: 6 of 6 OK loaded seed file main.seed_dim_risco ................................. [[32mINSERT 10[0m in 0.02s]
[0m16:45:53.152473 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:45:53.154034 [debug] [MainThread]: Using duckdb connection "master"
[0m16:45:53.154564 [debug] [MainThread]: On master: BEGIN
[0m16:45:53.155073 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:45:53.156136 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:45:53.156136 [debug] [MainThread]: On master: COMMIT
[0m16:45:53.156666 [debug] [MainThread]: Using duckdb connection "master"
[0m16:45:53.156666 [debug] [MainThread]: On master: COMMIT
[0m16:45:53.157180 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:45:53.157757 [debug] [MainThread]: On master: Close
[0m16:45:53.157757 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:45:53.158266 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:45:53.158266 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:45:53.158782 [debug] [MainThread]: Connection 'seed.bacen_ifdata_analytics.seed_dim_risco' was properly closed.
[0m16:45:53.158782 [info ] [MainThread]: 
[0m16:45:53.159305 [info ] [MainThread]: Finished running 6 seeds in 0 hours 0 minutes and 0.44 seconds (0.44s).
[0m16:45:53.160872 [debug] [MainThread]: Command end result
[0m16:45:53.182098 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:45:53.184192 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:45:53.189658 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:45:53.190224 [info ] [MainThread]: 
[0m16:45:53.190224 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:45:53.191230 [info ] [MainThread]: 
[0m16:45:53.191230 [info ] [MainThread]: Done. PASS=6 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=6
[0m16:45:53.192741 [debug] [MainThread]: Command `dbt seed` succeeded at 16:45:53.192741 after 1.66 seconds
[0m16:45:53.193347 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E75467FB0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E77097E30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026E77097DD0>]}
[0m16:45:53.193867 [debug] [MainThread]: Flushing usage events
[0m16:45:54.143830 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:47:05.662547 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86CCE8530>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86CCE89B0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86CCEB830>]}


============================== 16:47:05.666091 | cea98cb4-1bef-4b4f-93d0-1acf50fa3490 ==============================
[0m16:47:05.666091 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:47:05.667128 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:47:05.874881 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F869CF4B00>]}
[0m16:47:05.930787 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86CA349B0>]}
[0m16:47:05.933382 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:47:06.197758 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:47:06.297850 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 4 files added, 0 files changed.
[0m16:47:06.297850 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\fato_risco_credito.sql
[0m16:47:06.298832 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\fato_carteira_credito_atividade.sql
[0m16:47:06.298832 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\fato_regiao_credito.sql
[0m16:47:06.299350 [debug] [MainThread]: Partial parsing: added file: bacen_ifdata_analytics://models\gold\fato_carteira_credito_porte.sql
[0m16:47:06.497088 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m16:47:06.505953 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86E173590>]}
[0m16:47:06.566654 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:47:06.568910 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:47:06.608672 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86E7AB5F0>]}
[0m16:47:06.608672 [info ] [MainThread]: Found 16 models, 6 seeds, 19 sources, 472 macros
[0m16:47:06.612222 [info ] [MainThread]: 
[0m16:47:06.612222 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:47:06.613235 [info ] [MainThread]: 
[0m16:47:06.613235 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:47:06.617868 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:47:06.742145 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:47:06.743721 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:47:06.743721 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:47:06.876061 [debug] [ThreadPool]: SQL status: OK in 0.133 seconds
[0m16:47:06.877305 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:47:06.877305 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:47:06.877305 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:47:06.883392 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:47:06.883928 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:47:06.884453 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:47:06.884453 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:47:06.885487 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:47:06.885487 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:47:06.886488 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:47:06.887123 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:47:06.887123 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:47:06.887657 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:47:06.887657 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:47:06.888667 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:47:06.888667 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:47:06.889176 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:47:06.889176 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:47:06.891213 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:47:06.895315 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:47:06.895315 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:47:06.895315 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:47:06.896339 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:47:06.896339 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:47:06.896339 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:47:06.905913 [debug] [ThreadPool]: SQL status: OK in 0.010 seconds
[0m16:47:06.908068 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:47:06.909166 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:47:06.909166 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:47:06.910193 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86E113CE0>]}
[0m16:47:06.911719 [debug] [MainThread]: Using duckdb connection "master"
[0m16:47:06.911719 [debug] [MainThread]: On master: BEGIN
[0m16:47:06.912325 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:47:06.912903 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:47:06.912903 [debug] [MainThread]: On master: COMMIT
[0m16:47:06.912903 [debug] [MainThread]: Using duckdb connection "master"
[0m16:47:06.913481 [debug] [MainThread]: On master: COMMIT
[0m16:47:06.913481 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:47:06.914085 [debug] [MainThread]: On master: Close
[0m16:47:06.917159 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:47:06.917159 [info ] [Thread-1 (]: 1 of 22 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:47:06.918374 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:47:06.918374 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:47:06.922692 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:47:06.924215 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:47:06.949409 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:47:06.950754 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:47:06.951331 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:47:06.951331 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:47:06.952062 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:06.952062 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:47:06.953105 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento_resolucao,
        'Instituicao Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m16:47:07.056687 [debug] [Thread-1 (]: SQL status: OK in 0.104 seconds
[0m16:47:07.061720 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:47:07.062775 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:47:07.063904 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:07.064975 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:47:07.065546 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:47:07.066678 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:07.071132 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:47:07.071688 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:47:07.072227 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:07.074413 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:47:07.074923 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:47:07.075447 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:07.085458 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:47:07.085458 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:47:07.086467 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:47:07.122790 [debug] [Thread-1 (]: SQL status: OK in 0.036 seconds
[0m16:47:07.127103 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:47:07.127614 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:47:07.128630 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:07.130831 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:47:07.132054 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86E78D850>]}
[0m16:47:07.133069 [info ] [Thread-1 (]: 1 of 22 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.21s]
[0m16:47:07.133578 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:47:07.134089 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:47:07.134089 [info ] [Thread-1 (]: 2 of 22 START sql table model main.dim_tempo ................................... [RUN]
[0m16:47:07.135103 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:47:07.135103 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:47:07.138832 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:47:07.139437 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:47:07.142450 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:47:07.142959 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:47:07.142959 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:47:07.143967 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:07.143967 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:07.143967 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:47:07.145039 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:47:07.162388 [debug] [Thread-1 (]: SQL status: OK in 0.017 seconds
[0m16:47:07.163666 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:47:07.164298 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:47:07.164298 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:07.165308 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:47:07.166863 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:47:07.168671 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:07.170682 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:47:07.170682 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:47:07.172450 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:07.174038 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:47:07.174038 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:47:07.174038 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:07.176779 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:47:07.176779 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:47:07.177313 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:47:07.177313 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:07.180419 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:47:07.180419 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:47:07.181754 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:07.182411 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:47:07.183003 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86ED8D3D0>]}
[0m16:47:07.183606 [info ] [Thread-1 (]: 2 of 22 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.05s]
[0m16:47:07.184148 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:47:07.184148 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:47:07.184148 [info ] [Thread-1 (]: 3 of 22 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:47:07.185157 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:47:07.185157 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:47:07.189271 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:47:07.189271 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:47:07.191972 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:47:07.192941 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:47:07.192941 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:47:07.192941 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:07.194080 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:07.194080 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:47:07.194080 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH ativos_passivos AS (
    -- Conglomerados Prudenciais
    SELECT 
        a.codigo, 
        a.data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."prudential_conglomerates_assets" a
    JOIN "bronze"."main"."prudential_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        a.codigo, 
        a.data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."financial_conglomerates_assets" a
    JOIN "bronze"."main"."financial_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT 
        a.codigo, 
        a.data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."individual_institutions_assets" a
    JOIN "bronze"."main"."individual_institutions_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base
)

SELECT
    md5(cast(ap.codigo as varchar)) as id_instituicao,
    strftime(ap.data_base, '%Y%m%d')::int as id_data,
    ap.disponibilidades,
    ap.operacoes_de_credito,
    ap.tvm as titulos_valores_mobiliarios,
    ap.ativo_total,
    ap.depositos_vista,
    ap.depositos_a_prazo,
    ap.captacoes,
    ap.patrimonio_liquido,
    ap.passivo_total
FROM ativos_passivos ap
    );
  
  
[0m16:47:07.455944 [debug] [Thread-1 (]: SQL status: OK in 0.261 seconds
[0m16:47:07.455944 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:47:07.455944 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:47:07.457746 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:07.458853 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:47:07.459470 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:47:07.459470 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:07.462180 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:47:07.462180 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:47:07.462990 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:07.464991 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:47:07.464991 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:47:07.464991 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:07.466715 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:47:07.466715 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:47:07.467487 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:47:07.711652 [debug] [Thread-1 (]: SQL status: OK in 0.244 seconds
[0m16:47:07.714324 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:47:07.714866 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:47:07.717815 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:47:07.719330 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:47:07.719330 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86E738D70>]}
[0m16:47:07.720336 [info ] [Thread-1 (]: 3 of 22 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.53s]
[0m16:47:07.720911 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:47:07.720911 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:47:07.721917 [info ] [Thread-1 (]: 4 of 22 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:47:07.721917 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:47:07.721917 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:47:07.725534 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:47:07.726563 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:47:07.729870 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:47:07.730924 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:47:07.731548 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:47:07.732081 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:07.732081 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:07.733088 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:47:07.733594 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."prudential_conglomerates_income_statement"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."financial_conglomerates_income_statement"

    UNION ALL

    -- Instituições Individuais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."individual_institutions_income_statement"
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    rendas_operacoes_de_credito,
    receitas_intermediacao_financeira,
    despesas_captacao,
    despesas_intermediacao_financeira,
    resultado_intermediacao_financeira,
    rendas_prestacao_servicos,
    despesas_pessoal,
    despesas_administrativas,
    resultado_operacional,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas
FROM dre
    );
  
  
[0m16:47:08.049958 [debug] [Thread-1 (]: SQL status: OK in 0.316 seconds
[0m16:47:08.051504 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:47:08.052027 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:47:08.052027 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.053056 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:47:08.054040 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:47:08.054570 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.056113 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:47:08.056113 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado" rename to "fato_demonstracao_resultado__dbt_backup"
[0m16:47:08.057818 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.059636 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:47:08.060315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:47:08.060315 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.062936 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:47:08.062936 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:47:08.063476 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:47:08.195100 [debug] [Thread-1 (]: SQL status: OK in 0.132 seconds
[0m16:47:08.196881 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:47:08.197915 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:47:08.198896 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.201213 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:47:08.201903 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86ED6D280>]}
[0m16:47:08.201903 [info ] [Thread-1 (]: 4 of 22 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.48s]
[0m16:47:08.202582 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:47:08.203367 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:47:08.203883 [info ] [Thread-1 (]: 5 of 22 START sql table model main.fato_resumo_financeiro ...................... [RUN]
[0m16:47:08.203883 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:47:08.204555 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:47:08.206583 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:47:08.208099 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:47:08.211505 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:47:08.212261 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:47:08.213275 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:47:08.213275 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.214328 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.214328 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:47:08.215361 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m16:47:08.379771 [debug] [Thread-1 (]: SQL status: OK in 0.164 seconds
[0m16:47:08.381310 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:47:08.381310 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:47:08.381816 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.383404 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:47:08.383404 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:47:08.384409 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.386460 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:47:08.387443 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:47:08.387443 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.390356 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:47:08.390356 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:47:08.391358 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.392883 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:47:08.392883 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:47:08.392883 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:47:08.454883 [debug] [Thread-1 (]: SQL status: OK in 0.061 seconds
[0m16:47:08.456521 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:47:08.456521 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:47:08.458700 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.459764 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:47:08.459764 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86E73BA70>]}
[0m16:47:08.461283 [info ] [Thread-1 (]: 5 of 22 OK created sql table model main.fato_resumo_financeiro ................. [[32mOK[0m in 0.26s]
[0m16:47:08.461827 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:47:08.461827 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:47:08.462358 [info ] [Thread-1 (]: 6 of 22 START seed file main.seed_dim_atividade ................................ [RUN]
[0m16:47:08.462358 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m16:47:08.462358 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:47:08.463239 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:47:08.481772 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:47:08.483291 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:47:08.483291 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.483291 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.483291 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:47:08.484316 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */
truncate table "gold_warehouse"."main"."seed_dim_atividade"
[0m16:47:08.485439 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.496791 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:47:08.497824 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:47:08.503278 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:47:08.508464 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:47:08.509770 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:47:08.509770 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:47:08.511285 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:47:08.512315 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.513826 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:47:08.513826 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86EDE7FB0>]}
[0m16:47:08.514521 [info ] [Thread-1 (]: 6 of 22 OK loaded seed file main.seed_dim_atividade ............................ [[32mINSERT 10[0m in 0.05s]
[0m16:47:08.514521 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:47:08.514521 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:47:08.514521 [info ] [Thread-1 (]: 7 of 22 START seed file main.seed_dim_faixa_vencimento ......................... [RUN]
[0m16:47:08.516209 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:47:08.516209 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:47:08.516209 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:47:08.520570 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:47:08.521175 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:47:08.521175 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.521175 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.522187 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:47:08.522187 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */
truncate table "gold_warehouse"."main"."seed_dim_faixa_vencimento"
[0m16:47:08.522187 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.523205 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:47:08.524204 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:47:08.525773 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.525773 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:47:08.527303 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:47:08.527303 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:47:08.527303 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:47:08.529380 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.529380 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:47:08.531117 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86E0C9220>]}
[0m16:47:08.531117 [info ] [Thread-1 (]: 7 of 22 OK loaded seed file main.seed_dim_faixa_vencimento ..................... [[32mINSERT 7[0m in 0.01s]
[0m16:47:08.531744 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:47:08.532325 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:47:08.532325 [info ] [Thread-1 (]: 8 of 22 START seed file main.seed_dim_porte .................................... [RUN]
[0m16:47:08.533834 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:47:08.533834 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:47:08.534368 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:47:08.538528 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:47:08.539050 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:47:08.539050 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.539050 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.540062 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:47:08.540062 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */
truncate table "gold_warehouse"."main"."seed_dim_porte"
[0m16:47:08.541065 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.542567 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:47:08.542567 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:47:08.543570 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.545311 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:47:08.546896 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:47:08.548017 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:47:08.548526 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:47:08.550558 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:47:08.551586 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:47:08.551586 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86E5238C0>]}
[0m16:47:08.552692 [info ] [Thread-1 (]: 8 of 22 OK loaded seed file main.seed_dim_porte ................................ [[32mINSERT 6[0m in 0.02s]
[0m16:47:08.552692 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:47:08.554202 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:47:08.554202 [info ] [Thread-1 (]: 9 of 22 START seed file main.seed_dim_produto_credito .......................... [RUN]
[0m16:47:08.555209 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:47:08.555738 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:47:08.556301 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:47:08.559522 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:47:08.560546 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:47:08.560546 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.562027 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.563015 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:47:08.563955 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */
truncate table "gold_warehouse"."main"."seed_dim_produto_credito"
[0m16:47:08.564462 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.565980 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:47:08.565980 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:47:08.568652 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:47:08.569658 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:47:08.571163 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:47:08.572169 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:47:08.572169 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:47:08.573178 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.574174 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:47:08.574677 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F869CA2150>]}
[0m16:47:08.574677 [info ] [Thread-1 (]: 9 of 22 OK loaded seed file main.seed_dim_produto_credito ...................... [[32mINSERT 14[0m in 0.02s]
[0m16:47:08.575683 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:47:08.576690 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:47:08.577194 [info ] [Thread-1 (]: 10 of 22 START seed file main.seed_dim_regiao .................................. [RUN]
[0m16:47:08.577194 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:47:08.577194 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:47:08.577194 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:47:08.584836 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:47:08.584836 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:47:08.585881 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.585881 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.585881 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:47:08.585881 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */
truncate table "gold_warehouse"."main"."seed_dim_regiao"
[0m16:47:08.585881 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.587388 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:47:08.587388 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:47:08.589440 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.590446 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:47:08.591444 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:47:08.592447 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:47:08.592447 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:47:08.593987 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.594577 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:47:08.595092 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86EDD89B0>]}
[0m16:47:08.595661 [info ] [Thread-1 (]: 10 of 22 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.02s]
[0m16:47:08.596175 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:47:08.596835 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:47:08.596835 [info ] [Thread-1 (]: 11 of 22 START seed file main.seed_dim_risco ................................... [RUN]
[0m16:47:08.597848 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:47:08.597848 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:47:08.597848 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:47:08.601975 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:47:08.602980 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:47:08.602980 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.604491 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.604491 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:47:08.605069 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */
truncate table "gold_warehouse"."main"."seed_dim_risco"
[0m16:47:08.605069 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.606580 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:47:08.606580 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:47:08.608218 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.608748 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:47:08.610734 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:47:08.612364 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:47:08.612364 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:47:08.616699 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:47:08.618336 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:47:08.618877 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86EDD95B0>]}
[0m16:47:08.618877 [info ] [Thread-1 (]: 11 of 22 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.02s]
[0m16:47:08.620405 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:47:08.620972 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:47:08.620972 [info ] [Thread-1 (]: 12 of 22 START sql table model main.dim_atividade .............................. [RUN]
[0m16:47:08.621995 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now model.bacen_ifdata_analytics.dim_atividade)
[0m16:47:08.623092 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:47:08.624597 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:47:08.626761 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:47:08.633394 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:47:08.635932 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:47:08.636934 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:47:08.636934 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.639052 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.640081 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:47:08.640081 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:47:08.641673 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.643926 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:47:08.643926 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:47:08.645945 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.647582 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:47:08.647582 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:47:08.647582 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:47:08.649597 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.652843 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:47:08.654349 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:47:08.654349 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.655860 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:47:08.655860 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86D064980>]}
[0m16:47:08.658593 [info ] [Thread-1 (]: 12 of 22 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.03s]
[0m16:47:08.660601 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:47:08.662110 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:47:08.662692 [info ] [Thread-1 (]: 13 of 22 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m16:47:08.664396 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:47:08.664943 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:47:08.668698 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:47:08.669706 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:47:08.674932 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:47:08.676962 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:47:08.677466 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:47:08.677466 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.679025 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.679534 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:47:08.679534 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:47:08.681799 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.681799 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:47:08.683367 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:47:08.684374 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.684880 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:47:08.685891 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:47:08.687398 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.691095 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:47:08.691095 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m16:47:08.692605 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.696766 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:47:08.696766 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:47:08.697771 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.699784 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:47:08.700401 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:47:08.701413 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:47:08.702926 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.704936 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:47:08.705473 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:47:08.707553 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.708734 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:47:08.708734 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F87BBC1A60>]}
[0m16:47:08.709745 [info ] [Thread-1 (]: 13 of 22 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.04s]
[0m16:47:08.709745 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:47:08.709745 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:47:08.711254 [info ] [Thread-1 (]: 14 of 22 START sql table model main.dim_porte .................................. [RUN]
[0m16:47:08.711774 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m16:47:08.711774 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:47:08.713952 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:47:08.714955 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:47:08.717032 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:47:08.718113 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:47:08.718619 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:47:08.718619 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.718619 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.719623 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:47:08.719623 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:47:08.720938 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.724069 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:47:08.724069 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:47:08.724069 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.725691 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:47:08.725691 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:47:08.725691 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:47:08.727210 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.729723 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:47:08.729723 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:47:08.730834 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.731378 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:47:08.731915 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86EE2F8C0>]}
[0m16:47:08.731915 [info ] [Thread-1 (]: 14 of 22 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.02s]
[0m16:47:08.732944 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:47:08.732944 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:47:08.733974 [info ] [Thread-1 (]: 15 of 22 START sql table model main.dim_produto_credito ........................ [RUN]
[0m16:47:08.733974 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:47:08.733974 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:47:08.735904 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:47:08.737419 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:47:08.740562 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:47:08.741537 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:47:08.742536 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:47:08.742536 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.742536 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.742536 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:47:08.742536 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:47:08.744254 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.744843 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:47:08.744843 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:47:08.746390 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.747394 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:47:08.747394 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:47:08.747394 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.749992 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:47:08.749992 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m16:47:08.751700 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.753409 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:47:08.754433 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:47:08.754433 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.756067 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:47:08.756067 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:47:08.756067 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:47:08.757656 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.759756 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:47:08.759756 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:47:08.760757 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.762436 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:47:08.763472 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86E739490>]}
[0m16:47:08.763472 [info ] [Thread-1 (]: 15 of 22 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.03s]
[0m16:47:08.764561 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:47:08.764561 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:47:08.764561 [info ] [Thread-1 (]: 16 of 22 START sql table model main.dim_regiao ................................. [RUN]
[0m16:47:08.766204 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:47:08.766204 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:47:08.768838 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:47:08.770904 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:47:08.772975 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:47:08.773991 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:47:08.773991 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:47:08.773991 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.775573 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.775573 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:47:08.776579 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:47:08.777115 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.778649 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:47:08.779679 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:47:08.779679 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.780751 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:47:08.780751 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:47:08.781832 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:47:08.781832 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.785169 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:47:08.785169 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:47:08.786175 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.786175 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:47:08.786175 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86ED47530>]}
[0m16:47:08.787680 [info ] [Thread-1 (]: 16 of 22 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.02s]
[0m16:47:08.787680 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:47:08.788685 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:47:08.789188 [info ] [Thread-1 (]: 17 of 22 START sql table model main.dim_risco .................................. [RUN]
[0m16:47:08.790193 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:47:08.790193 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:47:08.792723 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:47:08.793729 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:47:08.796245 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:47:08.797872 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:47:08.797872 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:47:08.798872 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.799376 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.799890 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:47:08.800434 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:47:08.801439 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.802460 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:47:08.803999 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:47:08.803999 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.806110 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:47:08.806110 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:47:08.806110 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:47:08.806110 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:08.808768 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:47:08.809773 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:47:08.809773 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:08.811276 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:47:08.811809 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86E35B560>]}
[0m16:47:08.812416 [info ] [Thread-1 (]: 17 of 22 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.02s]
[0m16:47:08.812416 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:47:08.813325 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:47:08.813874 [info ] [Thread-1 (]: 18 of 22 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:47:08.813874 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:47:08.814900 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:47:08.817608 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:47:08.818627 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:47:08.820639 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:47:08.822438 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:47:08.822438 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:47:08.824028 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:08.826711 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:47:08.827728 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:47:08.827728 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:47:16.199192 [debug] [Thread-1 (]: SQL status: OK in 7.371 seconds
[0m16:47:16.204995 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:47:16.205642 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:47:16.206217 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:16.207246 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:47:16.207246 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:47:16.207246 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:47:16.263870 [debug] [Thread-1 (]: SQL status: OK in 0.055 seconds
[0m16:47:16.267768 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:47:16.267768 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:47:16.268796 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:16.270336 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:47:16.270986 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F87BBDE120>]}
[0m16:47:16.272017 [info ] [Thread-1 (]: 18 of 22 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 7.46s]
[0m16:47:16.272017 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:47:16.273127 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:47:16.273127 [info ] [Thread-1 (]: 19 of 22 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:47:16.274127 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:47:16.274127 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:47:16.276914 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:47:16.278603 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:47:16.284288 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:47:16.286295 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:47:16.287319 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:47:16.287319 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:16.287319 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:16.287319 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:47:16.288928 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:47:16.585950 [debug] [Thread-1 (]: SQL status: OK in 0.297 seconds
[0m16:47:16.589602 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:47:16.590635 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:47:16.590635 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:16.593823 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:47:16.593823 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:47:16.593823 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:47:16.599015 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:47:16.601737 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:47:16.601737 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:47:16.602742 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:16.605273 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:47:16.605816 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86E3584D0>]}
[0m16:47:16.605816 [info ] [Thread-1 (]: 19 of 22 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.33s]
[0m16:47:16.607986 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:47:16.608516 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:47:16.609529 [info ] [Thread-1 (]: 20 of 22 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:47:16.610530 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:47:16.610530 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:47:16.617280 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:47:16.618851 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:47:16.621983 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:47:16.624211 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:47:16.624211 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:47:16.624211 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:16.626591 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:47:16.626591 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:47:16.627614 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:47:29.970994 [debug] [Thread-1 (]: SQL status: OK in 13.343 seconds
[0m16:47:29.972023 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:47:29.972023 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:47:29.973103 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:29.974088 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:47:29.974593 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:47:29.974593 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:29.977680 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:47:29.978185 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto" rename to "fato_carteira_credito_produto__dbt_backup"
[0m16:47:29.978690 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:29.980201 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:47:29.981205 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:47:29.981813 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:29.981813 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:47:29.983380 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:47:29.983380 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:47:30.005104 [debug] [Thread-1 (]: SQL status: OK in 0.021 seconds
[0m16:47:30.008478 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:47:30.008478 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:47:30.011599 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:47:30.013275 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:47:30.013275 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F87BC089B0>]}
[0m16:47:30.013946 [info ] [Thread-1 (]: 20 of 22 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 13.40s]
[0m16:47:30.015190 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:47:30.015736 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:47:30.016246 [info ] [Thread-1 (]: 21 of 22 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:47:30.017572 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:47:30.017572 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:47:30.019761 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:47:30.020768 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:47:30.023342 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:47:30.024850 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:47:30.024850 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:47:30.025856 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:30.025856 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:30.025856 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:47:30.026863 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao as id_localizacao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:47:30.246373 [debug] [Thread-1 (]: SQL status: OK in 0.219 seconds
[0m16:47:30.248881 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:47:30.248881 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:47:30.249393 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:30.250398 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:47:30.250398 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:47:30.251476 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:47:30.253966 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:47:30.255983 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:47:30.255983 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:47:30.255983 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:30.257746 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:47:30.258867 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86E72CA40>]}
[0m16:47:30.259876 [info ] [Thread-1 (]: 21 of 22 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.24s]
[0m16:47:30.259876 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:47:30.259876 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:47:30.261383 [info ] [Thread-1 (]: 22 of 22 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:47:30.262420 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:47:30.263126 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:47:30.264499 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:47:30.266049 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:47:30.268677 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:47:30.269683 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:47:30.270684 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:47:30.270684 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:47:30.271189 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:30.271189 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:47:30.271189 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:47:30.597676 [debug] [Thread-1 (]: SQL status: OK in 0.325 seconds
[0m16:47:30.600396 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:47:30.601419 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:47:30.601953 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:30.602964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:47:30.602964 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:47:30.602964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:47:30.606557 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:47:30.608838 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:47:30.608838 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:47:30.608838 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:47:30.609842 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:47:30.611345 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'cea98cb4-1bef-4b4f-93d0-1acf50fa3490', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86EDEC890>]}
[0m16:47:30.611345 [info ] [Thread-1 (]: 22 of 22 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.35s]
[0m16:47:30.612857 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:47:30.614359 [debug] [MainThread]: Using duckdb connection "master"
[0m16:47:30.614941 [debug] [MainThread]: On master: BEGIN
[0m16:47:30.614941 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:47:30.614941 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:47:30.614941 [debug] [MainThread]: On master: COMMIT
[0m16:47:30.614941 [debug] [MainThread]: Using duckdb connection "master"
[0m16:47:30.614941 [debug] [MainThread]: On master: COMMIT
[0m16:47:30.616448 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:47:30.616448 [debug] [MainThread]: On master: Close
[0m16:47:30.617006 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:47:30.617006 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:47:30.617006 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:47:30.617006 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_risco_credito' was properly closed.
[0m16:47:30.617006 [info ] [MainThread]: 
[0m16:47:30.618238 [info ] [MainThread]: Finished running 6 seeds, 16 table models in 0 hours 0 minutes and 24.00 seconds (24.00s).
[0m16:47:30.622785 [debug] [MainThread]: Command end result
[0m16:47:30.644324 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:47:30.646474 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:47:30.652831 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:47:30.652831 [info ] [MainThread]: 
[0m16:47:30.654341 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:47:30.655910 [info ] [MainThread]: 
[0m16:47:30.655910 [info ] [MainThread]: Done. PASS=22 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=22
[0m16:47:30.657624 [debug] [MainThread]: Command `dbt build` succeeded at 16:47:30.657624 after 25.29 seconds
[0m16:47:30.658206 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86C7F69F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86C7F6E40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F86C7F7260>]}
[0m16:47:30.658206 [debug] [MainThread]: Flushing usage events
[0m16:47:31.636316 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:52:37.316723 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B28749E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B1BF8320>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B1BF8890>]}


============================== 16:52:37.321017 | b176ca2e-7424-4633-99ba-c40944058ffe ==============================
[0m16:52:37.321017 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:52:37.321017 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'invocation_command': 'dbt build', 'use_colors': 'True', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:52:37.518652 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B1CB3C20>]}
[0m16:52:37.567042 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0AF73E330>]}
[0m16:52:37.569696 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:52:37.818466 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:52:37.924083 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 1 files changed.
[0m16:52:37.924083 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_balanco_patrimonial.sql
[0m16:52:38.122294 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m16:52:38.133299 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B41B0BC0>]}
[0m16:52:38.195111 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:52:38.196932 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:52:38.244916 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B4514830>]}
[0m16:52:38.245421 [info ] [MainThread]: Found 16 models, 6 seeds, 19 sources, 472 macros
[0m16:52:38.249570 [info ] [MainThread]: 
[0m16:52:38.250155 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:52:38.250155 [info ] [MainThread]: 
[0m16:52:38.251161 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:52:38.255869 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:52:38.339656 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:52:38.339656 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:52:38.339656 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:52:38.449336 [debug] [ThreadPool]: SQL status: OK in 0.109 seconds
[0m16:52:38.450345 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:52:38.451384 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:52:38.451890 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:52:38.502847 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:52:38.503846 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:52:38.503846 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:52:38.503846 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:52:38.505456 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:52:38.506103 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:52:38.506103 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:52:38.506103 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:52:38.506103 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:52:38.506103 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:52:38.508255 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:52:38.508255 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:52:38.508255 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:52:38.508807 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:52:38.508807 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:52:38.509818 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:52:38.514882 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:52:38.514882 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:52:38.514882 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:52:38.516395 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:52:38.516395 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:52:38.516395 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:52:38.526904 [debug] [ThreadPool]: SQL status: OK in 0.010 seconds
[0m16:52:38.527560 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:52:38.529072 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:52:38.529578 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:52:38.531774 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B4840110>]}
[0m16:52:38.531774 [debug] [MainThread]: Using duckdb connection "master"
[0m16:52:38.531774 [debug] [MainThread]: On master: BEGIN
[0m16:52:38.531774 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:52:38.531774 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:52:38.531774 [debug] [MainThread]: On master: COMMIT
[0m16:52:38.533723 [debug] [MainThread]: Using duckdb connection "master"
[0m16:52:38.533723 [debug] [MainThread]: On master: COMMIT
[0m16:52:38.534308 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:52:38.534308 [debug] [MainThread]: On master: Close
[0m16:52:38.537314 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:52:38.537314 [info ] [Thread-1 (]: 1 of 22 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:52:38.538851 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:52:38.539420 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:52:38.544939 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:52:38.545969 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:52:38.570715 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:52:38.570715 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:52:38.572487 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:52:38.572487 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:52:38.572487 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:38.572487 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:52:38.572487 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento_resolucao,
        'Instituicao Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m16:52:38.674291 [debug] [Thread-1 (]: SQL status: OK in 0.100 seconds
[0m16:52:38.678560 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:52:38.679066 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:52:38.680083 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:38.681125 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:52:38.681125 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:52:38.682215 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:38.688609 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:52:38.689188 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:52:38.690267 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:38.692911 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:52:38.694005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:52:38.694548 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:38.708197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:52:38.708741 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:52:38.709349 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:52:38.737708 [debug] [Thread-1 (]: SQL status: OK in 0.029 seconds
[0m16:52:38.742407 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:52:38.742407 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:52:38.744093 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:38.744632 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:52:38.748073 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B3E7C1D0>]}
[0m16:52:38.748623 [info ] [Thread-1 (]: 1 of 22 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.21s]
[0m16:52:38.749630 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:52:38.749630 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:52:38.750134 [info ] [Thread-1 (]: 2 of 22 START sql table model main.dim_tempo ................................... [RUN]
[0m16:52:38.750134 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:52:38.751137 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:52:38.754303 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:52:38.755820 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:52:38.758695 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:52:38.759722 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:52:38.759722 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:52:38.760707 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:38.760707 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:38.760707 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:52:38.761709 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:52:38.775991 [debug] [Thread-1 (]: SQL status: OK in 0.014 seconds
[0m16:52:38.777503 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:52:38.777503 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:52:38.778509 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:38.779626 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:52:38.779626 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:52:38.780671 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:38.782308 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:52:38.783416 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:52:38.783416 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:38.786175 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:52:38.786175 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:52:38.786175 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:38.787721 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:52:38.788837 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:52:38.788837 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:52:38.790462 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:38.791463 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:52:38.792462 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:52:38.792968 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:38.794733 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:52:38.795421 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B482AFC0>]}
[0m16:52:38.795421 [info ] [Thread-1 (]: 2 of 22 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.04s]
[0m16:52:38.796437 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:52:38.796942 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:52:38.796942 [info ] [Thread-1 (]: 3 of 22 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:52:38.796942 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:52:38.797949 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:52:38.802657 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:52:38.802657 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:52:38.806306 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:52:38.806306 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:52:38.807312 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:52:38.807312 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:38.807815 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:38.808375 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:52:38.808375 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH ativos_passivos AS (
    -- Conglomerados Prudenciais
    SELECT 
        COALESCE(a.codigo, p.codigo) as codigo, 
        COALESCE(a.data_base, p.data_base) as data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "bronze"."main"."prudential_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        COALESCE(a.codigo, p.codigo) as codigo, 
        COALESCE(a.data_base, p.data_base) as data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "bronze"."main"."financial_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT 
        COALESCE(a.codigo, p.codigo) as codigo, 
        COALESCE(a.data_base, p.data_base) as data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "bronze"."main"."individual_institutions_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base
)

SELECT
    md5(cast(ap.codigo as varchar)) as id_instituicao,
    strftime(ap.data_base, '%Y%m%d')::int as id_data,
    ap.disponibilidades,
    ap.operacoes_de_credito,
    ap.tvm as titulos_valores_mobiliarios,
    ap.ativo_total,
    ap.depositos_vista,
    ap.depositos_a_prazo,
    ap.captacoes,
    ap.patrimonio_liquido,
    ap.passivo_total
FROM ativos_passivos ap
    );
  
  
[0m16:52:39.197727 [debug] [Thread-1 (]: SQL status: OK in 0.389 seconds
[0m16:52:39.198761 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:52:39.199358 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:52:39.200526 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:39.202148 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:52:39.203153 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:52:39.204154 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:39.207912 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:52:39.208919 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:52:39.209928 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:39.212845 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:52:39.212845 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:52:39.213493 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:39.214719 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:52:39.214719 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:52:39.216236 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:52:39.491188 [debug] [Thread-1 (]: SQL status: OK in 0.274 seconds
[0m16:52:39.493442 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:52:39.493442 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:52:39.496196 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:52:39.497830 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:52:39.497830 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B3BBB710>]}
[0m16:52:39.498823 [info ] [Thread-1 (]: 3 of 22 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.70s]
[0m16:52:39.499354 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:52:39.499354 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:52:39.500368 [info ] [Thread-1 (]: 4 of 22 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:52:39.501427 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:52:39.501427 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:52:39.505957 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:52:39.507497 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:52:39.509556 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:52:39.510562 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:52:39.510562 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:52:39.511563 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:39.513191 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:39.514027 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:52:39.514658 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."prudential_conglomerates_income_statement"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."financial_conglomerates_income_statement"

    UNION ALL

    -- Instituições Individuais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."individual_institutions_income_statement"
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    rendas_operacoes_de_credito,
    receitas_intermediacao_financeira,
    despesas_captacao,
    despesas_intermediacao_financeira,
    resultado_intermediacao_financeira,
    rendas_prestacao_servicos,
    despesas_pessoal,
    despesas_administrativas,
    resultado_operacional,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas
FROM dre
    );
  
  
[0m16:52:39.851748 [debug] [Thread-1 (]: SQL status: OK in 0.337 seconds
[0m16:52:39.852818 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:52:39.852818 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:52:39.854457 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:39.855597 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:52:39.856235 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:52:39.856235 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:39.859058 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:52:39.859058 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado" rename to "fato_demonstracao_resultado__dbt_backup"
[0m16:52:39.860165 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:39.861777 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:52:39.861777 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:52:39.862555 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:39.863276 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:52:39.864092 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:52:39.864092 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:52:40.136123 [debug] [Thread-1 (]: SQL status: OK in 0.271 seconds
[0m16:52:40.137638 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:52:40.138579 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:52:40.140636 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:52:40.141688 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:52:40.141688 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B48D31A0>]}
[0m16:52:40.142664 [info ] [Thread-1 (]: 4 of 22 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.64s]
[0m16:52:40.142664 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:52:40.143773 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:52:40.144313 [info ] [Thread-1 (]: 5 of 22 START sql table model main.fato_resumo_financeiro ...................... [RUN]
[0m16:52:40.144820 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:52:40.144820 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:52:40.147401 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:52:40.148674 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:52:40.151235 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:52:40.151849 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:52:40.153060 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:52:40.153060 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.154085 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.154085 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:52:40.154085 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m16:52:40.334043 [debug] [Thread-1 (]: SQL status: OK in 0.180 seconds
[0m16:52:40.336056 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:52:40.336056 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:52:40.336056 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.337584 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:52:40.338620 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:52:40.339163 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.341223 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:52:40.341223 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:52:40.342208 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.343917 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:52:40.343917 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:52:40.344926 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.345987 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:52:40.346649 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:52:40.346649 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:52:40.417499 [debug] [Thread-1 (]: SQL status: OK in 0.071 seconds
[0m16:52:40.419817 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:52:40.419817 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:52:40.421977 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.423101 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:52:40.424101 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B407C1A0>]}
[0m16:52:40.424101 [info ] [Thread-1 (]: 5 of 22 OK created sql table model main.fato_resumo_financeiro ................. [[32mOK[0m in 0.28s]
[0m16:52:40.424642 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:52:40.424642 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:52:40.425667 [info ] [Thread-1 (]: 6 of 22 START seed file main.seed_dim_atividade ................................ [RUN]
[0m16:52:40.426352 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m16:52:40.426352 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:52:40.426907 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:52:40.445047 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:52:40.445047 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:52:40.445047 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.445047 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.446640 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:52:40.446640 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */
truncate table "gold_warehouse"."main"."seed_dim_atividade"
[0m16:52:40.447649 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.455844 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:52:40.455844 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:52:40.460296 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:52:40.465539 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:52:40.466504 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:52:40.467541 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:52:40.467541 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:52:40.468612 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.469631 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:52:40.469631 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B483E4B0>]}
[0m16:52:40.470655 [info ] [Thread-1 (]: 6 of 22 OK loaded seed file main.seed_dim_atividade ............................ [[32mINSERT 10[0m in 0.04s]
[0m16:52:40.470655 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:52:40.470655 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:52:40.472358 [info ] [Thread-1 (]: 7 of 22 START seed file main.seed_dim_faixa_vencimento ......................... [RUN]
[0m16:52:40.472358 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:52:40.472358 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:52:40.472358 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:52:40.477503 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:52:40.478542 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:52:40.478542 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.479628 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.479628 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:52:40.479628 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */
truncate table "gold_warehouse"."main"."seed_dim_faixa_vencimento"
[0m16:52:40.480686 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.480686 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:52:40.481723 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:52:40.483278 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.483820 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:52:40.484344 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:52:40.484344 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:52:40.485959 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:52:40.487523 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.487523 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:52:40.487523 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B3B65E20>]}
[0m16:52:40.487523 [info ] [Thread-1 (]: 7 of 22 OK loaded seed file main.seed_dim_faixa_vencimento ..................... [[32mINSERT 7[0m in 0.02s]
[0m16:52:40.489069 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:52:40.489718 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:52:40.489718 [info ] [Thread-1 (]: 8 of 22 START seed file main.seed_dim_porte .................................... [RUN]
[0m16:52:40.490730 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:52:40.490730 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:52:40.490730 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:52:40.494923 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:52:40.494923 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:52:40.494923 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.496504 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.496504 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:52:40.496504 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */
truncate table "gold_warehouse"."main"."seed_dim_porte"
[0m16:52:40.497522 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.498513 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:52:40.499576 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:52:40.501773 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:52:40.502785 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:52:40.505015 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:52:40.505015 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:52:40.505534 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:52:40.506702 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.508220 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:52:40.508742 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B4003200>]}
[0m16:52:40.508742 [info ] [Thread-1 (]: 8 of 22 OK loaded seed file main.seed_dim_porte ................................ [[32mINSERT 6[0m in 0.02s]
[0m16:52:40.509765 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:52:40.509765 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:52:40.509765 [info ] [Thread-1 (]: 9 of 22 START seed file main.seed_dim_produto_credito .......................... [RUN]
[0m16:52:40.510794 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:52:40.510794 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:52:40.510794 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:52:40.516254 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:52:40.516781 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:52:40.516781 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.517392 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.517392 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:52:40.518035 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */
truncate table "gold_warehouse"."main"."seed_dim_produto_credito"
[0m16:52:40.518556 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.518556 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:52:40.519583 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:52:40.522200 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:52:40.523210 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:52:40.524209 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:52:40.525426 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:52:40.525426 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:52:40.527484 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.528498 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:52:40.528498 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B4515A90>]}
[0m16:52:40.528498 [info ] [Thread-1 (]: 9 of 22 OK loaded seed file main.seed_dim_produto_credito ...................... [[32mINSERT 14[0m in 0.02s]
[0m16:52:40.529770 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:52:40.529770 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:52:40.530793 [info ] [Thread-1 (]: 10 of 22 START seed file main.seed_dim_regiao .................................. [RUN]
[0m16:52:40.531331 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:52:40.531331 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:52:40.531892 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:52:40.537275 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:52:40.537275 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:52:40.537275 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.538835 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.538835 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:52:40.539490 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */
truncate table "gold_warehouse"."main"."seed_dim_regiao"
[0m16:52:40.539490 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.540499 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:52:40.541499 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:52:40.542497 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:52:40.544162 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:52:40.545726 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:52:40.546271 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:52:40.546271 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:52:40.547943 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.547943 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:52:40.548984 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B48EFE00>]}
[0m16:52:40.549516 [info ] [Thread-1 (]: 10 of 22 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.02s]
[0m16:52:40.550203 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:52:40.551221 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:52:40.552351 [info ] [Thread-1 (]: 11 of 22 START seed file main.seed_dim_risco ................................... [RUN]
[0m16:52:40.552898 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:52:40.552898 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:52:40.552898 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:52:40.558367 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:52:40.558367 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:52:40.558951 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.558951 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.558951 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:52:40.559988 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */
truncate table "gold_warehouse"."main"."seed_dim_risco"
[0m16:52:40.559988 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.561495 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:52:40.561495 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:52:40.563799 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:52:40.564366 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:52:40.565883 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:52:40.566391 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:52:40.566912 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:52:40.568609 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.568609 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:52:40.569620 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B4831730>]}
[0m16:52:40.569620 [info ] [Thread-1 (]: 11 of 22 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.02s]
[0m16:52:40.570620 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:52:40.571183 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:52:40.571183 [info ] [Thread-1 (]: 12 of 22 START sql table model main.dim_atividade .............................. [RUN]
[0m16:52:40.572202 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now model.bacen_ifdata_analytics.dim_atividade)
[0m16:52:40.572713 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:52:40.574242 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:52:40.574242 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:52:40.578526 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:52:40.579570 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:52:40.579570 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:52:40.579570 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.579570 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.581315 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:52:40.581961 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:52:40.583023 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.584111 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:52:40.584111 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:52:40.585129 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.586152 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:52:40.586152 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:52:40.586152 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.589242 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:52:40.589242 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade" rename to "dim_atividade__dbt_backup"
[0m16:52:40.590262 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.592294 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:52:40.592294 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:52:40.593920 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.594962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:52:40.595499 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:52:40.595499 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:52:40.597349 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:52:40.600434 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:52:40.600434 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:52:40.601458 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.602511 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:52:40.602511 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B2B607A0>]}
[0m16:52:40.602511 [info ] [Thread-1 (]: 12 of 22 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.03s]
[0m16:52:40.604020 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:52:40.604020 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:52:40.605136 [info ] [Thread-1 (]: 13 of 22 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m16:52:40.605136 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:52:40.605692 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:52:40.607807 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:52:40.608823 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:52:40.611580 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:52:40.612748 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:52:40.613281 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:52:40.613281 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.613827 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.614409 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:52:40.614409 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:52:40.614949 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.616495 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:52:40.616495 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:52:40.617021 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.618233 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:52:40.618233 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:52:40.618802 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.620947 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:52:40.623012 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m16:52:40.623012 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.625616 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:52:40.625616 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:52:40.626651 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.628231 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:52:40.628804 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:52:40.628804 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:52:40.629814 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.631901 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:52:40.631901 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:52:40.633609 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.634186 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:52:40.635213 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0BA8103E0>]}
[0m16:52:40.635213 [info ] [Thread-1 (]: 13 of 22 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.03s]
[0m16:52:40.636193 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:52:40.636193 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:52:40.636193 [info ] [Thread-1 (]: 14 of 22 START sql table model main.dim_porte .................................. [RUN]
[0m16:52:40.636193 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m16:52:40.637701 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:52:40.639308 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:52:40.640357 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:52:40.643871 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:52:40.645397 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:52:40.646306 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:52:40.646821 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.647962 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.647962 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:52:40.648958 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:52:40.649599 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.650279 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:52:40.650279 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:52:40.651417 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.652027 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:52:40.652027 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:52:40.653134 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.655325 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:52:40.656042 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte" rename to "dim_porte__dbt_backup"
[0m16:52:40.656042 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.659346 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:52:40.660380 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:52:40.660380 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.661900 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:52:40.661900 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:52:40.662553 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:52:40.663732 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.665326 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:52:40.665326 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:52:40.666807 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.667375 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:52:40.667995 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B3E7CDA0>]}
[0m16:52:40.668549 [info ] [Thread-1 (]: 14 of 22 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.03s]
[0m16:52:40.668549 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:52:40.668549 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:52:40.669585 [info ] [Thread-1 (]: 15 of 22 START sql table model main.dim_produto_credito ........................ [RUN]
[0m16:52:40.669585 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:52:40.670570 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:52:40.672664 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:52:40.672664 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:52:40.675835 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:52:40.676846 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:52:40.676846 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:52:40.677356 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.677356 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.677356 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:52:40.677356 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:52:40.678897 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.679466 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:52:40.679466 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:52:40.679466 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.681294 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:52:40.681294 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:52:40.681840 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.685195 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:52:40.685195 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m16:52:40.686195 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.687721 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:52:40.687721 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:52:40.688762 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.690725 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:52:40.690725 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:52:40.690725 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:52:40.692756 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.693765 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:52:40.694926 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:52:40.696445 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.697458 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:52:40.698992 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B48EFF20>]}
[0m16:52:40.698992 [info ] [Thread-1 (]: 15 of 22 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.03s]
[0m16:52:40.700134 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:52:40.700704 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:52:40.701256 [info ] [Thread-1 (]: 16 of 22 START sql table model main.dim_regiao ................................. [RUN]
[0m16:52:40.702141 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:52:40.703189 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:52:40.705815 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:52:40.707379 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:52:40.710688 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:52:40.711687 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:52:40.712193 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:52:40.712193 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.713012 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.713522 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:52:40.714050 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:52:40.714584 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.714584 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:52:40.716129 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:52:40.717142 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.717819 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:52:40.717819 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:52:40.718830 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.721821 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:52:40.721821 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao" rename to "dim_regiao__dbt_backup"
[0m16:52:40.722835 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.725369 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:52:40.725899 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:52:40.725899 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.727460 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:52:40.727460 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:52:40.728183 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:52:40.728737 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.730903 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:52:40.730903 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:52:40.731929 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.733685 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:52:40.734230 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B48D6420>]}
[0m16:52:40.734230 [info ] [Thread-1 (]: 16 of 22 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.03s]
[0m16:52:40.735241 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:52:40.735241 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:52:40.736276 [info ] [Thread-1 (]: 17 of 22 START sql table model main.dim_risco .................................. [RUN]
[0m16:52:40.736276 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:52:40.736276 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:52:40.739328 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:52:40.740344 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:52:40.742411 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:52:40.744682 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:52:40.744682 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:52:40.744682 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.744682 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.744682 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:52:40.746321 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:52:40.746321 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.747334 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:52:40.747334 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:52:40.748843 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.749854 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:52:40.749854 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:52:40.749854 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.753453 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:52:40.754450 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco" rename to "dim_risco__dbt_backup"
[0m16:52:40.754954 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.758007 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:52:40.758558 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:52:40.758558 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.759599 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:52:40.760578 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:52:40.760578 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:52:40.762085 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.764961 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:52:40.764961 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:52:40.765969 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:40.767157 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:52:40.768921 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0BA84F6E0>]}
[0m16:52:40.770625 [info ] [Thread-1 (]: 17 of 22 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.03s]
[0m16:52:40.771260 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:52:40.771824 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:52:40.771824 [info ] [Thread-1 (]: 18 of 22 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:52:40.773210 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:52:40.773210 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:52:40.779422 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:52:40.781640 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:52:40.786676 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:52:40.787667 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:52:40.788174 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:52:40.788174 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:40.788686 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:40.789288 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:52:40.789288 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:52:48.502984 [debug] [Thread-1 (]: SQL status: OK in 7.713 seconds
[0m16:52:48.502984 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:52:48.504549 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m16:52:48.505208 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:48.506196 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:52:48.506196 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m16:52:48.507419 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:48.509683 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:52:48.510194 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade" rename to "fato_carteira_credito_atividade__dbt_backup"
[0m16:52:48.510194 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:48.512553 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:52:48.512553 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:52:48.513332 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:48.513922 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:52:48.514995 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:52:48.514995 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:52:48.564596 [debug] [Thread-1 (]: SQL status: OK in 0.050 seconds
[0m16:52:48.567676 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:52:48.567676 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:52:48.570571 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:52:48.573388 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:52:48.573925 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B2B0EB40>]}
[0m16:52:48.574571 [info ] [Thread-1 (]: 18 of 22 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 7.80s]
[0m16:52:48.575253 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:52:48.575784 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:52:48.576335 [info ] [Thread-1 (]: 19 of 22 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:52:48.576863 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:52:48.577437 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:52:48.579691 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:52:48.580805 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:52:48.583359 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:52:48.584376 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:52:48.584376 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:52:48.584376 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:48.585501 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:48.586510 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:52:48.586510 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:52:48.778836 [debug] [Thread-1 (]: SQL status: OK in 0.192 seconds
[0m16:52:48.779873 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:52:48.779873 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m16:52:48.780999 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:48.782071 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:52:48.782071 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m16:52:48.783097 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:48.786164 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:52:48.786164 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte" rename to "fato_carteira_credito_porte__dbt_backup"
[0m16:52:48.789265 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:48.795307 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:52:48.796315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:52:48.797324 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:52:48.798833 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:52:48.798833 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:52:48.799843 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:52:48.805975 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:52:48.808660 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:52:48.808660 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:52:48.813222 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:52:48.817078 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:52:48.818972 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0BA85F950>]}
[0m16:52:48.818972 [info ] [Thread-1 (]: 19 of 22 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.24s]
[0m16:52:48.821077 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:52:48.822603 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:52:48.822603 [info ] [Thread-1 (]: 20 of 22 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:52:48.824109 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:52:48.824109 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:52:48.830350 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:52:48.833507 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:52:48.840122 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:52:48.841124 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:52:48.842125 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:52:48.842125 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:52:48.842645 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:52:48.843653 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:52:48.844662 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:53:03.060634 [debug] [Thread-1 (]: SQL status: OK in 14.215 seconds
[0m16:53:03.061639 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:53:03.062148 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:53:03.063159 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:53:03.063691 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:53:03.064271 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:53:03.064271 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:53:03.066850 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:53:03.067904 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto" rename to "fato_carteira_credito_produto__dbt_backup"
[0m16:53:03.067904 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:53:03.070472 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:53:03.070472 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:53:03.071020 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:53:03.073517 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:53:03.073517 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:53:03.074042 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:53:03.096597 [debug] [Thread-1 (]: SQL status: OK in 0.022 seconds
[0m16:53:03.098602 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:53:03.098602 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:53:03.101137 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:53:03.102758 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:53:03.102758 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B3E81040>]}
[0m16:53:03.104263 [info ] [Thread-1 (]: 20 of 22 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 14.28s]
[0m16:53:03.105268 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:53:03.105268 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:53:03.105772 [info ] [Thread-1 (]: 21 of 22 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:53:03.105772 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:53:03.105772 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:53:03.109458 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:53:03.109458 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:53:03.113734 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:53:03.114277 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:53:03.115293 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:53:03.115293 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:53:03.116282 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:53:03.116282 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:53:03.117491 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao as id_localizacao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:53:03.410965 [debug] [Thread-1 (]: SQL status: OK in 0.293 seconds
[0m16:53:03.412114 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:53:03.413339 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:53:03.414513 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:53:03.417441 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:53:03.418044 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:53:03.419733 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:53:03.424471 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:53:03.425013 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito" rename to "fato_regiao_credito__dbt_backup"
[0m16:53:03.426055 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:53:03.433145 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:53:03.433675 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:53:03.434217 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:53:03.436233 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:53:03.436233 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:53:03.436233 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:53:03.443652 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:53:03.446891 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:53:03.447930 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:53:03.449964 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:53:03.451482 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:53:03.452488 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0BA863170>]}
[0m16:53:03.453991 [info ] [Thread-1 (]: 21 of 22 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.35s]
[0m16:53:03.455014 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:53:03.455014 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:53:03.455547 [info ] [Thread-1 (]: 22 of 22 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:53:03.456054 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:53:03.456054 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:53:03.459895 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:53:03.461397 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:53:03.465970 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:53:03.466998 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:53:03.466998 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:53:03.468131 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:53:03.469136 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:53:03.469136 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:53:03.469136 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:53:03.894789 [debug] [Thread-1 (]: SQL status: OK in 0.425 seconds
[0m16:53:03.897368 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:53:03.897368 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:53:03.898384 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:53:03.899372 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:53:03.899372 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:53:03.900721 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:53:03.901865 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:53:03.903391 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito" rename to "fato_risco_credito__dbt_backup"
[0m16:53:03.903924 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:53:03.907937 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:53:03.907937 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:53:03.908971 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:53:03.911004 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:53:03.911550 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:53:03.911550 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:53:03.914470 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:53:03.917559 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:53:03.918163 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:53:03.919166 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:53:03.920828 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:53:03.922336 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b176ca2e-7424-4633-99ba-c40944058ffe', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B421EE70>]}
[0m16:53:03.922336 [info ] [Thread-1 (]: 22 of 22 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.47s]
[0m16:53:03.923841 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:53:03.923841 [debug] [MainThread]: Using duckdb connection "master"
[0m16:53:03.925398 [debug] [MainThread]: On master: BEGIN
[0m16:53:03.925398 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:53:03.925398 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:53:03.927059 [debug] [MainThread]: On master: COMMIT
[0m16:53:03.927059 [debug] [MainThread]: Using duckdb connection "master"
[0m16:53:03.927059 [debug] [MainThread]: On master: COMMIT
[0m16:53:03.927059 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:53:03.927059 [debug] [MainThread]: On master: Close
[0m16:53:03.928648 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:53:03.928648 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:53:03.928648 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:53:03.928648 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_risco_credito' was properly closed.
[0m16:53:03.929655 [info ] [MainThread]: 
[0m16:53:03.929655 [info ] [MainThread]: Finished running 6 seeds, 16 table models in 0 hours 0 minutes and 25.68 seconds (25.68s).
[0m16:53:03.933217 [debug] [MainThread]: Command end result
[0m16:53:03.952556 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:53:03.956809 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:53:03.969118 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:53:03.969118 [info ] [MainThread]: 
[0m16:53:03.970624 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:53:03.971226 [info ] [MainThread]: 
[0m16:53:03.971226 [info ] [MainThread]: Done. PASS=22 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=22
[0m16:53:03.972233 [debug] [MainThread]: Command `dbt build` succeeded at 16:53:03.972233 after 26.93 seconds
[0m16:53:03.973345 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B2B63830>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B1F3B2F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0B151AFF0>]}
[0m16:53:03.973345 [debug] [MainThread]: Flushing usage events
[0m16:53:05.960698 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m18:16:33.584235 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB33F34F80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB3354B590>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB335495B0>]}


============================== 18:16:33.590080 | 9ce6db8c-f40d-48f8-aa10-9c2525218482 ==============================
[0m18:16:33.590080 [info ] [MainThread]: Running with dbt=1.11.5
[0m18:16:33.590080 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'invocation_command': 'dbt build', 'use_colors': 'True', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m18:16:33.782160 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB356FFF50>]}
[0m18:16:33.829803 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB33C18470>]}
[0m18:16:33.833388 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m18:16:34.064370 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m18:16:34.136166 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m18:16:34.137476 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35A4AFF0>]}
[0m18:16:35.175835 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m18:16:35.183240 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35C734A0>]}
[0m18:16:35.232169 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m18:16:35.235163 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m18:16:35.287670 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35DA5070>]}
[0m18:16:35.287670 [info ] [MainThread]: Found 16 models, 6 seeds, 19 sources, 472 macros
[0m18:16:35.290355 [info ] [MainThread]: 
[0m18:16:35.291356 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m18:16:35.291356 [info ] [MainThread]: 
[0m18:16:35.291356 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m18:16:35.296249 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m18:16:38.068063 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m18:16:38.069646 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m18:16:38.069646 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m18:16:38.718206 [debug] [ThreadPool]: SQL status: OK in 0.649 seconds
[0m18:16:38.721132 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m18:16:38.721132 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m18:16:38.722160 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m18:16:38.729152 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m18:16:38.729696 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m18:16:38.729696 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m18:16:38.730723 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m18:16:38.732371 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m18:16:38.732371 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m18:16:38.732371 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m18:16:38.732371 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m18:16:38.733377 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m18:16:38.733377 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m18:16:38.734381 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m18:16:38.734381 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m18:16:38.734381 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m18:16:38.735406 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m18:16:38.735406 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m18:16:38.737389 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m18:16:38.741092 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m18:16:38.741092 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m18:16:38.741092 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m18:16:38.742598 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m18:16:38.742598 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m18:16:38.742598 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m18:16:38.759342 [debug] [ThreadPool]: SQL status: OK in 0.016 seconds
[0m18:16:38.760348 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m18:16:38.762506 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m18:16:38.762506 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m18:16:38.764333 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35B8A990>]}
[0m18:16:38.765347 [debug] [MainThread]: Using duckdb connection "master"
[0m18:16:38.765347 [debug] [MainThread]: On master: BEGIN
[0m18:16:38.765347 [debug] [MainThread]: Opening a new connection, currently in state init
[0m18:16:38.765347 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m18:16:38.766347 [debug] [MainThread]: On master: COMMIT
[0m18:16:38.766347 [debug] [MainThread]: Using duckdb connection "master"
[0m18:16:38.766347 [debug] [MainThread]: On master: COMMIT
[0m18:16:38.766852 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m18:16:38.766852 [debug] [MainThread]: On master: Close
[0m18:16:38.771227 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m18:16:38.771227 [info ] [Thread-1 (]: 1 of 22 START sql table model main.dim_instituicao ............................. [RUN]
[0m18:16:38.772259 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m18:16:38.772259 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m18:16:38.778095 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:16:38.779124 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m18:16:38.803077 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:16:38.804608 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:16:38.805131 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m18:16:38.805131 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m18:16:38.805698 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:38.805698 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:16:38.806318 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento_resolucao,
        'Instituicao Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m18:16:38.955107 [debug] [Thread-1 (]: SQL status: OK in 0.148 seconds
[0m18:16:38.959460 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:16:38.959460 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m18:16:38.960468 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:38.961467 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:16:38.961467 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m18:16:38.963274 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:38.968009 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:16:38.968009 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m18:16:38.969528 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:38.971040 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:16:38.971040 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m18:16:38.972046 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:38.982303 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m18:16:38.982303 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:16:38.983309 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m18:16:39.027475 [debug] [Thread-1 (]: SQL status: OK in 0.044 seconds
[0m18:16:39.032140 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:16:39.032140 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m18:16:39.035308 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:16:39.037243 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m18:16:39.039776 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35DDAA50>]}
[0m18:16:39.040813 [info ] [Thread-1 (]: 1 of 22 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.27s]
[0m18:16:39.040813 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m18:16:39.040813 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m18:16:39.041833 [info ] [Thread-1 (]: 2 of 22 START sql table model main.dim_tempo ................................... [RUN]
[0m18:16:39.042367 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m18:16:39.042367 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m18:16:39.044984 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m18:16:39.046594 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m18:16:39.051974 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m18:16:39.053052 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:16:39.053052 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m18:16:39.053052 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:39.054558 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:39.054558 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:16:39.055178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m18:16:39.069223 [debug] [Thread-1 (]: SQL status: OK in 0.015 seconds
[0m18:16:39.070736 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:16:39.070736 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m18:16:39.072320 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:39.129135 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:16:39.129676 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m18:16:39.131424 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:39.134951 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:16:39.134951 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m18:16:39.136461 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:39.139510 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:16:39.140516 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m18:16:39.140516 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:39.142023 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m18:16:39.142540 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:16:39.142540 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m18:16:39.144659 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:16:39.146807 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:16:39.146807 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m18:16:39.149838 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:16:39.149838 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m18:16:39.151442 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB31B542C0>]}
[0m18:16:39.151442 [info ] [Thread-1 (]: 2 of 22 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.11s]
[0m18:16:39.152466 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m18:16:39.152466 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m18:16:39.153001 [info ] [Thread-1 (]: 3 of 22 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m18:16:39.153001 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m18:16:39.153001 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m18:16:39.157965 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:16:39.157965 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m18:16:39.160182 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:16:39.161715 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:16:39.161715 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m18:16:39.161715 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:39.162750 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:39.163259 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:16:39.163259 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH ativos_passivos AS (
    -- Conglomerados Prudenciais
    SELECT 
        COALESCE(a.codigo, p.codigo) as codigo, 
        COALESCE(a.data_base, p.data_base) as data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "bronze"."main"."prudential_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        COALESCE(a.codigo, p.codigo) as codigo, 
        COALESCE(a.data_base, p.data_base) as data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "bronze"."main"."financial_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT 
        COALESCE(a.codigo, p.codigo) as codigo, 
        COALESCE(a.data_base, p.data_base) as data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "bronze"."main"."individual_institutions_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base
)

SELECT
    md5(cast(ap.codigo as varchar)) as id_instituicao,
    strftime(ap.data_base, '%Y%m%d')::int as id_data,
    ap.disponibilidades,
    ap.operacoes_de_credito,
    ap.tvm as titulos_valores_mobiliarios,
    ap.ativo_total,
    ap.depositos_vista,
    ap.depositos_a_prazo,
    ap.captacoes,
    ap.patrimonio_liquido,
    ap.passivo_total
FROM ativos_passivos ap
    );
  
  
[0m18:16:40.047978 [debug] [Thread-1 (]: SQL status: OK in 0.885 seconds
[0m18:16:40.050043 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:16:40.050043 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m18:16:40.051568 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:40.052578 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:16:40.052578 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m18:16:40.054085 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:40.057215 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:16:40.057215 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m18:16:40.058226 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:40.060343 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:16:40.061346 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m18:16:40.061851 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:40.063693 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m18:16:40.064278 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:16:40.064278 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m18:16:40.562536 [debug] [Thread-1 (]: SQL status: OK in 0.497 seconds
[0m18:16:40.564445 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:16:40.564445 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m18:16:40.567715 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m18:16:40.567715 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m18:16:40.569222 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB3842D250>]}
[0m18:16:40.569222 [info ] [Thread-1 (]: 3 of 22 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 1.42s]
[0m18:16:40.570234 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m18:16:40.570738 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m18:16:40.570738 [info ] [Thread-1 (]: 4 of 22 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m18:16:40.570738 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m18:16:40.570738 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m18:16:40.574323 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:16:40.574323 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m18:16:40.582292 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:16:40.583861 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:16:40.583861 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m18:16:40.584879 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:40.584879 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:40.584879 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:16:40.584879 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."prudential_conglomerates_income_statement"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."financial_conglomerates_income_statement"

    UNION ALL

    -- Instituições Individuais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."individual_institutions_income_statement"
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    rendas_operacoes_de_credito,
    receitas_intermediacao_financeira,
    despesas_captacao,
    despesas_intermediacao_financeira,
    resultado_intermediacao_financeira,
    rendas_prestacao_servicos,
    despesas_pessoal,
    despesas_administrativas,
    resultado_operacional,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas
FROM dre
    );
  
  
[0m18:16:41.152088 [debug] [Thread-1 (]: SQL status: OK in 0.566 seconds
[0m18:16:41.153248 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:16:41.154245 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m18:16:41.155904 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.158066 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:16:41.158801 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m18:16:41.160459 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.164705 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:16:41.165388 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado" rename to "fato_demonstracao_resultado__dbt_backup"
[0m18:16:41.166369 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.168183 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:16:41.169189 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m18:16:41.169693 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.170699 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m18:16:41.170699 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:16:41.172310 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m18:16:41.242849 [debug] [Thread-1 (]: SQL status: OK in 0.069 seconds
[0m18:16:41.244869 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:16:41.245380 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m18:16:41.251311 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m18:16:41.251971 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m18:16:41.253519 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35933D10>]}
[0m18:16:41.254052 [info ] [Thread-1 (]: 4 of 22 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.68s]
[0m18:16:41.255606 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m18:16:41.256130 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m18:16:41.256130 [info ] [Thread-1 (]: 5 of 22 START sql table model main.fato_resumo_financeiro ...................... [RUN]
[0m18:16:41.257877 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m18:16:41.257877 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m18:16:41.263252 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:16:41.265323 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m18:16:41.270730 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:16:41.270730 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:16:41.272400 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m18:16:41.272400 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.274002 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.274522 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:16:41.274522 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m18:16:41.519384 [debug] [Thread-1 (]: SQL status: OK in 0.244 seconds
[0m18:16:41.520789 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:16:41.520789 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m18:16:41.521795 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.522932 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:16:41.522932 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m18:16:41.523920 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.526644 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:16:41.526644 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m18:16:41.527721 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.529315 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:16:41.529315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m18:16:41.530866 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.531987 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m18:16:41.531987 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:16:41.531987 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m18:16:41.575972 [debug] [Thread-1 (]: SQL status: OK in 0.043 seconds
[0m18:16:41.579080 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:16:41.579080 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m18:16:41.583443 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m18:16:41.584490 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m18:16:41.585494 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35BA9550>]}
[0m18:16:41.586491 [info ] [Thread-1 (]: 5 of 22 OK created sql table model main.fato_resumo_financeiro ................. [[32mOK[0m in 0.33s]
[0m18:16:41.586491 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m18:16:41.587477 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m18:16:41.587477 [info ] [Thread-1 (]: 6 of 22 START seed file main.seed_dim_atividade ................................ [RUN]
[0m18:16:41.587477 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m18:16:41.589274 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m18:16:41.589274 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m18:16:41.610844 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m18:16:41.611825 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m18:16:41.611825 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.612971 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.612971 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m18:16:41.613397 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */
truncate table "gold_warehouse"."main"."seed_dim_atividade"
[0m18:16:41.614592 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.624287 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m18:16:41.624287 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:16:41.641662 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m18:16:41.654506 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m18:16:41.660483 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m18:16:41.661490 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m18:16:41.662272 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m18:16:41.667660 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m18:16:41.669673 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m18:16:41.671175 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB36311FD0>]}
[0m18:16:41.672703 [info ] [Thread-1 (]: 6 of 22 OK loaded seed file main.seed_dim_atividade ............................ [[32mINSERT 10[0m in 0.08s]
[0m18:16:41.674227 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m18:16:41.674773 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m18:16:41.675792 [info ] [Thread-1 (]: 7 of 22 START seed file main.seed_dim_faixa_vencimento ......................... [RUN]
[0m18:16:41.676827 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m18:16:41.677626 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m18:16:41.677626 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m18:16:41.689492 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m18:16:41.690504 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m18:16:41.691504 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.693093 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.693923 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m18:16:41.694932 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */
truncate table "gold_warehouse"."main"."seed_dim_faixa_vencimento"
[0m18:16:41.696455 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.698477 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m18:16:41.699474 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:16:41.703003 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m18:16:41.705193 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m18:16:41.705764 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m18:16:41.705764 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m18:16:41.707497 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m18:16:41.709530 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:16:41.710035 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m18:16:41.711557 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35E40D10>]}
[0m18:16:41.712313 [info ] [Thread-1 (]: 7 of 22 OK loaded seed file main.seed_dim_faixa_vencimento ..................... [[32mINSERT 7[0m in 0.04s]
[0m18:16:41.713831 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m18:16:41.713831 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m18:16:41.714521 [info ] [Thread-1 (]: 8 of 22 START seed file main.seed_dim_porte .................................... [RUN]
[0m18:16:41.716146 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m18:16:41.716146 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m18:16:41.716146 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m18:16:41.720767 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m18:16:41.720767 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m18:16:41.720767 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.722407 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.722407 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m18:16:41.722407 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */
truncate table "gold_warehouse"."main"."seed_dim_porte"
[0m18:16:41.722407 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.724040 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m18:16:41.724040 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:16:41.726609 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.726609 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m18:16:41.729450 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m18:16:41.729450 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m18:16:41.729450 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m18:16:41.732238 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:16:41.733250 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m18:16:41.734745 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB30EACCE0>]}
[0m18:16:41.734745 [info ] [Thread-1 (]: 8 of 22 OK loaded seed file main.seed_dim_porte ................................ [[32mINSERT 6[0m in 0.02s]
[0m18:16:41.735745 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m18:16:41.735745 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m18:16:41.735745 [info ] [Thread-1 (]: 9 of 22 START seed file main.seed_dim_produto_credito .......................... [RUN]
[0m18:16:41.737154 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m18:16:41.737660 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m18:16:41.738667 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m18:16:41.744848 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m18:16:41.745355 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m18:16:41.745355 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.746362 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.746362 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m18:16:41.747371 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */
truncate table "gold_warehouse"."main"."seed_dim_produto_credito"
[0m18:16:41.747371 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.748369 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m18:16:41.749369 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:16:41.751643 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:16:41.752654 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m18:16:41.755177 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m18:16:41.755684 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m18:16:41.756255 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m18:16:41.759304 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m18:16:41.760526 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m18:16:41.761524 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35B1FF20>]}
[0m18:16:41.762032 [info ] [Thread-1 (]: 9 of 22 OK loaded seed file main.seed_dim_produto_credito ...................... [[32mINSERT 14[0m in 0.02s]
[0m18:16:41.762626 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m18:16:41.763239 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m18:16:41.763901 [info ] [Thread-1 (]: 10 of 22 START seed file main.seed_dim_regiao .................................. [RUN]
[0m18:16:41.763901 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m18:16:41.764910 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m18:16:41.764910 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m18:16:41.768431 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m18:16:41.769436 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m18:16:41.769436 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.769436 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.769436 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m18:16:41.770443 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */
truncate table "gold_warehouse"."main"."seed_dim_regiao"
[0m18:16:41.770947 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.771954 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m18:16:41.771954 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:16:41.773966 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.773966 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m18:16:41.775513 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m18:16:41.776522 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m18:16:41.776522 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m18:16:41.778575 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:16:41.780085 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m18:16:41.780085 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35953230>]}
[0m18:16:41.780085 [info ] [Thread-1 (]: 10 of 22 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.02s]
[0m18:16:41.781129 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m18:16:41.781707 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m18:16:41.782249 [info ] [Thread-1 (]: 11 of 22 START seed file main.seed_dim_risco ................................... [RUN]
[0m18:16:41.782249 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m18:16:41.782249 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m18:16:41.783370 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m18:16:41.787599 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m18:16:41.788718 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m18:16:41.788718 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.789362 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.789362 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m18:16:41.789362 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */
truncate table "gold_warehouse"."main"."seed_dim_risco"
[0m18:16:41.790369 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.790369 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m18:16:41.791465 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:16:41.792478 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.792478 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m18:16:41.794437 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m18:16:41.795230 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m18:16:41.795230 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m18:16:41.797844 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:16:41.797844 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m18:16:41.797844 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35CA01A0>]}
[0m18:16:41.799479 [info ] [Thread-1 (]: 11 of 22 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.02s]
[0m18:16:41.799479 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m18:16:41.800095 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m18:16:41.800095 [info ] [Thread-1 (]: 12 of 22 START sql table model main.dim_atividade .............................. [RUN]
[0m18:16:41.800095 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now model.bacen_ifdata_analytics.dim_atividade)
[0m18:16:41.801142 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m18:16:41.802877 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m18:16:41.804288 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m18:16:41.807997 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m18:16:41.808581 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:16:41.808581 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m18:16:41.809588 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.810093 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.810093 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:16:41.810093 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m18:16:41.810093 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.811599 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:16:41.812238 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m18:16:41.812238 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.813750 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:16:41.813750 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m18:16:41.814377 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.816889 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:16:41.816889 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade" rename to "dim_atividade__dbt_backup"
[0m18:16:41.817513 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.819702 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:16:41.819702 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m18:16:41.820736 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.820736 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m18:16:41.820736 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:16:41.822484 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m18:16:41.823999 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:16:41.825590 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:16:41.825590 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m18:16:41.828957 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:16:41.829468 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m18:16:41.829468 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35A0C110>]}
[0m18:16:41.829468 [info ] [Thread-1 (]: 12 of 22 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.03s]
[0m18:16:41.831195 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m18:16:41.831195 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m18:16:41.831899 [info ] [Thread-1 (]: 13 of 22 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m18:16:41.831899 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m18:16:41.831899 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m18:16:41.834589 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:16:41.835595 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m18:16:41.837595 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:16:41.838100 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:16:41.839105 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m18:16:41.839105 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.839624 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.839624 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:16:41.839624 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m18:16:41.840631 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.841631 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:16:41.841631 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m18:16:41.841631 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.843136 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:16:41.843136 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m18:16:41.844141 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.846157 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:16:41.846157 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m18:16:41.846920 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.849434 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:16:41.850924 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m18:16:41.851258 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.852764 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m18:16:41.852764 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:16:41.852764 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m18:16:41.855750 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:16:41.856256 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:16:41.856256 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m18:16:41.860339 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m18:16:41.861845 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m18:16:41.861845 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB363F2DE0>]}
[0m18:16:41.861845 [info ] [Thread-1 (]: 13 of 22 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.03s]
[0m18:16:41.862853 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m18:16:41.863357 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m18:16:41.863357 [info ] [Thread-1 (]: 14 of 22 START sql table model main.dim_porte .................................. [RUN]
[0m18:16:41.864104 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m18:16:41.864104 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m18:16:41.866617 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m18:16:41.867436 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m18:16:41.870464 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m18:16:41.870969 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:16:41.870969 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m18:16:41.870969 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.871976 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.872481 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:16:41.872481 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m18:16:41.872481 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.874023 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:16:41.874023 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m18:16:41.874023 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.875552 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:16:41.876095 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m18:16:41.876479 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.877706 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:16:41.879255 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte" rename to "dim_porte__dbt_backup"
[0m18:16:41.879612 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.881328 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:16:41.881328 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m18:16:41.882332 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.883381 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m18:16:41.883381 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:16:41.883381 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m18:16:41.886926 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m18:16:41.888936 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:16:41.889454 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m18:16:41.892437 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m18:16:41.894006 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m18:16:41.894335 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35C73920>]}
[0m18:16:41.895013 [info ] [Thread-1 (]: 14 of 22 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.03s]
[0m18:16:41.895517 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m18:16:41.895517 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m18:16:41.895517 [info ] [Thread-1 (]: 15 of 22 START sql table model main.dim_produto_credito ........................ [RUN]
[0m18:16:41.896521 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m18:16:41.896521 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m18:16:41.899545 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:16:41.900072 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m18:16:41.903645 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:16:41.903645 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:16:41.904620 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m18:16:41.904620 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.905443 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.905443 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:16:41.905962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m18:16:41.905962 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.907475 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:16:41.907475 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m18:16:41.908135 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.909424 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:16:41.909424 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m18:16:41.909424 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.912167 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:16:41.912167 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m18:16:41.913203 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.915360 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:16:41.915360 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m18:16:41.916349 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.917755 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m18:16:41.917755 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:16:41.919301 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m18:16:41.922352 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m18:16:41.923963 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:16:41.925643 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m18:16:41.929508 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m18:16:41.929508 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m18:16:41.931235 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB363F8E90>]}
[0m18:16:41.931982 [info ] [Thread-1 (]: 15 of 22 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.04s]
[0m18:16:41.932284 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m18:16:41.932284 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m18:16:41.932284 [info ] [Thread-1 (]: 16 of 22 START sql table model main.dim_regiao ................................. [RUN]
[0m18:16:41.933287 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m18:16:41.933287 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m18:16:41.935315 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m18:16:41.936309 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m18:16:41.938867 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m18:16:41.939410 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:16:41.939410 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m18:16:41.940423 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.940423 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.940423 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:16:41.941423 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m18:16:41.941423 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.942929 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:16:41.942929 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m18:16:41.943935 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.944943 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:16:41.944943 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m18:16:41.945953 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.947557 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:16:41.947557 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao" rename to "dim_regiao__dbt_backup"
[0m18:16:41.948556 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.950062 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:16:41.950062 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m18:16:41.950062 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.951895 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m18:16:41.951895 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:16:41.951895 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m18:16:41.957295 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m18:16:41.959586 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:16:41.959586 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m18:16:41.964394 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m18:16:41.966005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m18:16:41.966005 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35A4B2F0>]}
[0m18:16:41.967016 [info ] [Thread-1 (]: 16 of 22 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.03s]
[0m18:16:41.968029 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m18:16:41.968029 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m18:16:41.968029 [info ] [Thread-1 (]: 17 of 22 START sql table model main.dim_risco .................................. [RUN]
[0m18:16:41.969545 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m18:16:41.969545 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m18:16:41.972173 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m18:16:41.973355 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m18:16:41.976238 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m18:16:41.977462 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:16:41.978476 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m18:16:41.978476 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:41.979576 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.979576 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:16:41.979576 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m18:16:41.981172 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:41.981718 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:16:41.982740 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m18:16:41.983246 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.983246 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:16:41.984764 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m18:16:41.984764 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.986774 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:16:41.987771 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco" rename to "dim_risco__dbt_backup"
[0m18:16:41.988276 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.990814 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:16:41.990814 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m18:16:41.990814 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:41.992797 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m18:16:41.992797 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:16:41.992797 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m18:16:41.999364 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m18:16:42.002518 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:16:42.002518 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m18:16:42.005500 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:16:42.006005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m18:16:42.006005 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35960CE0>]}
[0m18:16:42.007549 [info ] [Thread-1 (]: 17 of 22 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.04s]
[0m18:16:42.007861 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m18:16:42.008365 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m18:16:42.008365 [info ] [Thread-1 (]: 18 of 22 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m18:16:42.008365 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m18:16:42.009371 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m18:16:42.012527 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:16:42.013610 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m18:16:42.016316 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:16:42.017408 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:16:42.017763 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m18:16:42.017763 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:42.018413 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:16:42.019417 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:16:42.019417 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m18:16:55.536346 [debug] [Thread-1 (]: SQL status: OK in 13.516 seconds
[0m18:16:55.537351 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:16:55.537856 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m18:16:55.537856 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:55.539383 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:16:55.540388 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m18:16:55.540388 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:55.542897 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:16:55.542897 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade" rename to "fato_carteira_credito_atividade__dbt_backup"
[0m18:16:55.543902 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:55.545415 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:16:55.546418 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m18:16:55.546418 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:55.547425 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m18:16:55.547425 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:16:55.548424 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m18:16:55.612269 [debug] [Thread-1 (]: SQL status: OK in 0.064 seconds
[0m18:16:55.614525 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:16:55.614525 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m18:16:55.619284 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m18:16:55.621228 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m18:16:55.621228 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB3636F110>]}
[0m18:16:55.622579 [info ] [Thread-1 (]: 18 of 22 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 13.61s]
[0m18:16:55.622579 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m18:16:55.623428 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m18:16:55.623428 [info ] [Thread-1 (]: 19 of 22 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m18:16:55.623428 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m18:16:55.624413 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m18:16:55.626931 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:16:55.627437 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m18:16:55.631053 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:16:55.631577 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:16:55.632372 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m18:16:55.632372 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:55.632974 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:55.633481 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:16:55.633481 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m18:16:55.942395 [debug] [Thread-1 (]: SQL status: OK in 0.309 seconds
[0m18:16:55.942395 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:16:55.944093 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m18:16:55.944093 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:55.946120 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:16:55.946120 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m18:16:55.946632 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:55.949180 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:16:55.949180 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte" rename to "fato_carteira_credito_porte__dbt_backup"
[0m18:16:55.949682 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:55.951540 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:16:55.951540 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m18:16:55.952567 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:55.953809 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m18:16:55.953809 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:16:55.954328 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m18:16:55.996866 [debug] [Thread-1 (]: SQL status: OK in 0.043 seconds
[0m18:16:56.004011 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:16:56.004011 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m18:16:56.009977 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m18:16:56.012217 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m18:16:56.012760 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35CF38C0>]}
[0m18:16:56.013806 [info ] [Thread-1 (]: 19 of 22 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.39s]
[0m18:16:56.013806 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m18:16:56.014364 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m18:16:56.014923 [info ] [Thread-1 (]: 20 of 22 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m18:16:56.015493 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m18:16:56.015493 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m18:16:56.018454 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:16:56.019431 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m18:16:56.022202 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:16:56.022707 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:16:56.022707 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m18:16:56.022707 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:16:56.024213 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:16:56.024213 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:16:56.024213 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m18:17:18.706196 [debug] [Thread-1 (]: SQL status: OK in 22.681 seconds
[0m18:17:18.707818 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:17:18.707818 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m18:17:18.708440 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:18.709560 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:17:18.709560 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m18:17:18.709560 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:18.711995 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:17:18.713293 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto" rename to "fato_carteira_credito_produto__dbt_backup"
[0m18:17:18.713293 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:18.714608 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:17:18.716269 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m18:17:18.716269 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:18.717273 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m18:17:18.718028 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:17:18.718028 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m18:17:18.763950 [debug] [Thread-1 (]: SQL status: OK in 0.045 seconds
[0m18:17:18.768526 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:17:18.768526 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m18:17:18.775034 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m18:17:18.777540 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m18:17:18.778258 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB35A0FDD0>]}
[0m18:17:18.778805 [info ] [Thread-1 (]: 20 of 22 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 22.76s]
[0m18:17:18.779887 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m18:17:18.779887 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m18:17:18.780534 [info ] [Thread-1 (]: 21 of 22 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m18:17:18.781051 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m18:17:18.781637 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m18:17:18.784960 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:17:18.785941 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m18:17:18.787464 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:17:18.789017 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:17:18.789527 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m18:17:18.789527 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:17:18.789527 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:18.790530 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:17:18.790530 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao as id_localizacao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m18:17:19.170724 [debug] [Thread-1 (]: SQL status: OK in 0.380 seconds
[0m18:17:19.170724 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:17:19.170724 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m18:17:19.172478 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:19.172478 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:17:19.174110 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m18:17:19.174110 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:19.176937 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:17:19.177587 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito" rename to "fato_regiao_credito__dbt_backup"
[0m18:17:19.177587 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:19.179604 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:17:19.179604 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m18:17:19.179604 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:19.182006 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m18:17:19.182006 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:17:19.182006 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m18:17:19.214154 [debug] [Thread-1 (]: SQL status: OK in 0.031 seconds
[0m18:17:19.218000 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:17:19.218000 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m18:17:19.223978 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m18:17:19.224510 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m18:17:19.226394 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB3636F5C0>]}
[0m18:17:19.227295 [info ] [Thread-1 (]: 21 of 22 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.45s]
[0m18:17:19.227815 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m18:17:19.227815 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m18:17:19.229505 [info ] [Thread-1 (]: 22 of 22 START sql table model main.fato_risco_credito ......................... [RUN]
[0m18:17:19.230016 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m18:17:19.230319 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m18:17:19.233622 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:17:19.235617 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m18:17:19.239258 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:17:19.240193 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:17:19.240193 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m18:17:19.240193 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:17:19.241397 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:19.241397 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:17:19.241397 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m18:17:19.817917 [debug] [Thread-1 (]: SQL status: OK in 0.576 seconds
[0m18:17:19.817917 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:17:19.817917 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m18:17:19.819428 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:19.820435 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:17:19.820940 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m18:17:19.820940 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:19.823957 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:17:19.823957 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito" rename to "fato_risco_credito__dbt_backup"
[0m18:17:19.823957 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:19.827116 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:17:19.827620 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m18:17:19.827620 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:17:19.829340 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m18:17:19.829340 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:17:19.829340 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m18:17:19.869772 [debug] [Thread-1 (]: SQL status: OK in 0.040 seconds
[0m18:17:19.872580 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:17:19.874308 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m18:17:19.879659 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m18:17:19.881927 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m18:17:19.881927 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9ce6db8c-f40d-48f8-aa10-9c2525218482', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB3636FA10>]}
[0m18:17:19.882932 [info ] [Thread-1 (]: 22 of 22 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.65s]
[0m18:17:19.883439 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m18:17:19.884444 [debug] [MainThread]: Using duckdb connection "master"
[0m18:17:19.884444 [debug] [MainThread]: On master: BEGIN
[0m18:17:19.885446 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m18:17:19.885446 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m18:17:19.885446 [debug] [MainThread]: On master: COMMIT
[0m18:17:19.886446 [debug] [MainThread]: Using duckdb connection "master"
[0m18:17:19.886446 [debug] [MainThread]: On master: COMMIT
[0m18:17:19.886446 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m18:17:19.886446 [debug] [MainThread]: On master: Close
[0m18:17:19.886446 [debug] [MainThread]: Connection 'master' was properly closed.
[0m18:17:19.887445 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m18:17:19.887445 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m18:17:19.887445 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_risco_credito' was properly closed.
[0m18:17:19.887950 [info ] [MainThread]: 
[0m18:17:19.887950 [info ] [MainThread]: Finished running 6 seeds, 16 table models in 0 hours 0 minutes and 44.60 seconds (44.60s).
[0m18:17:19.891051 [debug] [MainThread]: Command end result
[0m18:17:19.912347 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m18:17:19.915100 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m18:17:19.921131 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m18:17:19.921131 [info ] [MainThread]: 
[0m18:17:19.921131 [info ] [MainThread]: [32mCompleted successfully[0m
[0m18:17:19.921131 [info ] [MainThread]: 
[0m18:17:19.922136 [info ] [MainThread]: Done. PASS=22 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=22
[0m18:17:19.922136 [debug] [MainThread]: Command `dbt build` succeeded at 18:17:19.922136 after 46.48 seconds
[0m18:17:19.923340 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB33C37020>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB33C36F90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AB33C36270>]}
[0m18:17:20.933795 [debug] [MainThread]: An error was encountered while trying to send an event
[0m18:17:20.935790 [debug] [MainThread]: Flushing usage events
[0m07:32:31.589993 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128BD65E210>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128BFEE94F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128BFEE95B0>]}


============================== 07:32:31.596229 | d2444a12-6cef-4b67-89ef-1677c905dfc5 ==============================
[0m07:32:31.596229 [info ] [MainThread]: Running with dbt=1.11.5
[0m07:32:31.597738 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m07:32:31.968268 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C0C99A00>]}
[0m07:32:32.058317 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C0CAB800>]}
[0m07:32:32.062371 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m07:32:32.682789 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m07:32:35.276318 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m07:32:35.276860 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m07:32:35.277440 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m07:32:35.293351 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m07:32:35.358196 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C0CE69F0>]}
[0m07:32:35.495702 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m07:32:35.519950 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m07:32:35.614497 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C23A2600>]}
[0m07:32:35.615518 [info ] [MainThread]: Found 16 models, 6 seeds, 19 sources, 472 macros
[0m07:32:35.617580 [info ] [MainThread]: 
[0m07:32:35.619118 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m07:32:35.619118 [info ] [MainThread]: 
[0m07:32:35.619118 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m07:32:35.627037 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m07:32:40.105424 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m07:32:40.106504 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m07:32:40.107045 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m07:32:41.127477 [debug] [ThreadPool]: SQL status: OK in 1.021 seconds
[0m07:32:41.131646 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m07:32:41.133878 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m07:32:41.134459 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m07:32:41.146733 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m07:32:41.147882 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m07:32:41.149560 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m07:32:41.153923 [debug] [ThreadPool]: SQL status: OK in 0.004 seconds
[0m07:32:41.156756 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m07:32:41.157292 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m07:32:41.158299 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m07:32:41.158299 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m07:32:41.158299 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m07:32:41.159804 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m07:32:41.161811 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m07:32:41.161811 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m07:32:41.161811 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m07:32:41.162999 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m07:32:41.162999 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m07:32:41.167572 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m07:32:41.176034 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m07:32:41.176540 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m07:32:41.177046 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m07:32:41.178054 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m07:32:41.179562 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m07:32:41.180109 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m07:32:41.193847 [debug] [ThreadPool]: SQL status: OK in 0.013 seconds
[0m07:32:41.194832 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m07:32:41.218191 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m07:32:41.219187 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m07:32:41.220902 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C1E30890>]}
[0m07:32:41.221482 [debug] [MainThread]: Using duckdb connection "master"
[0m07:32:41.222016 [debug] [MainThread]: On master: BEGIN
[0m07:32:41.222016 [debug] [MainThread]: Opening a new connection, currently in state init
[0m07:32:41.222565 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m07:32:41.223149 [debug] [MainThread]: On master: COMMIT
[0m07:32:41.223149 [debug] [MainThread]: Using duckdb connection "master"
[0m07:32:41.223679 [debug] [MainThread]: On master: COMMIT
[0m07:32:41.224251 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m07:32:41.224813 [debug] [MainThread]: On master: Close
[0m07:32:41.233089 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m07:32:41.234606 [info ] [Thread-1 (]: 1 of 22 START sql table model main.dim_instituicao ............................. [RUN]
[0m07:32:41.236252 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m07:32:41.237364 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m07:32:41.247935 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m07:32:41.250537 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m07:32:41.295539 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m07:32:41.296551 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m07:32:41.297541 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m07:32:41.297541 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m07:32:41.298197 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:41.298197 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m07:32:41.299219 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento_resolucao,
        'Instituicao Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m07:32:41.452213 [debug] [Thread-1 (]: SQL status: OK in 0.152 seconds
[0m07:32:41.458834 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m07:32:41.458834 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m07:32:41.460339 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:41.477136 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m07:32:41.478248 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m07:32:41.478849 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m07:32:41.521686 [debug] [Thread-1 (]: SQL status: OK in 0.042 seconds
[0m07:32:41.530614 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m07:32:41.531164 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m07:32:41.532286 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:41.534599 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m07:32:41.536306 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C1E30B60>]}
[0m07:32:41.537320 [info ] [Thread-1 (]: 1 of 22 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.30s]
[0m07:32:41.537832 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m07:32:41.537832 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m07:32:41.538846 [info ] [Thread-1 (]: 2 of 22 START sql table model main.dim_tempo ................................... [RUN]
[0m07:32:41.538846 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m07:32:41.538846 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m07:32:41.542383 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m07:32:41.544535 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m07:32:41.548301 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m07:32:41.550434 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m07:32:41.550992 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m07:32:41.552111 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:41.553292 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:41.553885 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m07:32:41.554467 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m07:32:41.575736 [debug] [Thread-1 (]: SQL status: OK in 0.020 seconds
[0m07:32:41.580401 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m07:32:41.580401 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m07:32:41.581993 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:41.584002 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m07:32:41.585003 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m07:32:41.585511 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m07:32:41.590674 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m07:32:41.594684 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m07:32:41.595685 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m07:32:41.596685 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:41.598685 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m07:32:41.599685 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C274B1A0>]}
[0m07:32:41.601516 [info ] [Thread-1 (]: 2 of 22 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.06s]
[0m07:32:41.602206 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m07:32:41.603203 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m07:32:41.603203 [info ] [Thread-1 (]: 3 of 22 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m07:32:41.604206 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m07:32:41.604206 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m07:32:41.609209 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m07:32:41.610204 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m07:32:41.613723 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m07:32:41.615723 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m07:32:41.616726 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m07:32:41.616726 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:41.617724 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:41.618724 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m07:32:41.618724 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH ativos_passivos AS (
    -- Conglomerados Prudenciais
    SELECT 
        COALESCE(a.codigo, p.codigo) as codigo, 
        COALESCE(a.data_base, p.data_base) as data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "bronze"."main"."prudential_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        COALESCE(a.codigo, p.codigo) as codigo, 
        COALESCE(a.data_base, p.data_base) as data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "bronze"."main"."financial_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT 
        COALESCE(a.codigo, p.codigo) as codigo, 
        COALESCE(a.data_base, p.data_base) as data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "bronze"."main"."individual_institutions_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base
)

SELECT
    md5(cast(ap.codigo as varchar)) as id_instituicao,
    strftime(ap.data_base, '%Y%m%d')::int as id_data,
    ap.disponibilidades,
    ap.operacoes_de_credito,
    ap.tvm as titulos_valores_mobiliarios,
    ap.ativo_total,
    ap.depositos_vista,
    ap.depositos_a_prazo,
    ap.captacoes,
    ap.patrimonio_liquido,
    ap.passivo_total
FROM ativos_passivos ap
    );
  
  
[0m07:32:42.115632 [debug] [Thread-1 (]: SQL status: OK in 0.495 seconds
[0m07:32:42.118905 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m07:32:42.119450 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m07:32:42.120041 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:42.121233 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m07:32:42.121813 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m07:32:42.121813 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m07:32:42.525861 [debug] [Thread-1 (]: SQL status: OK in 0.404 seconds
[0m07:32:42.528419 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m07:32:42.528419 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m07:32:42.529932 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:42.531730 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m07:32:42.532796 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C28F3920>]}
[0m07:32:42.533924 [info ] [Thread-1 (]: 3 of 22 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.93s]
[0m07:32:42.534499 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m07:32:42.535647 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m07:32:42.536169 [info ] [Thread-1 (]: 4 of 22 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m07:32:42.537177 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m07:32:42.537177 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m07:32:42.540229 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m07:32:42.541252 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m07:32:42.545031 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m07:32:42.546837 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m07:32:42.547377 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m07:32:42.547377 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:42.547919 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:42.547919 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m07:32:42.548506 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."prudential_conglomerates_income_statement"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."financial_conglomerates_income_statement"

    UNION ALL

    -- Instituições Individuais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."individual_institutions_income_statement"
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    rendas_operacoes_de_credito,
    receitas_intermediacao_financeira,
    despesas_captacao,
    despesas_intermediacao_financeira,
    resultado_intermediacao_financeira,
    rendas_prestacao_servicos,
    despesas_pessoal,
    despesas_administrativas,
    resultado_operacional,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas
FROM dre
    );
  
  
[0m07:32:43.088039 [debug] [Thread-1 (]: SQL status: OK in 0.475 seconds
[0m07:32:43.091356 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m07:32:43.091356 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m07:32:43.092390 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:43.092977 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m07:32:43.093999 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m07:32:43.093999 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m07:32:43.317103 [debug] [Thread-1 (]: SQL status: OK in 0.222 seconds
[0m07:32:43.320203 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m07:32:43.321202 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m07:32:43.321709 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:43.323564 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m07:32:43.324619 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C2928110>]}
[0m07:32:43.326351 [info ] [Thread-1 (]: 4 of 22 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.79s]
[0m07:32:43.328667 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m07:32:43.330802 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m07:32:43.332576 [info ] [Thread-1 (]: 5 of 22 START sql table model main.fato_resumo_financeiro ...................... [RUN]
[0m07:32:43.333750 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m07:32:43.334885 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m07:32:43.339386 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m07:32:43.341618 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m07:32:43.349250 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m07:32:43.350927 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m07:32:43.351487 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m07:32:43.352073 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:43.352746 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:43.353298 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m07:32:43.354418 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m07:32:43.644925 [debug] [Thread-1 (]: SQL status: OK in 0.290 seconds
[0m07:32:43.651000 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m07:32:43.651000 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m07:32:43.652729 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:43.655764 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m07:32:43.657281 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m07:32:43.657281 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m07:32:43.790917 [debug] [Thread-1 (]: SQL status: OK in 0.133 seconds
[0m07:32:43.793919 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m07:32:43.794917 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m07:32:43.795918 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:43.797915 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m07:32:43.799429 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C28F1730>]}
[0m07:32:43.800440 [info ] [Thread-1 (]: 5 of 22 OK created sql table model main.fato_resumo_financeiro ................. [[32mOK[0m in 0.47s]
[0m07:32:43.801445 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m07:32:43.802440 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m07:32:43.803439 [info ] [Thread-1 (]: 6 of 22 START seed file main.seed_dim_atividade ................................ [RUN]
[0m07:32:43.803439 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m07:32:43.804442 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m07:32:43.804442 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m07:32:43.840200 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m07:32:43.840200 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m07:32:43.841212 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:43.842779 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:43.843287 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m07:32:43.843287 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m07:32:43.844299 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:43.859231 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m07:32:43.860315 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m07:32:43.870789 [debug] [Thread-1 (]: SQL status: OK in 0.010 seconds
[0m07:32:43.878442 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m07:32:43.885483 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m07:32:43.886012 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m07:32:43.886572 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m07:32:43.889768 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m07:32:43.889768 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m07:32:43.891362 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C1F50290>]}
[0m07:32:43.892373 [info ] [Thread-1 (]: 6 of 22 OK loaded seed file main.seed_dim_atividade ............................ [[32mINSERT 10[0m in 0.09s]
[0m07:32:43.892880 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m07:32:43.893889 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m07:32:43.893889 [info ] [Thread-1 (]: 7 of 22 START seed file main.seed_dim_faixa_vencimento ......................... [RUN]
[0m07:32:43.894890 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m07:32:43.896496 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m07:32:43.896496 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m07:32:43.902387 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m07:32:43.902387 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m07:32:43.904022 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:43.904022 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:43.904022 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m07:32:43.905640 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m07:32:43.906646 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:43.908157 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m07:32:43.909664 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m07:32:43.914435 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m07:32:43.915611 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m07:32:43.919839 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m07:32:43.920846 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m07:32:43.921450 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m07:32:43.926178 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m07:32:43.927363 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m07:32:43.927976 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C27DE8A0>]}
[0m07:32:43.928569 [info ] [Thread-1 (]: 7 of 22 OK loaded seed file main.seed_dim_faixa_vencimento ..................... [[32mINSERT 7[0m in 0.03s]
[0m07:32:43.929727 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m07:32:43.930303 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m07:32:43.930872 [info ] [Thread-1 (]: 8 of 22 START seed file main.seed_dim_porte .................................... [RUN]
[0m07:32:43.931391 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m07:32:43.932401 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m07:32:43.932908 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m07:32:43.938055 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m07:32:43.938055 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m07:32:43.939559 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:43.940684 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:43.941752 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m07:32:43.942351 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m07:32:43.943034 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:43.943697 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m07:32:43.944238 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m07:32:43.947755 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m07:32:43.947755 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m07:32:43.949397 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m07:32:43.951366 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m07:32:43.951366 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m07:32:43.955587 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m07:32:43.957256 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m07:32:43.957820 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C28B50D0>]}
[0m07:32:43.958257 [info ] [Thread-1 (]: 8 of 22 OK loaded seed file main.seed_dim_porte ................................ [[32mINSERT 6[0m in 0.03s]
[0m07:32:43.958764 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m07:32:43.958764 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m07:32:43.958764 [info ] [Thread-1 (]: 9 of 22 START seed file main.seed_dim_produto_credito .......................... [RUN]
[0m07:32:43.959772 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m07:32:43.959772 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m07:32:43.960845 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m07:32:43.964907 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m07:32:43.966414 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m07:32:43.966973 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:43.968023 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m07:32:43.969290 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m07:32:43.969857 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m07:32:43.970982 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:43.972586 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m07:32:43.973220 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m07:32:43.974576 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m07:32:43.974576 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m07:32:43.977230 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m07:32:43.977745 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m07:32:43.977745 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m07:32:43.982853 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m07:32:43.984872 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m07:32:43.985460 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C2770800>]}
[0m07:32:43.986553 [info ] [Thread-1 (]: 9 of 22 OK loaded seed file main.seed_dim_produto_credito ...................... [[32mINSERT 14[0m in 0.03s]
[0m07:32:43.987093 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m07:32:43.987664 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m07:32:43.987664 [info ] [Thread-1 (]: 10 of 22 START seed file main.seed_dim_regiao .................................. [RUN]
[0m07:32:43.989184 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m07:32:43.990524 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m07:32:43.991054 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m07:32:43.994186 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m07:32:43.994186 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m07:32:43.994186 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:43.995198 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:43.995198 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m07:32:43.995198 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m07:32:43.996191 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:43.996191 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m07:32:43.996191 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m07:32:43.997724 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:43.999376 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m07:32:44.003322 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m07:32:44.003322 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m07:32:44.003908 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m07:32:44.008836 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m07:32:44.009836 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m07:32:44.009836 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C2754440>]}
[0m07:32:44.009836 [info ] [Thread-1 (]: 10 of 22 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.02s]
[0m07:32:44.010971 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m07:32:44.011969 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m07:32:44.012478 [info ] [Thread-1 (]: 11 of 22 START seed file main.seed_dim_risco ................................... [RUN]
[0m07:32:44.014035 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m07:32:44.015044 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m07:32:44.015044 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m07:32:44.025914 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m07:32:44.025914 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m07:32:44.027200 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:44.028210 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.029718 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m07:32:44.030303 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m07:32:44.032333 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.033343 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m07:32:44.035466 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m07:32:44.040075 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m07:32:44.041703 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m07:32:44.047705 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m07:32:44.048789 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m07:32:44.049314 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m07:32:44.057915 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m07:32:44.058914 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m07:32:44.059914 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C28F1280>]}
[0m07:32:44.060420 [info ] [Thread-1 (]: 11 of 22 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.05s]
[0m07:32:44.060420 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m07:32:44.061927 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m07:32:44.061927 [info ] [Thread-1 (]: 12 of 22 START sql table model main.dim_atividade .............................. [RUN]
[0m07:32:44.063444 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now model.bacen_ifdata_analytics.dim_atividade)
[0m07:32:44.063951 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m07:32:44.068163 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m07:32:44.069805 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m07:32:44.074076 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m07:32:44.074601 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m07:32:44.075607 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m07:32:44.075607 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:44.076623 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.077168 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m07:32:44.078177 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m07:32:44.079685 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.083112 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m07:32:44.083112 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m07:32:44.084647 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:44.086802 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m07:32:44.087308 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m07:32:44.087308 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m07:32:44.090210 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m07:32:44.095067 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m07:32:44.096194 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m07:32:44.096761 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:44.097842 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m07:32:44.099093 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C0D2DB50>]}
[0m07:32:44.099093 [info ] [Thread-1 (]: 12 of 22 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.03s]
[0m07:32:44.100103 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m07:32:44.100103 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m07:32:44.101608 [info ] [Thread-1 (]: 13 of 22 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m07:32:44.101608 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m07:32:44.102614 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m07:32:44.109056 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m07:32:44.111282 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m07:32:44.115078 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m07:32:44.116625 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m07:32:44.117194 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m07:32:44.118203 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:44.119204 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.119204 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m07:32:44.119204 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m07:32:44.122451 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.125824 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m07:32:44.125824 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m07:32:44.126862 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:44.127459 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m07:32:44.127459 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m07:32:44.128496 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m07:32:44.130042 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m07:32:44.132787 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m07:32:44.133799 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m07:32:44.134803 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:44.136577 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m07:32:44.137187 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C1E59640>]}
[0m07:32:44.137771 [info ] [Thread-1 (]: 13 of 22 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.04s]
[0m07:32:44.138349 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m07:32:44.138349 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m07:32:44.138881 [info ] [Thread-1 (]: 14 of 22 START sql table model main.dim_porte .................................. [RUN]
[0m07:32:44.139924 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m07:32:44.139924 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m07:32:44.143571 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m07:32:44.145580 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m07:32:44.150953 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m07:32:44.162428 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m07:32:44.163445 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m07:32:44.164361 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:44.165462 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.166001 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m07:32:44.166526 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m07:32:44.168200 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.174257 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m07:32:44.174893 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m07:32:44.175913 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.181119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m07:32:44.182122 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m07:32:44.182628 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m07:32:44.186545 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m07:32:44.191190 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m07:32:44.192213 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m07:32:44.193847 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:44.196529 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m07:32:44.197643 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C0D8B6B0>]}
[0m07:32:44.198225 [info ] [Thread-1 (]: 14 of 22 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.06s]
[0m07:32:44.199726 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m07:32:44.200812 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m07:32:44.201891 [info ] [Thread-1 (]: 15 of 22 START sql table model main.dim_produto_credito ........................ [RUN]
[0m07:32:44.202466 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m07:32:44.203573 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m07:32:44.208710 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m07:32:44.210232 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m07:32:44.216794 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m07:32:44.219318 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m07:32:44.219318 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m07:32:44.219318 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:44.221549 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.222140 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m07:32:44.222140 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m07:32:44.224265 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.229993 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m07:32:44.229993 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m07:32:44.232198 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:44.235307 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m07:32:44.235844 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m07:32:44.236379 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m07:32:44.239304 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m07:32:44.243747 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m07:32:44.244751 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m07:32:44.245747 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:44.248268 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m07:32:44.248268 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C29072F0>]}
[0m07:32:44.249279 [info ] [Thread-1 (]: 15 of 22 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.05s]
[0m07:32:44.249279 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m07:32:44.249279 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m07:32:44.250852 [info ] [Thread-1 (]: 16 of 22 START sql table model main.dim_regiao ................................. [RUN]
[0m07:32:44.250852 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m07:32:44.252581 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m07:32:44.257815 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m07:32:44.259817 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m07:32:44.267978 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m07:32:44.269746 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m07:32:44.270754 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m07:32:44.271262 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:44.271769 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.271769 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m07:32:44.273376 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m07:32:44.275008 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.278157 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m07:32:44.280220 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m07:32:44.282319 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.283609 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m07:32:44.283609 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m07:32:44.284622 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m07:32:44.287322 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m07:32:44.292845 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m07:32:44.293961 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m07:32:44.295603 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.297165 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m07:32:44.297165 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C27C10D0>]}
[0m07:32:44.298185 [info ] [Thread-1 (]: 16 of 22 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.05s]
[0m07:32:44.298185 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m07:32:44.298726 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m07:32:44.299252 [info ] [Thread-1 (]: 17 of 22 START sql table model main.dim_risco .................................. [RUN]
[0m07:32:44.299252 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m07:32:44.299252 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m07:32:44.301628 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m07:32:44.302662 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m07:32:44.305854 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m07:32:44.306889 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m07:32:44.306889 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m07:32:44.306889 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:44.308006 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.308006 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m07:32:44.308006 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m07:32:44.309512 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.314696 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m07:32:44.314696 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m07:32:44.315702 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:44.316719 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m07:32:44.316719 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m07:32:44.317233 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m07:32:44.317773 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.319295 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m07:32:44.319295 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m07:32:44.320886 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:44.321513 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m07:32:44.322139 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C290B800>]}
[0m07:32:44.322139 [info ] [Thread-1 (]: 17 of 22 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.02s]
[0m07:32:44.323158 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m07:32:44.323665 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m07:32:44.324219 [info ] [Thread-1 (]: 18 of 22 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m07:32:44.325873 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m07:32:44.325873 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m07:32:44.328840 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m07:32:44.329439 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m07:32:44.333104 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m07:32:44.335119 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m07:32:44.335630 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m07:32:44.336637 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:44.337260 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:44.338885 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m07:32:44.339494 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m07:32:55.779865 [debug] [Thread-1 (]: SQL status: OK in 11.439 seconds
[0m07:32:55.783798 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m07:32:55.785307 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m07:32:55.785963 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:55.786631 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m07:32:55.787342 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m07:32:55.787958 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m07:32:55.840085 [debug] [Thread-1 (]: SQL status: OK in 0.052 seconds
[0m07:32:55.842707 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m07:32:55.842707 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m07:32:55.843720 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:55.846236 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m07:32:55.846825 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C28E7260>]}
[0m07:32:55.847378 [info ] [Thread-1 (]: 18 of 22 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 11.52s]
[0m07:32:55.847911 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m07:32:55.848465 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m07:32:55.848465 [info ] [Thread-1 (]: 19 of 22 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m07:32:55.849034 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m07:32:55.849034 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m07:32:55.850729 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m07:32:55.852387 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m07:32:55.855673 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m07:32:55.856696 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m07:32:55.857733 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m07:32:55.858732 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:55.859733 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:32:55.859733 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m07:32:55.860239 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m07:32:56.087498 [debug] [Thread-1 (]: SQL status: OK in 0.228 seconds
[0m07:32:56.091131 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m07:32:56.091131 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m07:32:56.092164 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:56.092827 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m07:32:56.093837 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m07:32:56.093837 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m07:32:56.103876 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m07:32:56.105617 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m07:32:56.105617 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m07:32:56.106654 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:56.107884 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m07:32:56.108883 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C28CEFF0>]}
[0m07:32:56.110392 [info ] [Thread-1 (]: 19 of 22 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.26s]
[0m07:32:56.110923 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m07:32:56.111510 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m07:32:56.111510 [info ] [Thread-1 (]: 20 of 22 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m07:32:56.112137 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m07:32:56.112137 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m07:32:56.114975 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m07:32:56.116512 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m07:32:56.118181 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m07:32:56.119734 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m07:32:56.119734 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m07:32:56.119734 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:32:56.120746 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:32:56.121708 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m07:32:56.122312 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m07:33:14.219209 [debug] [Thread-1 (]: SQL status: OK in 18.096 seconds
[0m07:33:14.223618 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m07:33:14.224289 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m07:33:14.224943 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:33:14.227088 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m07:33:14.227088 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m07:33:14.228151 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m07:33:14.261017 [debug] [Thread-1 (]: SQL status: OK in 0.033 seconds
[0m07:33:14.267858 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m07:33:14.267858 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m07:33:14.269407 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:33:14.271179 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m07:33:14.271844 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C2947980>]}
[0m07:33:14.272896 [info ] [Thread-1 (]: 20 of 22 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 18.16s]
[0m07:33:14.273446 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m07:33:14.274127 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m07:33:14.274816 [info ] [Thread-1 (]: 21 of 22 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m07:33:14.275458 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m07:33:14.276328 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m07:33:14.280408 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m07:33:14.282506 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m07:33:14.287447 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m07:33:14.289988 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m07:33:14.289988 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m07:33:14.290689 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:33:14.291340 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:33:14.291340 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m07:33:14.291340 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao as id_localizacao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m07:33:14.625778 [debug] [Thread-1 (]: SQL status: OK in 0.332 seconds
[0m07:33:14.629910 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m07:33:14.629910 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m07:33:14.630595 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:33:14.632144 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m07:33:14.632721 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m07:33:14.633726 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m07:33:14.643648 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m07:33:14.646108 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m07:33:14.646614 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m07:33:14.648140 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:33:14.650160 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m07:33:14.651896 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C28ECD70>]}
[0m07:33:14.652471 [info ] [Thread-1 (]: 21 of 22 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.38s]
[0m07:33:14.653036 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m07:33:14.653657 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m07:33:14.654192 [info ] [Thread-1 (]: 22 of 22 START sql table model main.fato_risco_credito ......................... [RUN]
[0m07:33:14.654731 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m07:33:14.655301 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m07:33:14.658271 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m07:33:14.659797 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m07:33:14.662652 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m07:33:14.664277 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m07:33:14.664277 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m07:33:14.664277 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m07:33:14.665288 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m07:33:14.665288 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m07:33:14.665288 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m07:33:15.137387 [debug] [Thread-1 (]: SQL status: OK in 0.471 seconds
[0m07:33:15.142320 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m07:33:15.142983 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m07:33:15.143641 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:33:15.145702 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m07:33:15.145702 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m07:33:15.146686 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m07:33:15.159654 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m07:33:15.162824 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m07:33:15.163911 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m07:33:15.164954 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m07:33:15.166507 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m07:33:15.167217 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd2444a12-6cef-4b67-89ef-1677c905dfc5', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C28CE9F0>]}
[0m07:33:15.168264 [info ] [Thread-1 (]: 22 of 22 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.51s]
[0m07:33:15.169817 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m07:33:15.171744 [debug] [MainThread]: Using duckdb connection "master"
[0m07:33:15.172412 [debug] [MainThread]: On master: BEGIN
[0m07:33:15.173141 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m07:33:15.173786 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m07:33:15.173786 [debug] [MainThread]: On master: COMMIT
[0m07:33:15.174492 [debug] [MainThread]: Using duckdb connection "master"
[0m07:33:15.174492 [debug] [MainThread]: On master: COMMIT
[0m07:33:15.175079 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m07:33:15.175079 [debug] [MainThread]: On master: Close
[0m07:33:15.175079 [debug] [MainThread]: Connection 'master' was properly closed.
[0m07:33:15.175707 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m07:33:15.176290 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m07:33:15.176848 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_risco_credito' was properly closed.
[0m07:33:15.176848 [info ] [MainThread]: 
[0m07:33:15.177564 [info ] [MainThread]: Finished running 6 seeds, 16 table models in 0 hours 0 minutes and 39.56 seconds (39.56s).
[0m07:33:15.183352 [debug] [MainThread]: Command end result
[0m07:33:15.224776 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m07:33:15.229966 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m07:33:15.241041 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m07:33:15.241041 [info ] [MainThread]: 
[0m07:33:15.241795 [info ] [MainThread]: [32mCompleted successfully[0m
[0m07:33:15.241795 [info ] [MainThread]: 
[0m07:33:15.242346 [info ] [MainThread]: Done. PASS=22 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=22
[0m07:33:15.242932 [debug] [MainThread]: Command `dbt build` succeeded at 07:33:15.242932 after 43.82 seconds
[0m07:33:15.242932 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C28F7650>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C28F4230>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000128C28F6090>]}
[0m07:33:15.243944 [debug] [MainThread]: Flushing usage events
[0m07:33:16.252373 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m08:51:37.568243 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF75995E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF78B41A0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF50F6540>]}


============================== 08:51:37.573707 | 48a89162-464c-4584-b409-fd180873bd61 ==============================
[0m08:51:37.573707 [info ] [MainThread]: Running with dbt=1.11.5
[0m08:51:37.574313 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m08:51:37.804385 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF6C96630>]}
[0m08:51:37.852729 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF739C680>]}
[0m08:51:37.855760 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m08:51:38.167471 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m08:51:38.330281 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m08:51:38.330801 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m08:51:38.331330 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m08:51:38.336669 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.bronze
[0m08:51:38.365086 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF9060290>]}
[0m08:51:38.445546 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m08:51:38.449578 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m08:51:38.506708 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF9062690>]}
[0m08:51:38.506708 [info ] [MainThread]: Found 16 models, 6 seeds, 19 sources, 472 macros
[0m08:51:38.509750 [info ] [MainThread]: 
[0m08:51:38.509750 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m08:51:38.509750 [info ] [MainThread]: 
[0m08:51:38.510756 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m08:51:38.515578 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m08:51:38.597829 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m08:51:38.597829 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m08:51:38.597829 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m08:51:39.265111 [debug] [ThreadPool]: SQL status: OK in 0.666 seconds
[0m08:51:39.266120 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m08:51:39.267630 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m08:51:39.267630 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m08:51:39.271931 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m08:51:39.273619 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m08:51:39.273619 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m08:51:39.275330 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m08:51:39.276914 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m08:51:39.276914 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m08:51:39.277444 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m08:51:39.278004 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m08:51:39.278004 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m08:51:39.278525 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m08:51:39.279083 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m08:51:39.279603 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m08:51:39.279603 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m08:51:39.280161 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m08:51:39.280670 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m08:51:39.282307 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m08:51:39.287129 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m08:51:39.288144 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m08:51:39.288144 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m08:51:39.289144 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m08:51:39.289654 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m08:51:39.290176 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m08:51:39.300753 [debug] [ThreadPool]: SQL status: OK in 0.010 seconds
[0m08:51:39.300753 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m08:51:39.302385 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m08:51:39.304016 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m08:51:39.304016 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF4776AB0>]}
[0m08:51:39.306295 [debug] [MainThread]: Using duckdb connection "master"
[0m08:51:39.306814 [debug] [MainThread]: On master: BEGIN
[0m08:51:39.307349 [debug] [MainThread]: Opening a new connection, currently in state init
[0m08:51:39.308448 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m08:51:39.308448 [debug] [MainThread]: On master: COMMIT
[0m08:51:39.308999 [debug] [MainThread]: Using duckdb connection "master"
[0m08:51:39.308999 [debug] [MainThread]: On master: COMMIT
[0m08:51:39.309535 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m08:51:39.310109 [debug] [MainThread]: On master: Close
[0m08:51:39.314366 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m08:51:39.315376 [info ] [Thread-1 (]: 1 of 22 START sql table model main.dim_instituicao ............................. [RUN]
[0m08:51:39.315376 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m08:51:39.316377 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m08:51:39.326588 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m08:51:39.328265 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m08:51:39.370742 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m08:51:39.372388 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m08:51:39.372388 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m08:51:39.372388 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m08:51:39.373899 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:39.373899 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m08:51:39.374445 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH unificacao AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Prudencial' as tipo_instituicao,
        NULL as cidade,
        NULL as uf
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    -- Conglomerados Financeiros
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    -- Instituições Independentes
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento_resolucao,
        'Instituicao Individual' as tipo_instituicao,
        cidade,
        uf
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT DISTINCT
    -- Cria um ID único baseado no código (MD5 para garantir consistência)
    md5(cast(codigo_origem as varchar)) as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    segmento_resolucao as segmento,
    cidade,
    uf
FROM unificacao
    );
  
  
[0m08:51:39.455889 [debug] [Thread-1 (]: SQL status: OK in 0.082 seconds
[0m08:51:39.462065 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m08:51:39.462676 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m08:51:39.463733 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:39.473460 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m08:51:39.473460 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m08:51:39.474063 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m08:51:39.483594 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m08:51:39.489574 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m08:51:39.490106 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m08:51:39.491139 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:39.492841 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m08:51:39.494460 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF8DF3A70>]}
[0m08:51:39.495481 [info ] [Thread-1 (]: 1 of 22 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.18s]
[0m08:51:39.495481 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m08:51:39.495481 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m08:51:39.496474 [info ] [Thread-1 (]: 2 of 22 START sql table model main.dim_tempo ................................... [RUN]
[0m08:51:39.496474 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_tempo)
[0m08:51:39.496474 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m08:51:39.499550 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m08:51:39.499550 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m08:51:39.502641 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m08:51:39.503658 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m08:51:39.504167 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m08:51:39.504167 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:39.504167 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:39.504167 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m08:51:39.504167 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "bronze"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m08:51:39.518305 [debug] [Thread-1 (]: SQL status: OK in 0.013 seconds
[0m08:51:39.520814 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m08:51:39.521818 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m08:51:39.522321 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:39.523327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m08:51:39.523327 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m08:51:39.523928 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m08:51:39.524987 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:39.527012 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m08:51:39.527804 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m08:51:39.528902 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:39.529962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m08:51:39.530513 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF97F5700>]}
[0m08:51:39.531048 [info ] [Thread-1 (]: 2 of 22 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.03s]
[0m08:51:39.531586 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m08:51:39.532154 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m08:51:39.532154 [info ] [Thread-1 (]: 3 of 22 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m08:51:39.532794 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m08:51:39.532794 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m08:51:39.536136 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m08:51:39.537147 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m08:51:39.539860 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m08:51:39.540457 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m08:51:39.540984 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m08:51:39.540984 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:39.540984 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:39.540984 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m08:51:39.542883 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH ativos_passivos AS (
    -- Conglomerados Prudenciais
    SELECT 
        COALESCE(a.codigo, p.codigo) as codigo, 
        COALESCE(a.data_base, p.data_base) as data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "bronze"."main"."prudential_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        COALESCE(a.codigo, p.codigo) as codigo, 
        COALESCE(a.data_base, p.data_base) as data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "bronze"."main"."financial_conglomerates_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT 
        COALESCE(a.codigo, p.codigo) as codigo, 
        COALESCE(a.data_base, p.data_base) as data_base,
        a.disponibilidades,
        a.operacoes_de_credito,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm,
        a.ativo_total,
        p.depositos_vista,
        p.depositos_a_prazo,
        p.captacoes,
        p.patrimonio_liquido,
        p.passivo_total
    FROM "bronze"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "bronze"."main"."individual_institutions_liabilities" p
      ON a.codigo = p.codigo AND a.data_base = p.data_base
)

SELECT
    md5(cast(ap.codigo as varchar)) as id_instituicao,
    strftime(ap.data_base, '%Y%m%d')::int as id_data,
    ap.disponibilidades,
    ap.operacoes_de_credito,
    ap.tvm as titulos_valores_mobiliarios,
    ap.ativo_total,
    ap.depositos_vista,
    ap.depositos_a_prazo,
    ap.captacoes,
    ap.patrimonio_liquido,
    ap.passivo_total
FROM ativos_passivos ap
    );
  
  
[0m08:51:39.933554 [debug] [Thread-1 (]: SQL status: OK in 0.390 seconds
[0m08:51:39.936063 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m08:51:39.936063 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m08:51:39.937070 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:39.938075 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m08:51:39.938075 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m08:51:39.938075 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m08:51:40.059840 [debug] [Thread-1 (]: SQL status: OK in 0.121 seconds
[0m08:51:40.062864 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m08:51:40.062864 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m08:51:40.062864 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:40.065728 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m08:51:40.065728 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF98438C0>]}
[0m08:51:40.066734 [info ] [Thread-1 (]: 3 of 22 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.53s]
[0m08:51:40.067343 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m08:51:40.067343 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m08:51:40.067847 [info ] [Thread-1 (]: 4 of 22 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m08:51:40.068358 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m08:51:40.068926 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m08:51:40.071995 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m08:51:40.073513 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m08:51:40.076841 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m08:51:40.077414 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m08:51:40.078932 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m08:51:40.078932 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:40.079956 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:40.079956 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m08:51:40.080466 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."prudential_conglomerates_income_statement"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."financial_conglomerates_income_statement"

    UNION ALL

    -- Instituições Individuais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
        rendas_prestacao_servicos,
        despesas_pessoal,
        despesas_administrativas,
        resultado_operacional,
        lucro_liquido,
        juros_sobre_capital_social_cooperativas
    FROM "bronze"."main"."individual_institutions_income_statement"
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    rendas_operacoes_de_credito,
    receitas_intermediacao_financeira,
    despesas_captacao,
    despesas_intermediacao_financeira,
    resultado_intermediacao_financeira,
    rendas_prestacao_servicos,
    despesas_pessoal,
    despesas_administrativas,
    resultado_operacional,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas
FROM dre
    );
  
  
[0m08:51:40.462656 [debug] [Thread-1 (]: SQL status: OK in 0.328 seconds
[0m08:51:40.465433 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m08:51:40.465974 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m08:51:40.466510 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:40.468118 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m08:51:40.468118 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m08:51:40.468118 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m08:51:40.601206 [debug] [Thread-1 (]: SQL status: OK in 0.132 seconds
[0m08:51:40.602726 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m08:51:40.602726 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m08:51:40.603733 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:40.604244 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m08:51:40.604244 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF9854500>]}
[0m08:51:40.605758 [info ] [Thread-1 (]: 4 of 22 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.54s]
[0m08:51:40.605758 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m08:51:40.606770 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m08:51:40.606770 [info ] [Thread-1 (]: 5 of 22 START sql table model main.fato_resumo_financeiro ...................... [RUN]
[0m08:51:40.607363 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m08:51:40.607871 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m08:51:40.610570 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m08:51:40.611718 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m08:51:40.613985 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m08:51:40.614998 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m08:51:40.614998 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m08:51:40.614998 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:40.614998 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:40.614998 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m08:51:40.616506 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."prudential_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."financial_conglomerates_summary"
    
    UNION ALL
    
    SELECT 
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "bronze"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(d.codigo as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo
    
    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido
    
FROM dados_brutos d
    );
  
  
[0m08:51:40.843137 [debug] [Thread-1 (]: SQL status: OK in 0.226 seconds
[0m08:51:40.845146 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m08:51:40.845146 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m08:51:40.846144 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:40.848034 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m08:51:40.848540 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m08:51:40.848540 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m08:51:40.921069 [debug] [Thread-1 (]: SQL status: OK in 0.072 seconds
[0m08:51:40.922873 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m08:51:40.923396 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m08:51:40.924017 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:40.925026 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m08:51:40.925535 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF9842390>]}
[0m08:51:40.926045 [info ] [Thread-1 (]: 5 of 22 OK created sql table model main.fato_resumo_financeiro ................. [[32mOK[0m in 0.32s]
[0m08:51:40.926045 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m08:51:40.927056 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m08:51:40.927590 [info ] [Thread-1 (]: 6 of 22 START seed file main.seed_dim_atividade ................................ [RUN]
[0m08:51:40.927590 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m08:51:40.928166 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m08:51:40.928166 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m08:51:40.947233 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m08:51:40.947233 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m08:51:40.948226 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:40.948738 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:40.949242 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m08:51:40.949242 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m08:51:40.949242 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:40.960319 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m08:51:40.960855 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m08:51:40.966975 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m08:51:40.973830 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m08:51:40.976122 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m08:51:40.976122 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m08:51:40.977147 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m08:51:40.978662 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:40.978662 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m08:51:40.979662 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF985E5D0>]}
[0m08:51:40.980192 [info ] [Thread-1 (]: 6 of 22 OK loaded seed file main.seed_dim_atividade ............................ [[32mINSERT 10[0m in 0.05s]
[0m08:51:40.980192 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m08:51:40.980192 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m08:51:40.980192 [info ] [Thread-1 (]: 7 of 22 START seed file main.seed_dim_faixa_vencimento ......................... [RUN]
[0m08:51:40.981788 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m08:51:40.982362 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m08:51:40.982362 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m08:51:40.986206 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m08:51:40.986772 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m08:51:40.986772 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:40.987340 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:40.987906 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m08:51:40.987906 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m08:51:40.987906 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:40.989427 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m08:51:40.989427 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m08:51:40.991074 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m08:51:40.992241 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m08:51:40.994883 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m08:51:40.995884 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m08:51:40.995884 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m08:51:40.997880 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:40.998926 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m08:51:40.999524 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF8F0BAA0>]}
[0m08:51:40.999524 [info ] [Thread-1 (]: 7 of 22 OK loaded seed file main.seed_dim_faixa_vencimento ..................... [[32mINSERT 7[0m in 0.02s]
[0m08:51:41.000102 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m08:51:41.000661 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m08:51:41.001226 [info ] [Thread-1 (]: 8 of 22 START seed file main.seed_dim_porte .................................... [RUN]
[0m08:51:41.001747 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m08:51:41.002269 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m08:51:41.002269 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m08:51:41.004098 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m08:51:41.005863 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m08:51:41.005863 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:41.005863 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.006873 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m08:51:41.006873 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m08:51:41.007495 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.008612 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m08:51:41.008612 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m08:51:41.011030 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m08:51:41.011030 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m08:51:41.014152 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m08:51:41.014764 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m08:51:41.015301 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m08:51:41.017024 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.018085 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m08:51:41.018085 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF966AED0>]}
[0m08:51:41.019098 [info ] [Thread-1 (]: 8 of 22 OK loaded seed file main.seed_dim_porte ................................ [[32mINSERT 6[0m in 0.02s]
[0m08:51:41.019640 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m08:51:41.019640 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m08:51:41.019640 [info ] [Thread-1 (]: 9 of 22 START seed file main.seed_dim_produto_credito .......................... [RUN]
[0m08:51:41.020632 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m08:51:41.021175 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m08:51:41.021175 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m08:51:41.024464 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m08:51:41.024464 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m08:51:41.024464 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:41.024464 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.026013 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m08:51:41.026013 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m08:51:41.026013 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.027529 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m08:51:41.027529 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m08:51:41.030178 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m08:51:41.030178 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m08:51:41.032734 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m08:51:41.033293 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m08:51:41.033854 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m08:51:41.034920 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.035547 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m08:51:41.035547 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF97946E0>]}
[0m08:51:41.036170 [info ] [Thread-1 (]: 9 of 22 OK loaded seed file main.seed_dim_produto_credito ...................... [[32mINSERT 14[0m in 0.01s]
[0m08:51:41.036170 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m08:51:41.036170 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m08:51:41.037280 [info ] [Thread-1 (]: 10 of 22 START seed file main.seed_dim_regiao .................................. [RUN]
[0m08:51:41.037791 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m08:51:41.037791 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m08:51:41.037791 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m08:51:41.041190 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m08:51:41.041190 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m08:51:41.041732 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:41.042239 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.042239 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m08:51:41.042871 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m08:51:41.042871 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.043882 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m08:51:41.044886 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m08:51:41.047127 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m08:51:41.047657 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m08:51:41.049966 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m08:51:41.049966 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m08:51:41.050579 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m08:51:41.051694 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.052207 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m08:51:41.052207 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF97946E0>]}
[0m08:51:41.052207 [info ] [Thread-1 (]: 10 of 22 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.01s]
[0m08:51:41.053832 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m08:51:41.053832 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m08:51:41.053832 [info ] [Thread-1 (]: 11 of 22 START seed file main.seed_dim_risco ................................... [RUN]
[0m08:51:41.054850 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m08:51:41.054850 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m08:51:41.054850 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m08:51:41.058877 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m08:51:41.058877 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m08:51:41.059883 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:41.061211 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.061753 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m08:51:41.062284 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m08:51:41.062847 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.064565 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m08:51:41.064565 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m08:51:41.066214 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.066769 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m08:51:41.067865 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m08:51:41.067865 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m08:51:41.069381 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m08:51:41.069381 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.071135 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m08:51:41.071135 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF9842210>]}
[0m08:51:41.071799 [info ] [Thread-1 (]: 11 of 22 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.02s]
[0m08:51:41.071799 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m08:51:41.071799 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m08:51:41.071799 [info ] [Thread-1 (]: 12 of 22 START sql table model main.dim_atividade .............................. [RUN]
[0m08:51:41.073453 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now model.bacen_ifdata_analytics.dim_atividade)
[0m08:51:41.073453 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m08:51:41.076731 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m08:51:41.077817 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m08:51:41.081305 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m08:51:41.082441 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m08:51:41.082441 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m08:51:41.083000 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:41.083525 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.083525 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m08:51:41.083525 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m08:51:41.085043 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.087064 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m08:51:41.087064 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m08:51:41.088078 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.089589 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m08:51:41.089589 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m08:51:41.090097 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m08:51:41.091103 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.094327 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m08:51:41.094864 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m08:51:41.095925 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.096996 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m08:51:41.097565 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF47CFB60>]}
[0m08:51:41.098184 [info ] [Thread-1 (]: 12 of 22 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.02s]
[0m08:51:41.098711 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m08:51:41.098711 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m08:51:41.099717 [info ] [Thread-1 (]: 13 of 22 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m08:51:41.099717 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m08:51:41.099717 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m08:51:41.102497 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m08:51:41.104106 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m08:51:41.106754 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m08:51:41.107259 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m08:51:41.108264 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m08:51:41.108264 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:41.108833 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.108833 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m08:51:41.108833 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m08:51:41.110348 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.113542 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m08:51:41.113542 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m08:51:41.114099 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.115652 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m08:51:41.115652 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m08:51:41.115652 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m08:51:41.117156 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.119160 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m08:51:41.119160 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m08:51:41.119664 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.120671 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m08:51:41.121288 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF8E1D190>]}
[0m08:51:41.121931 [info ] [Thread-1 (]: 13 of 22 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.02s]
[0m08:51:41.121931 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m08:51:41.121931 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m08:51:41.121931 [info ] [Thread-1 (]: 14 of 22 START sql table model main.dim_porte .................................. [RUN]
[0m08:51:41.121931 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m08:51:41.123583 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m08:51:41.126860 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m08:51:41.128442 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m08:51:41.130669 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m08:51:41.131784 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m08:51:41.133027 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m08:51:41.133027 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:41.133027 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.133027 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m08:51:41.133027 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m08:51:41.134793 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.137108 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m08:51:41.137108 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m08:51:41.137108 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.139659 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m08:51:41.139659 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m08:51:41.140170 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m08:51:41.141768 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.143410 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m08:51:41.143977 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m08:51:41.143977 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.144987 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m08:51:41.145987 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF9844FB0>]}
[0m08:51:41.145987 [info ] [Thread-1 (]: 14 of 22 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.02s]
[0m08:51:41.146987 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m08:51:41.146987 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m08:51:41.146987 [info ] [Thread-1 (]: 15 of 22 START sql table model main.dim_produto_credito ........................ [RUN]
[0m08:51:41.148025 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m08:51:41.148536 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m08:51:41.149545 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m08:51:41.151282 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m08:51:41.156027 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m08:51:41.157747 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m08:51:41.158348 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m08:51:41.158926 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:41.159490 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.160050 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m08:51:41.160601 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m08:51:41.161798 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.165341 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m08:51:41.166854 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m08:51:41.167871 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.169382 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m08:51:41.169382 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m08:51:41.169382 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m08:51:41.171650 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.174898 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m08:51:41.174898 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m08:51:41.176538 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.178190 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m08:51:41.178766 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF9826120>]}
[0m08:51:41.179336 [info ] [Thread-1 (]: 15 of 22 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.03s]
[0m08:51:41.179902 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m08:51:41.180465 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m08:51:41.180465 [info ] [Thread-1 (]: 16 of 22 START sql table model main.dim_regiao ................................. [RUN]
[0m08:51:41.181482 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m08:51:41.181482 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m08:51:41.183571 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m08:51:41.184554 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m08:51:41.187637 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m08:51:41.188652 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m08:51:41.188652 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m08:51:41.189157 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:41.189157 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.190165 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m08:51:41.190165 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m08:51:41.191182 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.194310 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m08:51:41.194846 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m08:51:41.195382 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.196455 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m08:51:41.196988 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m08:51:41.196988 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m08:51:41.199123 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.200633 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m08:51:41.200633 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m08:51:41.200633 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.202858 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m08:51:41.202858 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF97C4860>]}
[0m08:51:41.203866 [info ] [Thread-1 (]: 16 of 22 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.02s]
[0m08:51:41.204371 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m08:51:41.204371 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m08:51:41.204371 [info ] [Thread-1 (]: 17 of 22 START sql table model main.dim_risco .................................. [RUN]
[0m08:51:41.204371 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m08:51:41.205977 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m08:51:41.207601 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m08:51:41.209610 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m08:51:41.212103 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m08:51:41.213430 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m08:51:41.213430 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m08:51:41.214107 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:41.214655 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.214655 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m08:51:41.214655 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m08:51:41.215717 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.218048 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m08:51:41.218048 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m08:51:41.218048 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.219568 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m08:51:41.219568 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m08:51:41.219568 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m08:51:41.221190 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.223352 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m08:51:41.223929 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m08:51:41.224468 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:41.225548 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m08:51:41.226084 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF9197E90>]}
[0m08:51:41.226721 [info ] [Thread-1 (]: 17 of 22 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.02s]
[0m08:51:41.227290 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m08:51:41.227290 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m08:51:41.227871 [info ] [Thread-1 (]: 18 of 22 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m08:51:41.228406 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m08:51:41.228406 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m08:51:41.230026 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m08:51:41.231779 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m08:51:41.235399 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m08:51:41.236919 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m08:51:41.236919 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m08:51:41.237934 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:41.237934 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m08:51:41.238938 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m08:51:41.238938 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m08:51:49.151106 [debug] [Thread-1 (]: SQL status: OK in 7.911 seconds
[0m08:51:49.153626 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m08:51:49.153626 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m08:51:49.154632 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:49.156735 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m08:51:49.157239 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m08:51:49.157239 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m08:51:49.198077 [debug] [Thread-1 (]: SQL status: OK in 0.040 seconds
[0m08:51:49.200167 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m08:51:49.200674 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m08:51:49.201266 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:49.202277 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m08:51:49.202277 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF97B9670>]}
[0m08:51:49.203277 [info ] [Thread-1 (]: 18 of 22 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 7.97s]
[0m08:51:49.203277 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m08:51:49.203277 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m08:51:49.204274 [info ] [Thread-1 (]: 19 of 22 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m08:51:49.204274 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m08:51:49.204274 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m08:51:49.207798 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m08:51:49.208859 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m08:51:49.210913 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m08:51:49.211922 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m08:51:49.211922 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m08:51:49.211922 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:49.212933 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:49.213444 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m08:51:49.213444 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m08:51:49.378974 [debug] [Thread-1 (]: SQL status: OK in 0.165 seconds
[0m08:51:49.381760 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m08:51:49.381760 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m08:51:49.382275 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:49.384444 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m08:51:49.385009 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m08:51:49.385009 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m08:51:49.388032 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m08:51:49.390089 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m08:51:49.390089 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m08:51:49.390089 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:49.391624 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m08:51:49.392145 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF7818770>]}
[0m08:51:49.392739 [info ] [Thread-1 (]: 19 of 22 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.19s]
[0m08:51:49.392739 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m08:51:49.392739 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m08:51:49.393744 [info ] [Thread-1 (]: 20 of 22 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m08:51:49.393744 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m08:51:49.393744 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m08:51:49.397968 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m08:51:49.399033 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m08:51:49.401312 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m08:51:49.402328 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m08:51:49.402835 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m08:51:49.402835 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:51:49.402835 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:51:49.403838 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m08:51:49.403838 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m08:52:02.537399 [debug] [Thread-1 (]: SQL status: OK in 13.133 seconds
[0m08:52:02.540759 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m08:52:02.540759 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m08:52:02.541789 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:52:02.542862 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m08:52:02.542862 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m08:52:02.542862 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m08:52:02.562642 [debug] [Thread-1 (]: SQL status: OK in 0.020 seconds
[0m08:52:02.566764 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m08:52:02.566764 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m08:52:02.568141 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:52:02.569238 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m08:52:02.569238 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF986A090>]}
[0m08:52:02.569769 [info ] [Thread-1 (]: 20 of 22 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 13.18s]
[0m08:52:02.570339 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m08:52:02.570912 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m08:52:02.571436 [info ] [Thread-1 (]: 21 of 22 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m08:52:02.571436 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m08:52:02.572075 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m08:52:02.573462 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m08:52:02.575097 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m08:52:02.577376 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m08:52:02.578382 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m08:52:02.578382 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m08:52:02.578382 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:52:02.578382 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:52:02.578382 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m08:52:02.579890 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao as id_localizacao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m08:52:02.851482 [debug] [Thread-1 (]: SQL status: OK in 0.271 seconds
[0m08:52:02.853647 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m08:52:02.854212 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m08:52:02.854770 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:52:02.855775 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m08:52:02.855775 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m08:52:02.856279 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m08:52:02.863429 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m08:52:02.866065 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m08:52:02.866065 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m08:52:02.866674 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:52:02.867763 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m08:52:02.868294 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF9735D30>]}
[0m08:52:02.868854 [info ] [Thread-1 (]: 21 of 22 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.30s]
[0m08:52:02.868854 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m08:52:02.869397 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m08:52:02.869932 [info ] [Thread-1 (]: 22 of 22 START sql table model main.fato_risco_credito ......................... [RUN]
[0m08:52:02.869932 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m08:52:02.869932 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m08:52:02.872191 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m08:52:02.873710 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m08:52:02.875902 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m08:52:02.877612 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m08:52:02.878235 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m08:52:02.878235 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m08:52:02.878235 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:52:02.878235 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m08:52:02.879750 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "bronze"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(codigo as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m08:52:03.195869 [debug] [Thread-1 (]: SQL status: OK in 0.315 seconds
[0m08:52:03.198377 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m08:52:03.198377 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m08:52:03.199382 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:52:03.200968 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m08:52:03.200968 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m08:52:03.202545 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m08:52:03.212090 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m08:52:03.215252 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m08:52:03.216761 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m08:52:03.217358 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m08:52:03.219517 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m08:52:03.219517 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48a89162-464c-4584-b409-fd180873bd61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF7CCE7B0>]}
[0m08:52:03.221035 [info ] [Thread-1 (]: 22 of 22 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.35s]
[0m08:52:03.221610 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m08:52:03.223214 [debug] [MainThread]: Using duckdb connection "master"
[0m08:52:03.223725 [debug] [MainThread]: On master: BEGIN
[0m08:52:03.223725 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m08:52:03.224877 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m08:52:03.224877 [debug] [MainThread]: On master: COMMIT
[0m08:52:03.225989 [debug] [MainThread]: Using duckdb connection "master"
[0m08:52:03.225989 [debug] [MainThread]: On master: COMMIT
[0m08:52:03.226533 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m08:52:03.227072 [debug] [MainThread]: On master: Close
[0m08:52:03.227610 [debug] [MainThread]: Connection 'master' was properly closed.
[0m08:52:03.227610 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m08:52:03.227610 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m08:52:03.228145 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_risco_credito' was properly closed.
[0m08:52:03.228145 [info ] [MainThread]: 
[0m08:52:03.228672 [info ] [MainThread]: Finished running 6 seeds, 16 table models in 0 hours 0 minutes and 24.72 seconds (24.72s).
[0m08:52:03.231833 [debug] [MainThread]: Command end result
[0m08:52:03.255010 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m08:52:03.257586 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m08:52:03.264101 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m08:52:03.264101 [info ] [MainThread]: 
[0m08:52:03.265110 [info ] [MainThread]: [32mCompleted successfully[0m
[0m08:52:03.265708 [info ] [MainThread]: 
[0m08:52:03.265708 [info ] [MainThread]: Done. PASS=22 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=22
[0m08:52:03.267227 [debug] [MainThread]: Command `dbt build` succeeded at 08:52:03.267227 after 25.84 seconds
[0m08:52:03.267773 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF50F6540>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF970B500>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000029CF6C61F10>]}
[0m08:52:03.268314 [debug] [MainThread]: Flushing usage events
[0m08:52:04.287557 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m11:26:57.505227 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D001C2E000>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D07FEDE8D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0042F7080>]}


============================== 11:26:57.510108 | 5877fe05-261c-4c64-98f5-fce53f00690b ==============================
[0m11:26:57.510108 [info ] [MainThread]: Running with dbt=1.11.5
[0m11:26:57.510108 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m11:26:57.542880 [error] [MainThread]: Encountered an error:
Parsing Error
  Env var required but not provided: 'BRONZE_DB_PATH'
[0m11:26:57.545189 [debug] [MainThread]: Command `dbt build` failed at 11:26:57.545189 after 0.17 seconds
[0m11:26:57.545189 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D004F14230>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0047A82F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D00484D7F0>]}
[0m11:26:57.546715 [debug] [MainThread]: Flushing usage events
[0m11:26:58.438399 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m14:27:06.977724 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017341BD8BF0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017341BD8410>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001734201F620>]}


============================== 14:27:06.987366 | 5d18819e-215e-4aea-a020-b78a7a2a2dc9 ==============================
[0m14:27:06.987366 [info ] [MainThread]: Running with dbt=1.11.5
[0m14:27:06.987938 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m14:27:07.000281 [error] [MainThread]: Encountered an error:
Parsing Error
  Env var required but not provided: 'BRONZE_DB_PATH'
[0m14:27:07.001287 [debug] [MainThread]: Command `dbt build` failed at 14:27:07.000281 after 0.29 seconds
[0m14:27:07.001287 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017342507A10>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017341D9AD80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017341DB78F0>]}
[0m14:27:07.001792 [debug] [MainThread]: Flushing usage events
[0m14:27:07.718581 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m14:30:05.288643 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AAFEDB1C10>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AAFEE151C0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AA81C22000>]}


============================== 14:30:05.292747 | a03dff9b-abd2-42d3-a687-78414ba2bb08 ==============================
[0m14:30:05.292747 [info ] [MainThread]: Running with dbt=1.11.5
[0m14:30:05.292747 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m14:30:05.298390 [error] [MainThread]: Encountered an error:
Parsing Error
  Env var required but not provided: 'BRONZE_DB_PATH'
[0m14:30:05.299394 [debug] [MainThread]: Command `dbt build` failed at 14:30:05.299394 after 0.14 seconds
[0m14:30:05.299394 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AA82497B00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AA81D378C0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AA82442A20>]}
[0m14:30:05.299394 [debug] [MainThread]: Flushing usage events
[0m14:30:06.271900 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m14:32:36.981192 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016D43761880>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016D45DC5D00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016D45DC5BE0>]}


============================== 14:32:36.990684 | 0124368a-480d-4581-9e36-5884f6965f82 ==============================
[0m14:32:36.990684 [info ] [MainThread]: Running with dbt=1.11.5
[0m14:32:36.992230 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m14:32:37.001008 [error] [MainThread]: Encountered an error:
Parsing Error
  Env var required but not provided: 'BRONZE_DB_PATH'
[0m14:32:37.002252 [debug] [MainThread]: Command `dbt build` failed at 14:32:37.002252 after 0.24 seconds
[0m14:32:37.003290 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016D46A74E90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016D466177D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016D46D985C0>]}
[0m14:32:37.003803 [debug] [MainThread]: Flushing usage events
[0m14:32:37.684604 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m14:33:22.012132 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020FF07A1280>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020FF0A157F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020FED83AE70>]}


============================== 14:33:22.015879 | fe1a38a2-96ee-4d89-91e0-eb75b801a988 ==============================
[0m14:33:22.015879 [info ] [MainThread]: Running with dbt=1.11.5
[0m14:33:22.016389 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m14:33:22.021768 [error] [MainThread]: Encountered an error:
Parsing Error
  Env var required but not provided: 'GOLD_DB_PATH'
[0m14:33:22.022888 [debug] [MainThread]: Command `dbt build` failed at 14:33:22.022888 after 0.18 seconds
[0m14:33:22.023895 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020FF1328C50>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020FEE7A0B00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020FF110F320>]}
[0m14:33:22.023895 [debug] [MainThread]: Flushing usage events
[0m14:33:22.667450 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m14:33:50.376206 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000161791F7290>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016178DD5820>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000161791F7560>]}


============================== 14:33:50.382448 | c40d73a4-fbaf-4c65-a6e9-c6ceb5e73810 ==============================
[0m14:33:50.382448 [info ] [MainThread]: Running with dbt=1.11.5
[0m14:33:50.382448 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m14:33:50.392904 [error] [MainThread]: Encountered an error:
Parsing Error
  Env var required but not provided: 'BRONZE_DB_PATH'
[0m14:33:50.396939 [debug] [MainThread]: Command `dbt build` failed at 14:33:50.396939 after 0.21 seconds
[0m14:33:50.396939 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016178DD5820>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001617937F200>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000161793278F0>]}
[0m14:33:50.397946 [debug] [MainThread]: Flushing usage events
[0m14:33:51.225744 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m14:35:04.082571 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000174B321B6B0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000174B2F669C0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000174B3249250>]}


============================== 14:35:04.086748 | 9f455868-4aa4-4cd8-bcae-5014ae68e492 ==============================
[0m14:35:04.086748 [info ] [MainThread]: Running with dbt=1.11.5
[0m14:35:04.087826 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m14:35:04.404926 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '9f455868-4aa4-4cd8-bcae-5014ae68e492', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000174B4B0B3B0>]}
[0m14:35:04.454338 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '9f455868-4aa4-4cd8-bcae-5014ae68e492', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000174B064ED20>]}
[0m14:35:04.479063 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m14:35:04.981586 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m14:35:05.075010 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m14:35:05.076265 [info ] [MainThread]: Unable to do partial parsing because a project config has changed
[0m14:35:05.076808 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '9f455868-4aa4-4cd8-bcae-5014ae68e492', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000174B3266A50>]}
[0m14:35:07.181070 [error] [MainThread]: Encountered an error:
Compilation Error
  Model 'model.bacen_ifdata_analytics.fato_carteira_credito_produto' (models\gold\fato_carteira_credito_produto.sql) depends on a source named 'bronze.financial_conglomerates_portfolio_individuals_type_maturity' which was not found
[0m14:35:07.181070 [debug] [MainThread]: Command `dbt build` failed at 14:35:07.181070 after 3.24 seconds
[0m14:35:07.181070 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000174B5401EE0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000174B5326300>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000174B53BEA20>]}
[0m14:35:07.182690 [debug] [MainThread]: Flushing usage events
[0m14:35:07.994417 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m14:36:02.439159 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013E91BD2F30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013E91BD1400>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013E91BD33E0>]}


============================== 14:36:02.445562 | e6e11d3f-a2fc-4c22-8b23-115be76b6436 ==============================
[0m14:36:02.445562 [info ] [MainThread]: Running with dbt=1.11.5
[0m14:36:02.447076 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m14:36:02.711694 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'e6e11d3f-a2fc-4c22-8b23-115be76b6436', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013E92A94B00>]}
[0m14:36:02.767883 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'e6e11d3f-a2fc-4c22-8b23-115be76b6436', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013E8F6BE3C0>]}
[0m14:36:02.770467 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m14:36:03.035852 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m14:36:03.104724 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m14:36:03.106399 [info ] [MainThread]: Unable to do partial parsing because a project config has changed
[0m14:36:03.107096 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': 'e6e11d3f-a2fc-4c22-8b23-115be76b6436', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013E94072C60>]}
[0m14:36:04.139761 [error] [MainThread]: Encountered an error:
Compilation Error
  Model 'model.bacen_ifdata_analytics.fato_carteira_credito_produto' (models\gold\fato_carteira_credito_produto.sql) depends on a source named 'bronze.financial_conglomerates_portfolio_individuals_type_maturity' which was not found
[0m14:36:04.141761 [debug] [MainThread]: Command `dbt build` failed at 14:36:04.141761 after 1.96 seconds
[0m14:36:04.141761 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013E91BA0860>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013E9413F530>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013E943418E0>]}
[0m14:36:04.142763 [debug] [MainThread]: Flushing usage events
[0m14:36:04.768230 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:20:35.038608 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000268284EC860>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026827FEC590>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002682906F290>]}


============================== 15:20:35.046667 | 11a89d88-f102-44ca-9a6f-3fccf5077752 ==============================
[0m15:20:35.046667 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:20:35.047250 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'None', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\Users\\alexc\\.dbt', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt deps --project-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:20:35.284413 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '11a89d88-f102-44ca-9a6f-3fccf5077752', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026829436BD0>]}
[0m15:20:35.519510 [debug] [MainThread]: Set downloads directory='C:\Users\alexc\AppData\Local\Temp\dbt-downloads-jbjaoeu5'
[0m15:20:35.520132 [debug] [MainThread]: Making package index registry request: GET https://hub.getdbt.com/api/v1/index.json
[0m15:20:35.813280 [debug] [MainThread]: Response from registry index: GET https://hub.getdbt.com/api/v1/index.json 200
[0m15:20:35.817478 [debug] [MainThread]: Making package registry request: GET https://hub.getdbt.com/api/v1/dbt-labs/dbt_utils.json
[0m15:20:35.901392 [debug] [MainThread]: Response from registry: GET https://hub.getdbt.com/api/v1/dbt-labs/dbt_utils.json 200
[0m15:20:35.917555 [info ] [MainThread]: Updating lock file in file path: C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics/package-lock.yml
[0m15:20:35.930988 [debug] [MainThread]: Set downloads directory='C:\Users\alexc\AppData\Local\Temp\dbt-downloads-i92bnr2n'
[0m15:20:35.935860 [info ] [MainThread]: Installing dbt-labs/dbt_utils
[0m15:20:36.592306 [info ] [MainThread]: Installed from version 1.3.0
[0m15:20:36.594258 [info ] [MainThread]: Updated version available: 1.3.3
[0m15:20:36.595729 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'package', 'label': '11a89d88-f102-44ca-9a6f-3fccf5077752', 'property_': 'install', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002682A7924B0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002682A4F2CC0>]}
[0m15:20:36.596234 [info ] [MainThread]: 
[0m15:20:36.597239 [info ] [MainThread]: Updates available for packages: ['dbt-labs/dbt_utils']                 
Update your versions in packages.yml, then run dbt deps
[0m15:20:36.600805 [debug] [MainThread]: Command `dbt deps` succeeded at 15:20:36.600805 after 2.02 seconds
[0m15:20:36.602324 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002682857C5F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026828C1D5E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026828C1E330>]}
[0m15:20:36.603007 [debug] [MainThread]: Flushing usage events
[0m15:20:37.363085 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:22:24.784123 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EE26B6E030>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EE29231DC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EE292331A0>]}


============================== 15:22:24.789798 | 6d34eb64-eaca-4754-ac9c-01a74f9c3e1d ==============================
[0m15:22:24.789798 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:22:24.790336 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt compile --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:22:25.211251 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '6d34eb64-eaca-4754-ac9c-01a74f9c3e1d', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EE29261C40>]}
[0m15:22:25.311959 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '6d34eb64-eaca-4754-ac9c-01a74f9c3e1d', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EE2A24B320>]}
[0m15:22:25.382701 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:22:25.743074 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:22:25.876333 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m15:22:25.877841 [info ] [MainThread]: Unable to do partial parsing because a project dependency has been added
[0m15:22:25.877841 [info ] [MainThread]: Unable to do partial parsing because a project config has changed
[0m15:22:25.877841 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '6d34eb64-eaca-4754-ac9c-01a74f9c3e1d', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EE298FAAB0>]}
[0m15:22:28.436731 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m15:22:28.438546 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '6d34eb64-eaca-4754-ac9c-01a74f9c3e1d', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EE2B4F5070>]}
[0m15:22:28.840804 [error] [MainThread]: Encountered an error:
Compilation Error
  Model 'model.bacen_ifdata_analytics.fato_capital_prudencial' (models\gold\fato_capital_prudencial.sql) depends on a source named 'silver.financial_conglomerates_capital_information' which was not found
[0m15:22:28.841815 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m15:22:28.843335 [debug] [MainThread]: Command `dbt compile` failed at 15:22:28.842328 after 4.38 seconds
[0m15:22:28.843335 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EE29C6D400>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EE2BAF8890>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EE2912B050>]}
[0m15:22:28.843335 [debug] [MainThread]: Flushing usage events
[0m15:22:29.646795 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:23:16.951610 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DF40321D30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DF4308BF20>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DF4308B2F0>]}


============================== 15:23:16.958299 | 47a4cd8c-2bec-43a3-8687-9a2e1039725a ==============================
[0m15:23:16.958299 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:23:16.959313 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'invocation_command': 'dbt compile --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:23:17.252608 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '47a4cd8c-2bec-43a3-8687-9a2e1039725a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DF42A117C0>]}
[0m15:23:17.313543 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '47a4cd8c-2bec-43a3-8687-9a2e1039725a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DF430881A0>]}
[0m15:23:17.317942 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:23:17.660060 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:23:17.753929 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m15:23:17.754471 [info ] [MainThread]: Unable to do partial parsing because a project dependency has been added
[0m15:23:17.755014 [info ] [MainThread]: Unable to do partial parsing because a project config has changed
[0m15:23:17.755014 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '47a4cd8c-2bec-43a3-8687-9a2e1039725a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DF430C2720>]}
[0m15:23:19.857002 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m15:23:19.857579 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '47a4cd8c-2bec-43a3-8687-9a2e1039725a', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DF4521A780>]}
[0m15:23:20.181024 [error] [MainThread]: Encountered an error:
Compilation Error
  Model 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador' (models\gold\fato_carteira_credito_indexador.sql) depends on a source named 'silver.financial_conglomerates_portfolio_indexer' which was not found
[0m15:23:20.182969 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m15:23:20.185426 [debug] [MainThread]: Command `dbt compile` failed at 15:23:20.185426 after 3.41 seconds
[0m15:23:20.185933 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DF42999A00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DF45161D00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001DF44B93A10>]}
[0m15:23:20.185933 [debug] [MainThread]: Flushing usage events
[0m15:23:20.820115 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:23:50.969673 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017A4C061D90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017A4E268AD0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017A4DEF3DA0>]}


============================== 15:23:50.974467 | 0d9222db-43e7-4343-8a48-d856e6cf74fc ==============================
[0m15:23:50.974467 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:23:50.975472 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt compile --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:23:51.275866 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '0d9222db-43e7-4343-8a48-d856e6cf74fc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017A4E750E00>]}
[0m15:23:51.338074 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '0d9222db-43e7-4343-8a48-d856e6cf74fc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017A50728470>]}
[0m15:23:51.340088 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:23:51.694429 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:23:51.819634 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m15:23:51.820193 [info ] [MainThread]: Unable to do partial parsing because a project dependency has been added
[0m15:23:51.821206 [info ] [MainThread]: Unable to do partial parsing because a project config has changed
[0m15:23:51.821206 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '0d9222db-43e7-4343-8a48-d856e6cf74fc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017A509490D0>]}
[0m15:23:54.447268 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m15:23:54.449400 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '0d9222db-43e7-4343-8a48-d856e6cf74fc', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017A50E8A780>]}
[0m15:23:54.979602 [error] [MainThread]: Encountered an error:
Compilation Error
  Model 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador' (models\gold\fato_carteira_credito_indexador.sql) depends on a source named 'silver.prudential_conglomerates_portfolio_indexer' which was not found
[0m15:23:54.981177 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m15:23:54.982764 [debug] [MainThread]: Command `dbt compile` failed at 15:23:54.982764 after 4.17 seconds
[0m15:23:54.985198 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017A4F646480>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017A50EC89B0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017A50E9ED20>]}
[0m15:23:54.986210 [debug] [MainThread]: Flushing usage events
[0m15:23:55.658917 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:24:19.092818 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000111F9578320>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000111F9579DC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000111F9578F50>]}


============================== 15:24:19.097625 | 982d29d3-9f4c-4c38-aeab-b4563aafc277 ==============================
[0m15:24:19.097625 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:24:19.099357 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt compile --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:24:19.355072 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '982d29d3-9f4c-4c38-aeab-b4563aafc277', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000111F8F67E60>]}
[0m15:24:19.430736 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '982d29d3-9f4c-4c38-aeab-b4563aafc277', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000111F74BFA70>]}
[0m15:24:19.433424 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:24:19.733219 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:24:19.827394 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m15:24:19.828471 [info ] [MainThread]: Unable to do partial parsing because a project dependency has been added
[0m15:24:19.829006 [info ] [MainThread]: Unable to do partial parsing because a project config has changed
[0m15:24:19.829006 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '982d29d3-9f4c-4c38-aeab-b4563aafc277', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000111FB3E3FE0>]}
[0m15:24:21.642115 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m15:24:21.643231 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '982d29d3-9f4c-4c38-aeab-b4563aafc277', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000111FB4F55E0>]}
[0m15:24:22.004530 [error] [MainThread]: Encountered an error:
Compilation Error
  Model 'model.bacen_ifdata_analytics.fato_operacoes_clientes' (models\gold\fato_operacoes_clientes.sql) depends on a source named 'silver.prudential_conglomerates_portfolio_number_clients_operations' which was not found
[0m15:24:22.005151 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m15:24:22.007274 [debug] [MainThread]: Command `dbt compile` failed at 15:24:22.007274 after 3.07 seconds
[0m15:24:22.007810 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000111F989A660>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000111FB4F4B90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000111FB7245F0>]}
[0m15:24:22.007810 [debug] [MainThread]: Flushing usage events
[0m15:24:22.672795 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:24:56.561689 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001500554B5F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015002982FC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001500444E9C0>]}


============================== 15:24:56.570528 | ca7999cf-cf58-47db-89bd-5bc824d860b6 ==============================
[0m15:24:56.570528 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:24:56.571062 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'invocation_command': 'dbt compile --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:24:57.028222 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'ca7999cf-cf58-47db-89bd-5bc824d860b6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000150049C7CB0>]}
[0m15:24:57.198523 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'ca7999cf-cf58-47db-89bd-5bc824d860b6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000150054EB920>]}
[0m15:24:57.207988 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:24:57.778261 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:24:57.858489 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m15:24:57.860579 [info ] [MainThread]: Unable to do partial parsing because a project dependency has been added
[0m15:24:57.861216 [info ] [MainThread]: Unable to do partial parsing because a project config has changed
[0m15:24:57.862296 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': 'ca7999cf-cf58-47db-89bd-5bc824d860b6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015004FF6AB0>]}
[0m15:25:00.067273 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m15:25:00.068282 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': 'ca7999cf-cf58-47db-89bd-5bc824d860b6', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015006E2B2F0>]}
[0m15:25:00.722675 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:25:00.735732 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'ca7999cf-cf58-47db-89bd-5bc824d860b6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015007222CC0>]}
[0m15:25:00.867504 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:25:00.898204 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:25:00.965417 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'ca7999cf-cf58-47db-89bd-5bc824d860b6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015006FD79B0>]}
[0m15:25:00.967091 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 33 sources, 590 macros
[0m15:25:00.968201 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'ca7999cf-cf58-47db-89bd-5bc824d860b6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000150071231D0>]}
[0m15:25:00.976344 [info ] [MainThread]: 
[0m15:25:00.976344 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:25:00.977850 [info ] [MainThread]: 
[0m15:25:00.977850 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:25:00.984889 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:25:04.514578 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:25:04.515129 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:25:04.516193 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:25:05.453296 [debug] [ThreadPool]: SQL status: OK in 0.937 seconds
[0m15:25:05.453801 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:25:05.454391 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:25:05.495376 [debug] [ThreadPool]: SQL status: OK in 0.040 seconds
[0m15:25:05.497976 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:25:05.526698 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:25:05.526698 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:25:05.528209 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'ca7999cf-cf58-47db-89bd-5bc824d860b6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015007086F00>]}
[0m15:25:05.537093 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:25:05.538160 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m15:25:05.538160 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m15:25:05.551200 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:25:05.553354 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m15:25:05.555057 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:25:05.555057 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m15:25:05.556070 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m15:25:05.556070 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m15:25:05.562909 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:25:05.565645 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m15:25:05.567300 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m15:25:05.568420 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m15:25:05.568963 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m15:25:05.569508 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m15:25:05.574772 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m15:25:05.576766 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m15:25:05.578285 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m15:25:05.579293 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:25:05.579932 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m15:25:05.579932 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:25:05.586924 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:25:05.588242 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:25:05.589749 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:25:05.590761 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m15:25:05.590761 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m15:25:05.592278 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m15:25:05.598112 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m15:25:05.600400 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m15:25:05.602158 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m15:25:05.602725 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m15:25:05.603842 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m15:25:05.604372 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m15:25:05.609104 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m15:25:05.610613 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m15:25:05.611630 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m15:25:05.613088 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m15:25:05.614100 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m15:25:05.615612 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m15:25:05.620298 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m15:25:05.622962 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m15:25:05.624612 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m15:25:05.625815 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m15:25:05.626907 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m15:25:05.627457 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m15:25:05.632648 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m15:25:05.634345 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m15:25:05.635910 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m15:25:05.635910 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m15:25:05.636920 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m15:25:05.636920 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m15:25:05.639963 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:25:05.642885 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m15:25:05.643417 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m15:25:05.644426 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:25:05.644932 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m15:25:05.645467 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:25:05.649736 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:25:05.651843 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:25:05.652433 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:25:05.652433 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:25:05.654636 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m15:25:05.655247 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:25:05.658895 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:25:05.660480 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:25:05.661489 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:25:05.661489 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:25:05.662528 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m15:25:05.662528 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:25:05.665707 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:25:05.666243 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:25:05.666779 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:25:05.667307 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m15:25:05.667849 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:25:05.669967 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:25:05.670503 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:25:05.671065 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:25:05.671580 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m15:25:05.671580 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:25:05.673873 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:25:05.673873 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:25:05.674921 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:25:05.674921 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m15:25:05.674921 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:25:05.676905 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:25:05.676905 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:25:05.677881 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:25:05.677881 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m15:25:05.677881 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:25:05.679780 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:25:05.681378 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:25:05.682389 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:25:05.682389 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m15:25:05.682389 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:25:05.686541 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:25:05.687073 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:25:05.687601 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:25:05.688144 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m15:25:05.688695 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:25:05.690945 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:25:05.692002 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:25:05.692551 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:25:05.692551 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m15:25:05.693087 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:25:05.694638 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:25:05.694638 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:25:05.695673 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:25:05.695673 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m15:25:05.695673 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:25:05.698212 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:25:05.698212 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:25:05.699212 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:25:05.699754 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m15:25:05.699754 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:25:05.703454 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:25:05.705161 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:25:05.705731 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:25:05.706250 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m15:25:05.706250 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:25:05.715632 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:25:05.718855 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:25:05.719447 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:25:05.720143 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:25:05.720692 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m15:25:05.721704 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:25:05.724905 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:25:05.725880 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:25:05.726956 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:25:05.727962 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:25:05.727962 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m15:25:05.727962 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:25:05.733835 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:25:05.734378 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:25:05.735893 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:25:05.736551 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m15:25:05.737078 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m15:25:05.737078 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m15:25:05.740642 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m15:25:05.743157 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m15:25:05.743664 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m15:25:05.744675 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:25:05.745684 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m15:25:05.745684 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:25:05.751495 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:25:05.752685 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:25:05.754205 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:25:05.754750 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m15:25:05.755845 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m15:25:05.756450 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m15:25:05.759866 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m15:25:05.760958 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m15:25:05.761967 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m15:25:05.762476 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m15:25:05.763038 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m15:25:05.764048 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m15:25:05.768629 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m15:25:05.770258 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m15:25:05.771425 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m15:25:05.771425 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m15:25:05.771425 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m15:25:05.771425 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m15:25:05.779825 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m15:25:05.781472 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m15:25:05.781472 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m15:25:05.782609 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:25:05.783292 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m15:25:05.783292 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:25:05.791801 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:25:05.792849 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:25:05.794839 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:25:05.794839 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:25:05.794839 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m15:25:05.794839 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:25:05.798994 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:25:05.801075 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:25:05.802360 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:25:05.803371 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:25:05.804460 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m15:25:05.805142 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:25:05.810268 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:25:05.812411 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:25:05.812974 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:25:05.813988 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:25:05.814555 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m15:25:05.815081 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:25:05.820804 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:25:05.822993 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:25:05.824002 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:25:05.824002 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m15:25:05.824002 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m15:25:05.825001 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m15:25:05.830038 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m15:25:05.831047 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m15:25:05.832713 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m15:25:05.832713 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m15:25:05.832713 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m15:25:05.832713 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m15:25:05.837120 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m15:25:05.838171 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m15:25:05.839788 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m15:25:05.840105 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m15:25:05.840105 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m15:25:05.840105 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m15:25:05.844675 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m15:25:05.845425 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m15:25:05.847581 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m15:25:05.848156 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:25:05.849251 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m15:25:05.849833 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:25:05.854688 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:25:05.855856 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:25:05.856952 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:25:05.856952 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m15:25:05.857535 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m15:25:05.857535 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m15:25:05.862884 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m15:25:05.864378 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m15:25:05.865446 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m15:25:05.866004 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m15:25:05.866537 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m15:25:05.867071 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m15:25:05.872874 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m15:25:05.874325 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m15:25:05.875962 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m15:25:05.876971 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m15:25:05.876971 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m15:25:05.877975 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m15:25:05.886150 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m15:25:05.887228 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m15:25:05.888300 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m15:25:05.888300 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:25:05.888829 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m15:25:05.889365 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:25:05.892924 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:25:05.895507 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:25:05.895507 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:25:05.897015 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m15:25:05.897015 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m15:25:05.898042 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m15:25:05.902304 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m15:25:05.903821 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m15:25:05.904387 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m15:25:05.904966 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m15:25:05.904966 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m15:25:05.906482 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m15:25:05.910250 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m15:25:05.911836 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m15:25:05.912889 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m15:25:05.913453 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m15:25:05.913453 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m15:25:05.913453 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m15:25:05.919762 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m15:25:05.921347 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m15:25:05.922391 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m15:25:05.922966 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:25:05.922966 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m15:25:05.923691 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:25:05.929488 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:25:05.930536 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:25:05.931059 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:25:05.931059 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m15:25:05.931059 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m15:25:05.931059 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m15:25:05.934899 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m15:25:05.935949 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m15:25:05.937534 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m15:25:05.937534 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m15:25:05.937534 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m15:25:05.938548 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m15:25:05.943135 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m15:25:05.944703 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m15:25:05.946372 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m15:25:05.946895 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m15:25:05.947422 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m15:25:05.947959 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m15:25:05.955242 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m15:25:05.957284 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m15:25:05.958413 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m15:25:05.958413 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:25:05.958413 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m15:25:05.960516 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:25:05.965858 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:25:05.967957 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:25:05.969017 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:25:05.969553 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m15:25:05.970087 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m15:25:05.970087 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m15:25:05.974285 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m15:25:05.976291 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m15:25:05.977297 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m15:25:05.977297 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m15:25:05.977297 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m15:25:05.978291 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m15:25:05.982494 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m15:25:05.984762 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m15:25:05.985774 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m15:25:05.986282 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m15:25:05.986815 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m15:25:05.987352 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m15:25:05.991130 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m15:25:05.992181 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m15:25:05.992716 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m15:25:05.992716 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:25:05.994274 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m15:25:05.994274 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:25:05.999893 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:25:06.001574 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:25:06.002181 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:25:06.002181 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m15:25:06.002181 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m15:25:06.003740 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m15:25:06.008370 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m15:25:06.009876 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m15:25:06.010480 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m15:25:06.011489 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m15:25:06.012621 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m15:25:06.012621 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m15:25:06.020701 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m15:25:06.022350 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m15:25:06.023464 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m15:25:06.023464 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m15:25:06.023464 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m15:25:06.024471 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m15:25:06.031513 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m15:25:06.032521 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m15:25:06.034049 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m15:25:06.035069 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m15:25:06.036057 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m15:25:06.037069 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m15:25:06.045520 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m15:25:06.047700 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m15:25:06.048710 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m15:25:06.048710 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:25:06.049708 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m15:25:06.050215 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:25:06.055103 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:25:06.057283 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:25:06.058294 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:25:06.058294 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:25:06.059009 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m15:25:06.059543 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:25:06.065999 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:25:06.067566 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:25:06.067566 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:25:06.069161 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:25:06.069764 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m15:25:06.070330 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:25:06.076166 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:25:06.078167 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:25:06.078674 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:25:06.079606 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:25:06.080146 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m15:25:06.080146 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:25:06.086358 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:25:06.087887 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:25:06.087887 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:25:06.088887 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m15:25:06.088887 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m15:25:06.089881 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m15:25:06.092727 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m15:25:06.094925 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m15:25:06.095491 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m15:25:06.095491 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m15:25:06.097042 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m15:25:06.097042 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m15:25:06.099576 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m15:25:06.099576 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m15:25:06.101157 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m15:25:06.101771 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m15:25:06.102359 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m15:25:06.102359 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m15:25:06.105049 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m15:25:06.107097 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m15:25:06.108195 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m15:25:06.108732 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m15:25:06.109257 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m15:25:06.109814 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m15:25:06.113064 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m15:25:06.113592 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m15:25:06.115355 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m15:25:06.115355 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m15:25:06.116364 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m15:25:06.116364 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m15:25:06.122329 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m15:25:06.123916 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m15:25:06.123916 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m15:25:06.124934 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m15:25:06.125542 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m15:25:06.125542 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m15:25:06.129732 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m15:25:06.129732 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m15:25:06.131362 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m15:25:06.132885 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m15:25:06.132885 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m15:25:06.133903 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m15:25:06.137356 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m15:25:06.138364 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m15:25:06.139877 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m15:25:06.139877 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m15:25:06.140890 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m15:25:06.141487 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m15:25:06.144579 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m15:25:06.146590 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m15:25:06.147097 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m15:25:06.148313 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m15:25:06.148313 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m15:25:06.149314 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m15:25:06.153586 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m15:25:06.154650 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m15:25:06.155724 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m15:25:06.156240 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m15:25:06.156240 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m15:25:06.157253 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m15:25:06.160241 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m15:25:06.160241 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m15:25:06.161987 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m15:25:06.162553 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m15:25:06.162553 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m15:25:06.163562 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m15:25:06.166653 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m15:25:06.167167 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m15:25:06.168179 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m15:25:06.168179 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:25:06.169180 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m15:25:06.169797 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:25:06.175056 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:25:06.177060 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:25:06.178056 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:25:06.178056 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m15:25:06.178056 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m15:25:06.178056 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m15:25:06.182828 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m15:25:06.184881 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m15:25:06.185880 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m15:25:06.185880 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m15:25:06.187334 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m15:25:06.187848 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m15:25:06.193395 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m15:25:06.194991 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m15:25:06.196058 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m15:25:06.197068 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:25:06.197068 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m15:25:06.198286 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:25:06.205033 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:25:06.207668 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:25:06.207668 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:25:06.208686 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m15:25:06.208686 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m15:25:06.208686 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m15:25:06.212999 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m15:25:06.215620 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m15:25:06.216629 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m15:25:06.216629 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m15:25:06.218277 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m15:25:06.219286 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m15:25:06.225167 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m15:25:06.226166 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m15:25:06.227161 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m15:25:06.227161 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:25:06.228171 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m15:25:06.228171 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:25:06.234601 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:25:06.236802 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:25:06.238325 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:25:06.238325 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m15:25:06.239327 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m15:25:06.240208 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m15:25:06.246297 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m15:25:06.249259 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m15:25:06.249794 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m15:25:06.251116 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m15:25:06.251687 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m15:25:06.252236 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m15:25:06.257016 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m15:25:06.258533 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m15:25:06.260042 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m15:25:06.260042 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m15:25:06.260042 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m15:25:06.261688 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m15:25:06.266092 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m15:25:06.267620 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m15:25:06.269362 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m15:25:06.269362 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m15:25:06.270879 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m15:25:06.271719 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m15:25:06.277713 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m15:25:06.278257 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m15:25:06.279776 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m15:25:06.279776 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m15:25:06.281366 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m15:25:06.282018 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m15:25:06.286628 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m15:25:06.288636 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m15:25:06.289968 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m15:25:06.290976 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m15:25:06.290976 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m15:25:06.291977 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m15:25:06.299039 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m15:25:06.300627 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m15:25:06.302214 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m15:25:06.302749 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m15:25:06.302749 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m15:25:06.303757 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m15:25:06.308371 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m15:25:06.310514 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m15:25:06.311523 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m15:25:06.312029 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:25:06.312534 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m15:25:06.313543 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:25:06.319827 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:25:06.322448 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:25:06.323477 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:25:06.324003 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m15:25:06.325063 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m15:25:06.325587 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m15:25:06.330503 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m15:25:06.332582 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m15:25:06.333781 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m15:25:06.333781 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m15:25:06.334790 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m15:25:06.335790 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m15:25:06.340499 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m15:25:06.343019 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m15:25:06.344542 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m15:25:06.345056 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m15:25:06.346005 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m15:25:06.346005 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m15:25:06.351774 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m15:25:06.353402 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m15:25:06.354459 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m15:25:06.354994 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m15:25:06.355525 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m15:25:06.356044 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m15:25:06.360146 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m15:25:06.361746 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m15:25:06.362755 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m15:25:06.363848 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m15:25:06.363848 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m15:25:06.364846 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m15:25:06.369571 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m15:25:06.371969 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m15:25:06.373071 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m15:25:06.373599 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m15:25:06.374139 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m15:25:06.375459 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m15:25:06.381219 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m15:25:06.382845 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m15:25:06.383854 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m15:25:06.384918 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m15:25:06.385920 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m15:25:06.385920 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m15:25:06.394416 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m15:25:06.396933 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m15:25:06.398538 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m15:25:06.398538 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m15:25:06.399536 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m15:25:06.399536 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m15:25:06.407980 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m15:25:06.410064 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m15:25:06.411746 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m15:25:06.412756 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m15:25:06.413923 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m15:25:06.413923 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m15:25:06.420264 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m15:25:06.422629 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m15:25:06.423719 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m15:25:06.425158 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m15:25:06.426203 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m15:25:06.426739 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m15:25:06.432725 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m15:25:06.433781 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m15:25:06.434789 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m15:25:06.436804 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:25:06.436804 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:25:06.437813 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m15:25:06.457656 [debug] [MainThread]: Command end result
[0m15:25:06.581289 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:25:06.584111 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:25:06.597636 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:25:06.599215 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m15:25:06.601464 [debug] [MainThread]: Command `dbt compile` succeeded at 15:25:06.600933 after 10.27 seconds
[0m15:25:06.602019 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001500536D160>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000150054BD0D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000150054E9C10>]}
[0m15:25:06.602019 [debug] [MainThread]: Flushing usage events
[0m15:25:07.290668 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:25:23.189674 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A62EDD1DC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A631BCC920>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A631BCC8F0>]}


============================== 15:25:23.196689 | b54381fc-a933-45bc-98a8-755c1a2ca03a ==============================
[0m15:25:23.196689 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:25:23.197269 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'None', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt test --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:25:23.431578 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'b54381fc-a933-45bc-98a8-755c1a2ca03a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A631BCE8D0>]}
[0m15:25:23.486088 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'b54381fc-a933-45bc-98a8-755c1a2ca03a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A630FABD70>]}
[0m15:25:23.488738 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:25:23.960530 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:25:24.209280 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m15:25:24.209811 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m15:25:24.209811 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m15:25:24.215514 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:25:24.266354 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'b54381fc-a933-45bc-98a8-755c1a2ca03a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A633650C80>]}
[0m15:25:24.379730 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:25:24.382860 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:25:24.494844 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'b54381fc-a933-45bc-98a8-755c1a2ca03a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A633AEDAF0>]}
[0m15:25:24.495853 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 33 sources, 590 macros
[0m15:25:24.496852 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'b54381fc-a933-45bc-98a8-755c1a2ca03a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A633AED7F0>]}
[0m15:25:24.500895 [info ] [MainThread]: 
[0m15:25:24.502065 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:25:24.502065 [info ] [MainThread]: 
[0m15:25:24.503617 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:25:24.511213 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:25:24.598850 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:25:24.599409 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:25:24.599409 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:25:24.720090 [debug] [ThreadPool]: SQL status: OK in 0.121 seconds
[0m15:25:24.720090 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:25:24.720090 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:25:24.734337 [debug] [ThreadPool]: SQL status: OK in 0.013 seconds
[0m15:25:24.735920 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:25:24.737441 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:25:24.737441 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:25:24.738458 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'b54381fc-a933-45bc-98a8-755c1a2ca03a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A633A576E0>]}
[0m15:25:24.738458 [debug] [MainThread]: Using duckdb connection "master"
[0m15:25:24.738458 [debug] [MainThread]: On master: BEGIN
[0m15:25:24.738458 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:25:24.739976 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:25:24.739976 [debug] [MainThread]: On master: COMMIT
[0m15:25:24.740996 [debug] [MainThread]: Using duckdb connection "master"
[0m15:25:24.740996 [debug] [MainThread]: On master: COMMIT
[0m15:25:24.740996 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:25:24.740996 [debug] [MainThread]: On master: Close
[0m15:25:24.745635 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m15:25:24.746627 [info ] [Thread-1 (]: 1 of 61 START test not_null_dim_classe_instituicao_id_classe ................... [RUN]
[0m15:25:24.747136 [debug] [Thread-1 (]: Acquiring new duckdb connection 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m15:25:24.748147 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m15:25:24.767567 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m15:25:24.768304 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m15:25:24.781294 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m15:25:24.784053 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m15:25:24.784053 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m15:25:24.785081 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:25:24.785081 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:24.786076 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m15:25:24.786076 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m15:25:24.795623 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m15:25:24.796621 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:24.797234 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m15:25:24.965684 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m15:25:24.965684 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m15:25:24.967326 [debug] [Thread-1 (]: Runtime Error in test not_null_dim_classe_instituicao_id_classe (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "silver.individual_institutions_assets"?
  
  LINE 17: from "gold_warehouse"."main"."dim_classe_instituicao"
                ^
[0m15:25:24.968898 [error] [Thread-1 (]: 1 of 61 ERROR not_null_dim_classe_instituicao_id_classe ........................ [[31mERROR[0m in 0.22s]
[0m15:25:24.969466 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m15:25:24.970055 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m15:25:24.970607 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_dim_classe_instituicao_id_classe (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "silver.individual_institutions_assets"?
  
  LINE 17: from "gold_warehouse"."main"."dim_classe_instituicao"
                ^.
[0m15:25:24.970055 [info ] [Thread-1 (]: 2 of 61 START test not_null_dim_consolidado_id_consolidado ..................... [RUN]
[0m15:25:24.971618 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m15:25:24.973093 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m15:25:24.976382 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m15:25:24.977438 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m15:25:24.979470 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m15:25:24.981035 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m15:25:24.981035 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m15:25:24.981035 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:24.982639 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:24.982639 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m15:25:24.982639 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m15:25:24.982639 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m15:25:24.982639 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:24.984287 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m15:25:24.986594 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m15:25:24.987135 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m15:25:24.988757 [debug] [Thread-1 (]: Runtime Error in test not_null_dim_consolidado_id_consolidado (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "pg_catalog.pg_constraint"?
  
  LINE 17: from "gold_warehouse"."main"."dim_consolidado"
                ^
[0m15:25:24.988757 [error] [Thread-1 (]: 2 of 61 ERROR not_null_dim_consolidado_id_consolidado .......................... [[31mERROR[0m in 0.02s]
[0m15:25:24.989731 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m15:25:24.990964 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m15:25:24.990964 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_dim_consolidado_id_consolidado (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "pg_catalog.pg_constraint"?
  
  LINE 17: from "gold_warehouse"."main"."dim_consolidado"
                ^.
[0m15:25:24.991965 [info ] [Thread-1 (]: 3 of 61 START test not_null_dim_controle_id_controle ........................... [RUN]
[0m15:25:24.992473 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m15:25:24.993001 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m15:25:24.996240 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m15:25:24.997850 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m15:25:24.999398 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m15:25:25.000976 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m15:25:25.000976 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m15:25:25.001538 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.002072 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.002072 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m15:25:25.002602 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.002602 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.002602 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.003651 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m15:25:25.005842 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m15:25:25.005842 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m15:25:25.007998 [debug] [Thread-1 (]: Runtime Error in test not_null_dim_controle_id_controle (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "pg_catalog.pg_constraint"?
  
  LINE 17: from "gold_warehouse"."main"."dim_controle"
                ^
[0m15:25:25.009011 [error] [Thread-1 (]: 3 of 61 ERROR not_null_dim_controle_id_controle ................................ [[31mERROR[0m in 0.02s]
[0m15:25:25.009011 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m15:25:25.010009 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:25:25.010518 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_dim_controle_id_controle (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "pg_catalog.pg_constraint"?
  
  LINE 17: from "gold_warehouse"."main"."dim_controle"
                ^.
[0m15:25:25.011525 [info ] [Thread-1 (]: 4 of 61 START test not_null_dim_instituicao_id_instituicao ..................... [RUN]
[0m15:25:25.011525 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m15:25:25.011525 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:25:25.015296 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:25:25.016816 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:25:25.019863 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:25:25.021438 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:25:25.021438 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m15:25:25.021438 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.022651 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.022651 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:25:25.023207 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.023207 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.024217 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.024217 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m15:25:25.026212 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m15:25:25.026212 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m15:25:25.028214 [debug] [Thread-1 (]: Runtime Error in test not_null_dim_instituicao_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 17: from "gold_warehouse"."main"."dim_instituicao"
                ^
[0m15:25:25.029261 [error] [Thread-1 (]: 4 of 61 ERROR not_null_dim_instituicao_id_instituicao .......................... [[31mERROR[0m in 0.02s]
[0m15:25:25.029261 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:25:25.030492 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:25:25.030999 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_dim_instituicao_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 17: from "gold_warehouse"."main"."dim_instituicao"
                ^.
[0m15:25:25.030999 [info ] [Thread-1 (]: 5 of 61 START test not_null_dim_instituicao_id_localizacao ..................... [RUN]
[0m15:25:25.030999 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m15:25:25.032558 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:25:25.036124 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:25:25.037202 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:25:25.039348 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:25:25.040405 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:25:25.040947 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m15:25:25.040947 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.041956 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.041956 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:25:25.041956 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.043272 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.043272 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.044338 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m15:25:25.045347 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m15:25:25.046855 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m15:25:25.049571 [debug] [Thread-1 (]: Runtime Error in test not_null_dim_instituicao_id_localizacao (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 17: from "gold_warehouse"."main"."dim_instituicao"
                ^
[0m15:25:25.049571 [error] [Thread-1 (]: 5 of 61 ERROR not_null_dim_instituicao_id_localizacao .......................... [[31mERROR[0m in 0.02s]
[0m15:25:25.051763 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:25:25.052377 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m15:25:25.052377 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_dim_instituicao_id_localizacao (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 17: from "gold_warehouse"."main"."dim_instituicao"
                ^.
[0m15:25:25.053386 [info ] [Thread-1 (]: 6 of 61 START test not_null_dim_localizacao_id_localizacao ..................... [RUN]
[0m15:25:25.053948 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m15:25:25.053948 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m15:25:25.057581 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m15:25:25.058590 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m15:25:25.060098 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m15:25:25.061707 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m15:25:25.061707 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m15:25:25.061707 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.062720 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.062720 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m15:25:25.062720 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.064320 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.064838 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.064838 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m15:25:25.067413 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m15:25:25.067413 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m15:25:25.070158 [debug] [Thread-1 (]: Runtime Error in test not_null_dim_localizacao_id_localizacao (models\gold\schema.yml)
  Catalog Error: Table with name dim_localizacao does not exist!
  Did you mean "silver.prudential_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."dim_localizacao"
                ^
[0m15:25:25.070158 [error] [Thread-1 (]: 6 of 61 ERROR not_null_dim_localizacao_id_localizacao .......................... [[31mERROR[0m in 0.02s]
[0m15:25:25.071166 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m15:25:25.071166 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m15:25:25.071166 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_dim_localizacao_id_localizacao (models\gold\schema.yml)
  Catalog Error: Table with name dim_localizacao does not exist!
  Did you mean "silver.prudential_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."dim_localizacao"
                ^.
[0m15:25:25.071166 [info ] [Thread-1 (]: 7 of 61 START test not_null_dim_segmento_id_segmento ........................... [RUN]
[0m15:25:25.072832 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m15:25:25.072832 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m15:25:25.075842 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m15:25:25.076839 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m15:25:25.078351 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m15:25:25.080497 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m15:25:25.081007 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m15:25:25.081007 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.081007 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.081007 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m15:25:25.082666 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.082666 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.084242 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.084242 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m15:25:25.087423 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m15:25:25.087963 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m15:25:25.090634 [debug] [Thread-1 (]: Runtime Error in test not_null_dim_segmento_id_segmento (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "pg_catalog.pg_indexes"?
  
  LINE 17: from "gold_warehouse"."main"."dim_segmento"
                ^
[0m15:25:25.091170 [error] [Thread-1 (]: 7 of 61 ERROR not_null_dim_segmento_id_segmento ................................ [[31mERROR[0m in 0.02s]
[0m15:25:25.091170 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m15:25:25.092686 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m15:25:25.092686 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_dim_segmento_id_segmento (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "pg_catalog.pg_indexes"?
  
  LINE 17: from "gold_warehouse"."main"."dim_segmento"
                ^.
[0m15:25:25.092686 [info ] [Thread-1 (]: 8 of 61 START test not_null_dim_tempo_id_data .................................. [RUN]
[0m15:25:25.092686 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m15:25:25.094750 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m15:25:25.097489 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m15:25:25.099499 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m15:25:25.101579 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m15:25:25.102129 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m15:25:25.102129 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m15:25:25.103672 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.103672 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.103672 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m15:25:25.104721 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.104721 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.104721 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.104721 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m15:25:25.108838 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m15:25:25.108838 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m15:25:25.111527 [debug] [Thread-1 (]: Runtime Error in test not_null_dim_tempo_id_data (models\gold\schema.yml)
  Catalog Error: Table with name dim_tempo does not exist!
  Did you mean "main.duckdb_types"?
  
  LINE 17: from "gold_warehouse"."main"."dim_tempo"
                ^
[0m15:25:25.112541 [error] [Thread-1 (]: 8 of 61 ERROR not_null_dim_tempo_id_data ....................................... [[31mERROR[0m in 0.02s]
[0m15:25:25.112541 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m15:25:25.112541 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:25:25.113786 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_dim_tempo_id_data (models\gold\schema.yml)
  Catalog Error: Table with name dim_tempo does not exist!
  Did you mean "main.duckdb_types"?
  
  LINE 17: from "gold_warehouse"."main"."dim_tempo"
                ^.
[0m15:25:25.113786 [info ] [Thread-1 (]: 9 of 61 START test not_null_fato_balanco_patrimonial_id_data ................... [RUN]
[0m15:25:25.114784 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m15:25:25.114784 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:25:25.119350 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:25:25.120357 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:25:25.121556 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:25:25.121556 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:25:25.121556 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m15:25:25.121556 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.123846 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.123846 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:25:25.123846 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.124856 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.124856 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.125855 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m15:25:25.127999 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m15:25:25.129560 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m15:25:25.131128 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_balanco_patrimonial_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_balanco_patrimonial does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_balanco_patrimonial"
                ^
[0m15:25:25.132691 [error] [Thread-1 (]: 9 of 61 ERROR not_null_fato_balanco_patrimonial_id_data ........................ [[31mERROR[0m in 0.02s]
[0m15:25:25.133196 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:25:25.133703 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:25:25.134221 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_balanco_patrimonial_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_balanco_patrimonial does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_balanco_patrimonial"
                ^.
[0m15:25:25.134755 [info ] [Thread-1 (]: 10 of 61 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m15:25:25.135828 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m15:25:25.136372 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:25:25.140567 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:25:25.140567 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:25:25.144351 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:25:25.145437 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:25:25.145437 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m15:25:25.146958 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.147509 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.147509 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:25:25.147509 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.148519 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.149523 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.149523 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m15:25:25.152133 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m15:25:25.152133 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m15:25:25.154767 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_balanco_patrimonial_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_balanco_patrimonial does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_balanco_patrimonial"
                ^
[0m15:25:25.155775 [error] [Thread-1 (]: 10 of 61 ERROR not_null_fato_balanco_patrimonial_id_instituicao ................ [[31mERROR[0m in 0.02s]
[0m15:25:25.155775 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:25:25.155775 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m15:25:25.157363 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_balanco_patrimonial_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_balanco_patrimonial does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_balanco_patrimonial"
                ^.
[0m15:25:25.157363 [info ] [Thread-1 (]: 11 of 61 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m15:25:25.157964 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m15:25:25.157964 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m15:25:25.161491 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m15:25:25.162552 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m15:25:25.164602 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m15:25:25.165110 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m15:25:25.165623 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m15:25:25.165623 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.166638 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.167145 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m15:25:25.167145 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.168154 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.169154 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.169154 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m15:25:25.171415 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m15:25:25.172426 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m15:25:25.174631 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_capital_prudencial_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "silver.financial_conglomerates_summary"?
  
  LINE 17: from "gold_warehouse"."main"."fato_capital_prudencial"
                ^
[0m15:25:25.174631 [error] [Thread-1 (]: 11 of 61 ERROR not_null_fato_capital_prudencial_id_data ........................ [[31mERROR[0m in 0.02s]
[0m15:25:25.175629 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m15:25:25.175629 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m15:25:25.176636 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_capital_prudencial_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "silver.financial_conglomerates_summary"?
  
  LINE 17: from "gold_warehouse"."main"."fato_capital_prudencial"
                ^.
[0m15:25:25.176636 [info ] [Thread-1 (]: 12 of 61 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m15:25:25.178144 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m15:25:25.178144 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m15:25:25.181322 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m15:25:25.182838 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m15:25:25.184857 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m15:25:25.185855 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m15:25:25.185855 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m15:25:25.185855 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.186888 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.186888 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m15:25:25.186888 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.187934 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.188933 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.189491 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m15:25:25.192713 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m15:25:25.193265 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m15:25:25.195352 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_capital_prudencial_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "silver.financial_conglomerates_summary"?
  
  LINE 17: from "gold_warehouse"."main"."fato_capital_prudencial"
                ^
[0m15:25:25.195881 [error] [Thread-1 (]: 12 of 61 ERROR not_null_fato_capital_prudencial_id_instituicao ................. [[31mERROR[0m in 0.02s]
[0m15:25:25.197065 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m15:25:25.197600 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m15:25:25.198676 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_capital_prudencial_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "silver.financial_conglomerates_summary"?
  
  LINE 17: from "gold_warehouse"."main"."fato_capital_prudencial"
                ^.
[0m15:25:25.199199 [info ] [Thread-1 (]: 13 of 61 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m15:25:25.199738 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m15:25:25.199738 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m15:25:25.202440 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m15:25:25.203981 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m15:25:25.205697 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m15:25:25.207231 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m15:25:25.207231 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m15:25:25.208274 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.209827 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.209827 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m15:25:25.210438 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.211457 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.211457 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.211457 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m15:25:25.214724 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m15:25:25.214724 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m15:25:25.216862 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_carteira_credito_atividade_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_atividade does not exist!
  Did you mean "silver.prudential_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_atividade"
                ^
[0m15:25:25.217390 [error] [Thread-1 (]: 13 of 61 ERROR not_null_fato_carteira_credito_atividade_id_instituicao ......... [[31mERROR[0m in 0.02s]
[0m15:25:25.217390 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m15:25:25.217390 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m15:25:25.217390 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_carteira_credito_atividade_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_atividade does not exist!
  Did you mean "silver.prudential_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_atividade"
                ^.
[0m15:25:25.219004 [info ] [Thread-1 (]: 14 of 61 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m15:25:25.219595 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m15:25:25.220192 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m15:25:25.222780 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m15:25:25.223786 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m15:25:25.225788 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m15:25:25.227143 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m15:25:25.228154 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m15:25:25.228154 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.228154 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.228154 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m15:25:25.228154 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.229897 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.229897 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.230907 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m15:25:25.233014 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m15:25:25.233549 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m15:25:25.236418 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_carteira_credito_indexador_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                ^
[0m15:25:25.236418 [error] [Thread-1 (]: 14 of 61 ERROR not_null_fato_carteira_credito_indexador_id_data ................ [[31mERROR[0m in 0.02s]
[0m15:25:25.237428 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m15:25:25.237428 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m15:25:25.238478 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_carteira_credito_indexador_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                ^.
[0m15:25:25.238478 [info ] [Thread-1 (]: 15 of 61 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m15:25:25.239984 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m15:25:25.239984 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m15:25:25.243031 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m15:25:25.243031 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m15:25:25.245629 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m15:25:25.247135 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m15:25:25.247656 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m15:25:25.247656 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.247656 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.247656 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m15:25:25.249172 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.249172 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.250178 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.250178 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m15:25:25.252846 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m15:25:25.253366 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m15:25:25.255067 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_carteira_credito_indexador_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                ^
[0m15:25:25.256076 [error] [Thread-1 (]: 15 of 61 ERROR not_null_fato_carteira_credito_indexador_id_instituicao ......... [[31mERROR[0m in 0.02s]
[0m15:25:25.257123 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m15:25:25.257658 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m15:25:25.258193 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_carteira_credito_indexador_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                ^.
[0m15:25:25.258723 [info ] [Thread-1 (]: 16 of 61 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m15:25:25.259253 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m15:25:25.259789 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m15:25:25.263049 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m15:25:25.264060 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m15:25:25.266252 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m15:25:25.267858 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m15:25:25.267858 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m15:25:25.267858 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.268868 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.269453 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m15:25:25.269453 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.270008 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.270008 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.270008 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m15:25:25.273097 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m15:25:25.273097 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m15:25:25.275103 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_carteira_credito_porte_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_porte does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_porte"
                ^
[0m15:25:25.276106 [error] [Thread-1 (]: 16 of 61 ERROR not_null_fato_carteira_credito_porte_id_instituicao ............. [[31mERROR[0m in 0.02s]
[0m15:25:25.276106 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m15:25:25.277106 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m15:25:25.277106 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_carteira_credito_porte_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_porte does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_porte"
                ^.
[0m15:25:25.277106 [info ] [Thread-1 (]: 17 of 61 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m15:25:25.278103 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m15:25:25.278103 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m15:25:25.282469 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m15:25:25.282469 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m15:25:25.285049 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m15:25:25.287079 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m15:25:25.287622 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m15:25:25.288160 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.288695 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.288695 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m15:25:25.289232 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.289760 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.290289 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.290289 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m15:25:25.292954 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m15:25:25.293488 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m15:25:25.295590 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_carteira_credito_produto_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_produto does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_individuals_type_maturity"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_produto"
                ^
[0m15:25:25.295590 [error] [Thread-1 (]: 17 of 61 ERROR not_null_fato_carteira_credito_produto_id_data .................. [[31mERROR[0m in 0.02s]
[0m15:25:25.297626 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m15:25:25.298184 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m15:25:25.299197 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_carteira_credito_produto_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_produto does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_individuals_type_maturity"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_produto"
                ^.
[0m15:25:25.299197 [info ] [Thread-1 (]: 18 of 61 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m15:25:25.300247 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m15:25:25.300247 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m15:25:25.305107 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m15:25:25.306637 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m15:25:25.308758 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m15:25:25.309762 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m15:25:25.310367 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m15:25:25.310367 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.310367 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.310367 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m15:25:25.311924 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.313059 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.313059 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.313059 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m15:25:25.315651 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m15:25:25.316660 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m15:25:25.319257 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_carteira_credito_produto_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_produto does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_individuals_type_maturity"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_produto"
                ^
[0m15:25:25.319257 [error] [Thread-1 (]: 18 of 61 ERROR not_null_fato_carteira_credito_produto_id_instituicao ........... [[31mERROR[0m in 0.02s]
[0m15:25:25.320292 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m15:25:25.320292 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m15:25:25.320292 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_carteira_credito_produto_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_produto does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_individuals_type_maturity"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_produto"
                ^.
[0m15:25:25.322449 [info ] [Thread-1 (]: 19 of 61 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m15:25:25.323005 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m15:25:25.323538 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m15:25:25.326210 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m15:25:25.328219 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m15:25:25.330345 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m15:25:25.332939 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m15:25:25.333469 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m15:25:25.333469 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.333985 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.334515 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m15:25:25.334515 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.335045 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.335045 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.336660 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m15:25:25.340047 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m15:25:25.341251 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m15:25:25.344812 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_carteira_credito_totais_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_totais"
                ^
[0m15:25:25.346072 [error] [Thread-1 (]: 19 of 61 ERROR not_null_fato_carteira_credito_totais_id_data ................... [[31mERROR[0m in 0.02s]
[0m15:25:25.347204 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m15:25:25.347724 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m15:25:25.349447 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_carteira_credito_totais_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_totais"
                ^.
[0m15:25:25.348398 [info ] [Thread-1 (]: 20 of 61 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m15:25:25.350247 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m15:25:25.351405 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m15:25:25.357450 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m15:25:25.359931 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m15:25:25.362796 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m15:25:25.363911 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m15:25:25.363911 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m15:25:25.363911 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.365395 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.365947 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m15:25:25.365947 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.367022 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.367549 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.368094 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m15:25:25.370793 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m15:25:25.370793 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m15:25:25.373642 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_carteira_credito_totais_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_totais"
                ^
[0m15:25:25.374188 [error] [Thread-1 (]: 20 of 61 ERROR not_null_fato_carteira_credito_totais_id_instituicao ............ [[31mERROR[0m in 0.02s]
[0m15:25:25.375248 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m15:25:25.375248 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m15:25:25.376339 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_carteira_credito_totais_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_totais"
                ^.
[0m15:25:25.375803 [info ] [Thread-1 (]: 21 of 61 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m15:25:25.376871 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m15:25:25.377410 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m15:25:25.380053 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m15:25:25.381622 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m15:25:25.382646 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m15:25:25.384221 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m15:25:25.384221 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m15:25:25.385833 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.385833 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.385833 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m15:25:25.386886 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.387434 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.387434 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.387434 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m15:25:25.390151 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m15:25:25.390151 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m15:25:25.392702 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_demonstracao_resultado_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_demonstracao_resultado"
                ^
[0m15:25:25.392702 [error] [Thread-1 (]: 21 of 61 ERROR not_null_fato_demonstracao_resultado_id_data .................... [[31mERROR[0m in 0.02s]
[0m15:25:25.394441 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m15:25:25.394441 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m15:25:25.395448 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_demonstracao_resultado_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_demonstracao_resultado"
                ^.
[0m15:25:25.394441 [info ] [Thread-1 (]: 22 of 61 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m15:25:25.395448 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m15:25:25.396957 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m15:25:25.399564 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m15:25:25.399564 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m15:25:25.402285 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m15:25:25.403877 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m15:25:25.404464 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m15:25:25.404987 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.405524 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.406048 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m15:25:25.406048 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.407059 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.407636 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.407636 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m15:25:25.412439 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m15:25:25.413048 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m15:25:25.415566 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_demonstracao_resultado_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_demonstracao_resultado"
                ^
[0m15:25:25.415566 [error] [Thread-1 (]: 22 of 61 ERROR not_null_fato_demonstracao_resultado_id_instituicao ............. [[31mERROR[0m in 0.02s]
[0m15:25:25.416575 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m15:25:25.416575 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m15:25:25.416575 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_demonstracao_resultado_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_demonstracao_resultado"
                ^.
[0m15:25:25.417670 [info ] [Thread-1 (]: 23 of 61 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m15:25:25.417670 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m15:25:25.417670 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m15:25:25.421611 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m15:25:25.422706 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m15:25:25.424734 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m15:25:25.425713 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m15:25:25.425713 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m15:25:25.426715 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.426715 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.426715 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m15:25:25.426715 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.428259 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.428259 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.429272 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m15:25:25.430934 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m15:25:25.430934 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m15:25:25.434631 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_movimentacao_cambio_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_movimentacao_cambio does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_movimentacao_cambio"
                ^
[0m15:25:25.435243 [error] [Thread-1 (]: 23 of 61 ERROR not_null_fato_movimentacao_cambio_id_data ....................... [[31mERROR[0m in 0.02s]
[0m15:25:25.435780 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m15:25:25.436313 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m15:25:25.436844 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_movimentacao_cambio_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_movimentacao_cambio does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_movimentacao_cambio"
                ^.
[0m15:25:25.437369 [info ] [Thread-1 (]: 24 of 61 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m15:25:25.437924 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m15:25:25.438461 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m15:25:25.442057 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m15:25:25.443143 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m15:25:25.444710 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m15:25:25.446731 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m15:25:25.447436 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m15:25:25.447436 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.447992 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.447992 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m15:25:25.447992 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.447992 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.449557 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.449557 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m15:25:25.452299 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m15:25:25.452836 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m15:25:25.455060 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_movimentacao_cambio_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_movimentacao_cambio does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_movimentacao_cambio"
                ^
[0m15:25:25.455060 [error] [Thread-1 (]: 24 of 61 ERROR not_null_fato_movimentacao_cambio_id_instituicao ................ [[31mERROR[0m in 0.02s]
[0m15:25:25.456068 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m15:25:25.456068 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m15:25:25.457190 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_movimentacao_cambio_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_movimentacao_cambio does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_movimentacao_cambio"
                ^.
[0m15:25:25.457190 [info ] [Thread-1 (]: 25 of 61 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m15:25:25.458197 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m15:25:25.459198 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m15:25:25.461808 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m15:25:25.462995 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m15:25:25.465021 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m15:25:25.465629 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m15:25:25.465629 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m15:25:25.466646 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.467154 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.467697 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m15:25:25.467697 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.468266 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.468266 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.469277 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m15:25:25.471535 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m15:25:25.471535 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m15:25:25.473865 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_operacoes_clientes_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_operacoes_clientes does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_operacoes_clientes"
                ^
[0m15:25:25.473865 [error] [Thread-1 (]: 25 of 61 ERROR not_null_fato_operacoes_clientes_id_data ........................ [[31mERROR[0m in 0.02s]
[0m15:25:25.474875 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m15:25:25.475877 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m15:25:25.475877 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_operacoes_clientes_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_operacoes_clientes does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_operacoes_clientes"
                ^.
[0m15:25:25.475877 [info ] [Thread-1 (]: 26 of 61 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m15:25:25.477632 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m15:25:25.477632 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m15:25:25.480816 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m15:25:25.481876 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m15:25:25.483966 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m15:25:25.485018 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m15:25:25.485018 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m15:25:25.486026 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.486026 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.486026 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m15:25:25.487085 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.487085 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.488098 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.488623 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m15:25:25.491221 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m15:25:25.491221 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m15:25:25.492710 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_operacoes_clientes_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_operacoes_clientes does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_operacoes_clientes"
                ^
[0m15:25:25.492710 [error] [Thread-1 (]: 26 of 61 ERROR not_null_fato_operacoes_clientes_id_instituicao ................. [[31mERROR[0m in 0.02s]
[0m15:25:25.494294 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m15:25:25.494874 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m15:25:25.494874 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_operacoes_clientes_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_operacoes_clientes does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_operacoes_clientes"
                ^.
[0m15:25:25.495888 [info ] [Thread-1 (]: 27 of 61 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m15:25:25.495888 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m15:25:25.495888 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m15:25:25.501164 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m15:25:25.502370 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m15:25:25.503918 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m15:25:25.505112 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m15:25:25.505112 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m15:25:25.505112 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.506136 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.506136 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m15:25:25.506136 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.507220 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.507220 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.507220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m15:25:25.509803 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m15:25:25.510395 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m15:25:25.512472 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_regiao_credito_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_regiao_credito does not exist!
  Did you mean "silver.prudential_conglomerates_segmentation"?
  
  LINE 17: from "gold_warehouse"."main"."fato_regiao_credito"
                ^
[0m15:25:25.513056 [error] [Thread-1 (]: 27 of 61 ERROR not_null_fato_regiao_credito_id_instituicao ..................... [[31mERROR[0m in 0.02s]
[0m15:25:25.513679 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m15:25:25.513679 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m15:25:25.513679 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_regiao_credito_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_regiao_credito does not exist!
  Did you mean "silver.prudential_conglomerates_segmentation"?
  
  LINE 17: from "gold_warehouse"."main"."fato_regiao_credito"
                ^.
[0m15:25:25.513679 [info ] [Thread-1 (]: 28 of 61 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m15:25:25.515195 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m15:25:25.515195 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m15:25:25.519284 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m15:25:25.520478 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m15:25:25.522790 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m15:25:25.524419 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m15:25:25.524961 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m15:25:25.524961 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.525499 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.526030 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m15:25:25.526564 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.527097 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.527624 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.528138 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m15:25:25.531927 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m15:25:25.532486 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m15:25:25.535215 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_regiao_credito_id_regiao (models\gold\schema.yml)
  Catalog Error: Table with name fato_regiao_credito does not exist!
  Did you mean "silver.prudential_conglomerates_segmentation"?
  
  LINE 17: from "gold_warehouse"."main"."fato_regiao_credito"
                ^
[0m15:25:25.536308 [error] [Thread-1 (]: 28 of 61 ERROR not_null_fato_regiao_credito_id_regiao .......................... [[31mERROR[0m in 0.02s]
[0m15:25:25.536852 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m15:25:25.537396 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:25:25.537396 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_regiao_credito_id_regiao (models\gold\schema.yml)
  Catalog Error: Table with name fato_regiao_credito does not exist!
  Did you mean "silver.prudential_conglomerates_segmentation"?
  
  LINE 17: from "gold_warehouse"."main"."fato_regiao_credito"
                ^.
[0m15:25:25.537926 [info ] [Thread-1 (]: 29 of 61 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m15:25:25.538456 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m15:25:25.538456 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:25:25.542117 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:25:25.543196 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:25:25.545253 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:25:25.545253 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:25:25.546777 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m15:25:25.546777 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.547372 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.547372 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:25:25.547906 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.547906 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.547906 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.549464 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m15:25:25.551601 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m15:25:25.551601 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m15:25:25.553743 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_resumo_financeiro_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_resumo_financeiro"
                ^
[0m15:25:25.554283 [error] [Thread-1 (]: 29 of 61 ERROR not_null_fato_resumo_financeiro_id_data ......................... [[31mERROR[0m in 0.02s]
[0m15:25:25.555338 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:25:25.555338 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:25:25.556379 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_resumo_financeiro_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_resumo_financeiro"
                ^.
[0m15:25:25.556900 [info ] [Thread-1 (]: 30 of 61 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m15:25:25.557435 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m15:25:25.557964 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:25:25.561129 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:25:25.561659 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:25:25.563195 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:25:25.565277 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:25:25.566287 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m15:25:25.566287 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.566287 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.567366 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:25:25.567366 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.567366 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.567366 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.568931 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m15:25:25.570079 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m15:25:25.570079 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m15:25:25.573194 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_resumo_financeiro_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_resumo_financeiro"
                ^
[0m15:25:25.573194 [error] [Thread-1 (]: 30 of 61 ERROR not_null_fato_resumo_financeiro_id_instituicao .................. [[31mERROR[0m in 0.02s]
[0m15:25:25.574199 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:25:25.574199 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m15:25:25.575982 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_resumo_financeiro_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_resumo_financeiro"
                ^.
[0m15:25:25.575197 [info ] [Thread-1 (]: 31 of 61 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m15:25:25.576648 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m15:25:25.576648 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m15:25:25.579196 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m15:25:25.581190 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m15:25:25.582355 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m15:25:25.583912 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m15:25:25.583912 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m15:25:25.583912 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.585370 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.585370 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m15:25:25.585882 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.585882 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.586935 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.586935 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m15:25:25.589985 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m15:25:25.591073 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m15:25:25.592828 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_risco_credito_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_risco_credito does not exist!
  Did you mean "silver.prudential_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_risco_credito"
                ^
[0m15:25:25.592828 [error] [Thread-1 (]: 31 of 61 ERROR not_null_fato_risco_credito_id_instituicao ...................... [[31mERROR[0m in 0.02s]
[0m15:25:25.594409 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m15:25:25.594409 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m15:25:25.595419 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_risco_credito_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_risco_credito does not exist!
  Did you mean "silver.prudential_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_risco_credito"
                ^.
[0m15:25:25.595419 [info ] [Thread-1 (]: 32 of 61 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m15:25:25.595419 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m15:25:25.597233 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m15:25:25.601078 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m15:25:25.602144 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m15:25:25.604290 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m15:25:25.605365 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m15:25:25.605891 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m15:25:25.605891 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.605891 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.606906 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m15:25:25.607418 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.607944 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.608499 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.608499 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m15:25:25.611484 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m15:25:25.611484 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m15:25:25.613580 [debug] [Thread-1 (]: Runtime Error in test not_null_fato_risco_credito_id_nivel_risco (models\gold\schema.yml)
  Catalog Error: Table with name fato_risco_credito does not exist!
  Did you mean "silver.prudential_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_risco_credito"
                ^
[0m15:25:25.613580 [error] [Thread-1 (]: 32 of 61 ERROR not_null_fato_risco_credito_id_nivel_risco ...................... [[31mERROR[0m in 0.02s]
[0m15:25:25.615097 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m15:25:25.615696 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:25:25.616288 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' to be skipped because of status 'error'.  Reason: Runtime Error in test not_null_fato_risco_credito_id_nivel_risco (models\gold\schema.yml)
  Catalog Error: Table with name fato_risco_credito does not exist!
  Did you mean "silver.prudential_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_risco_credito"
                ^.
[0m15:25:25.616288 [info ] [Thread-1 (]: 33 of 61 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m15:25:25.617307 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m15:25:25.617307 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:25:25.625211 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:25:25.626191 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:25:25.628477 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:25:25.629999 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:25:25.629999 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m15:25:25.629999 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.631046 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.631046 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:25:25.631046 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.632611 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.632611 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.632611 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m15:25:25.636102 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m15:25:25.636641 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m15:25:25.639423 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^
[0m15:25:25.639978 [error] [Thread-1 (]: 33 of 61 ERROR relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:25:25.640508 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:25:25.641515 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:25:25.641515 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^.
[0m15:25:25.641515 [info ] [Thread-1 (]: 34 of 61 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m15:25:25.642516 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m15:25:25.643083 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:25:25.647214 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:25:25.648224 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:25:25.649359 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:25:25.651496 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:25:25.652066 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m15:25:25.652066 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.652066 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.652066 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:25:25.652066 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.654342 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.654915 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.654915 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m15:25:25.658579 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m15:25:25.658579 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m15:25:25.661725 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^
[0m15:25:25.661725 [error] [Thread-1 (]: 34 of 61 ERROR relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[31mERROR[0m in 0.02s]
[0m15:25:25.661725 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:25:25.662747 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:25:25.662747 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^.
[0m15:25:25.662747 [info ] [Thread-1 (]: 35 of 61 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m15:25:25.663845 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m15:25:25.663845 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:25:25.668132 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:25:25.669143 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:25:25.673135 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:25:25.676846 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:25:25.676846 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m15:25:25.677395 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.677933 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.677933 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:25:25.678478 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.679051 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.679051 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.679604 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m15:25:25.681174 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m15:25:25.681174 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m15:25:25.683739 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^
[0m15:25:25.683739 [error] [Thread-1 (]: 35 of 61 ERROR relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[31mERROR[0m in 0.02s]
[0m15:25:25.685384 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:25:25.685901 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:25:25.685901 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^.
[0m15:25:25.685901 [info ] [Thread-1 (]: 36 of 61 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m15:25:25.686907 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m15:25:25.686907 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:25:25.694125 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:25:25.695182 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:25:25.697864 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:25:25.697864 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:25:25.699383 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m15:25:25.699383 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.699383 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.699383 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:25:25.699383 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.700985 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.701633 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.702191 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m15:25:25.704401 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m15:25:25.705013 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m15:25:25.707097 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^
[0m15:25:25.707097 [error] [Thread-1 (]: 36 of 61 ERROR relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[31mERROR[0m in 0.02s]
[0m15:25:25.707654 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:25:25.707654 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:25:25.708702 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^.
[0m15:25:25.708702 [info ] [Thread-1 (]: 37 of 61 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m15:25:25.708702 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m15:25:25.708702 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:25:25.714036 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:25:25.715015 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:25:25.717681 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:25:25.719230 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:25:25.719230 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m15:25:25.720241 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.720241 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.721041 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:25:25.721561 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.722093 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.722621 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.723151 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m15:25:25.725297 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m15:25:25.725297 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m15:25:25.728324 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^
[0m15:25:25.728324 [error] [Thread-1 (]: 37 of 61 ERROR relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[31mERROR[0m in 0.02s]
[0m15:25:25.729392 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:25:25.729392 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:25:25.729392 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^.
[0m15:25:25.729392 [info ] [Thread-1 (]: 38 of 61 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:25:25.731058 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m15:25:25.731058 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:25:25.737409 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:25:25.738402 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:25:25.739909 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:25:25.741917 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:25:25.741917 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m15:25:25.741917 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.743132 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.743132 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:25:25.743132 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.744753 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.744753 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.744753 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m15:25:25.747397 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m15:25:25.747397 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m15:25:25.749430 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_balanco_patrimonial does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_balanco_patrimonial"
                    ^
[0m15:25:25.749430 [error] [Thread-1 (]: 38 of 61 ERROR relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[31mERROR[0m in 0.02s]
[0m15:25:25.750963 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:25:25.751524 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:25:25.751524 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_balanco_patrimonial does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_balanco_patrimonial"
                    ^.
[0m15:25:25.752088 [info ] [Thread-1 (]: 39 of 61 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:25:25.752088 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m15:25:25.752088 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:25:25.757013 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:25:25.757561 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:25:25.760093 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:25:25.760093 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:25:25.761688 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m15:25:25.761688 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.762676 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.762676 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:25:25.764371 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.765527 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.765527 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.766534 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m15:25:25.769123 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m15:25:25.769638 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m15:25:25.772794 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_balanco_patrimonial does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_balanco_patrimonial"
                    ^
[0m15:25:25.773869 [error] [Thread-1 (]: 39 of 61 ERROR relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:25:25.774403 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:25:25.774949 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m15:25:25.775486 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_balanco_patrimonial does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_balanco_patrimonial"
                    ^.
[0m15:25:25.776018 [info ] [Thread-1 (]: 40 of 61 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:25:25.776551 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m15:25:25.777125 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m15:25:25.781388 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m15:25:25.782395 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m15:25:25.784980 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m15:25:25.785977 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m15:25:25.785977 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m15:25:25.785977 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.787320 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.787320 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m15:25:25.788332 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.788332 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.788332 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.788332 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m15:25:25.790879 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m15:25:25.791897 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m15:25:25.792947 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "silver.financial_conglomerates_summary"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^
[0m15:25:25.792947 [error] [Thread-1 (]: 40 of 61 ERROR relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[31mERROR[0m in 0.02s]
[0m15:25:25.794659 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m15:25:25.794659 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:25:25.795672 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "silver.financial_conglomerates_summary"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^.
[0m15:25:25.796806 [info ] [Thread-1 (]: 41 of 61 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:25:25.798852 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m15:25:25.800033 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:25:25.807790 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:25:25.809812 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:25:25.811927 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:25:25.813334 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:25:25.813334 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m15:25:25.814873 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.815459 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.816513 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:25:25.816513 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.817608 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.817608 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.817608 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m15:25:25.820010 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m15:25:25.821612 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m15:25:25.824152 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "silver.financial_conglomerates_summary"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^
[0m15:25:25.824152 [error] [Thread-1 (]: 41 of 61 ERROR relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.03s]
[0m15:25:25.825144 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:25:25.825144 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m15:25:25.826145 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "silver.financial_conglomerates_summary"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^.
[0m15:25:25.826145 [info ] [Thread-1 (]: 42 of 61 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:25:25.827146 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m15:25:25.827146 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m15:25:25.831246 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m15:25:25.831246 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m15:25:25.834030 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m15:25:25.835125 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m15:25:25.835674 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m15:25:25.835674 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.835674 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.836724 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m15:25:25.836724 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.837329 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.837329 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.838432 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m15:25:25.840040 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m15:25:25.840040 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m15:25:25.843250 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^
[0m15:25:25.844285 [error] [Thread-1 (]: 42 of 61 ERROR relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[31mERROR[0m in 0.02s]
[0m15:25:25.844957 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m15:25:25.844957 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:25:25.845967 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^.
[0m15:25:25.844957 [info ] [Thread-1 (]: 43 of 61 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:25:25.845967 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m15:25:25.846967 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:25:25.850636 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:25:25.852258 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:25:25.853922 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:25:25.855073 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:25:25.855073 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m15:25:25.855073 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.856094 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.856094 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:25:25.856094 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.857708 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.857708 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.857708 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m15:25:25.860414 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m15:25:25.861437 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m15:25:25.863038 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^
[0m15:25:25.863038 [error] [Thread-1 (]: 43 of 61 ERROR relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:25:25.864083 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:25:25.865048 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m15:25:25.865048 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^.
[0m15:25:25.865577 [info ] [Thread-1 (]: 44 of 61 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:25:25.865577 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m15:25:25.865577 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m15:25:25.869748 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m15:25:25.870358 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m15:25:25.872974 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m15:25:25.874586 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m15:25:25.875105 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m15:25:25.875105 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.876112 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.876112 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m15:25:25.876112 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.877112 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.877112 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.878144 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m15:25:25.879788 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m15:25:25.879788 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m15:25:25.882739 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^
[0m15:25:25.883245 [error] [Thread-1 (]: 44 of 61 ERROR relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[31mERROR[0m in 0.02s]
[0m15:25:25.884296 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m15:25:25.884296 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:25:25.884821 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^.
[0m15:25:25.885353 [info ] [Thread-1 (]: 45 of 61 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:25:25.885881 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m15:25:25.886412 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:25:25.890575 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:25:25.893082 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:25:25.894816 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:25:25.895837 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:25:25.896830 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m15:25:25.897345 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.897345 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.897345 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:25:25.898361 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.898361 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.899357 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.899357 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m15:25:25.902079 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m15:25:25.902079 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m15:25:25.904848 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^
[0m15:25:25.904848 [error] [Thread-1 (]: 45 of 61 ERROR relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:25:25.906381 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:25:25.906381 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m15:25:25.907390 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^.
[0m15:25:25.907390 [info ] [Thread-1 (]: 46 of 61 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:25:25.907390 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m15:25:25.908436 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m15:25:25.912069 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m15:25:25.912593 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m15:25:25.914610 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m15:25:25.915653 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m15:25:25.916706 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m15:25:25.916706 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.917299 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.917299 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m15:25:25.917299 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.918319 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.918319 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.919318 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m15:25:25.922478 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m15:25:25.923056 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m15:25:25.926327 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^
[0m15:25:25.926886 [error] [Thread-1 (]: 46 of 61 ERROR relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[31mERROR[0m in 0.02s]
[0m15:25:25.927952 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m15:25:25.927952 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:25:25.929024 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^.
[0m15:25:25.929541 [info ] [Thread-1 (]: 47 of 61 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:25:25.929541 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m15:25:25.929541 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:25:25.934326 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:25:25.935921 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:25:25.938481 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:25:25.938481 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:25:25.939992 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m15:25:25.939992 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.941001 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.941001 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:25:25.941001 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.942002 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.942002 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.943069 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m15:25:25.945713 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m15:25:25.945713 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m15:25:25.947244 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^
[0m15:25:25.948811 [error] [Thread-1 (]: 47 of 61 ERROR relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:25:25.949340 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:25:25.949340 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m15:25:25.949340 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^.
[0m15:25:25.949340 [info ] [Thread-1 (]: 48 of 61 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:25:25.950955 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m15:25:25.950955 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m15:25:25.954939 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m15:25:25.955949 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m15:25:25.958344 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m15:25:25.959898 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m15:25:25.959898 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m15:25:25.960429 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.960960 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:25.961493 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m15:25:25.961493 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.962562 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.963106 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.963106 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m15:25:25.965834 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m15:25:25.966341 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m15:25:25.967906 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_movimentacao_cambio does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_movimentacao_cambio"
                    ^
[0m15:25:25.969424 [error] [Thread-1 (]: 48 of 61 ERROR relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[31mERROR[0m in 0.02s]
[0m15:25:25.970028 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m15:25:25.970028 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:25:25.970028 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_movimentacao_cambio does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_movimentacao_cambio"
                    ^.
[0m15:25:25.970028 [info ] [Thread-1 (]: 49 of 61 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:25:25.971605 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m15:25:25.971605 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:25:25.975761 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:25:25.976760 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:25:25.978268 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:25:25.979291 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:25:25.980327 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m15:25:25.980327 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:25.980864 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:25.980864 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:25:25.980864 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.980864 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:25.982475 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:25.982475 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m15:25:25.986790 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m15:25:25.986790 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m15:25:25.988808 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_movimentacao_cambio does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_movimentacao_cambio"
                    ^
[0m15:25:25.989807 [error] [Thread-1 (]: 49 of 61 ERROR relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:25:25.991001 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:25:25.991001 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m15:25:25.991001 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_movimentacao_cambio does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_movimentacao_cambio"
                    ^.
[0m15:25:25.992000 [info ] [Thread-1 (]: 50 of 61 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:25:25.992000 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m15:25:25.992000 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m15:25:25.997560 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m15:25:25.998641 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m15:25:26.000156 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m15:25:26.001713 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m15:25:26.002265 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m15:25:26.002265 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:26.003277 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:26.003786 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m15:25:26.003786 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:26.004970 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:26.004970 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:26.004970 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m15:25:26.007640 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m15:25:26.008177 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m15:25:26.010186 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_operacoes_clientes does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_operacoes_clientes"
                    ^
[0m15:25:26.010186 [error] [Thread-1 (]: 50 of 61 ERROR relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[31mERROR[0m in 0.02s]
[0m15:25:26.011734 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m15:25:26.011734 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m15:25:26.011734 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_operacoes_clientes does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_operacoes_clientes"
                    ^.
[0m15:25:26.012784 [info ] [Thread-1 (]: 51 of 61 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:25:26.012784 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m15:25:26.012784 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m15:25:26.017751 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m15:25:26.017751 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m15:25:26.021342 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m15:25:26.023092 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m15:25:26.023686 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m15:25:26.024240 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:26.025304 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:26.025304 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m15:25:26.025840 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:26.026910 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:26.027443 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:26.027977 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m15:25:26.031110 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m15:25:26.031694 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m15:25:26.032702 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_operacoes_clientes does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_operacoes_clientes"
                    ^
[0m15:25:26.032702 [error] [Thread-1 (]: 51 of 61 ERROR relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:25:26.034544 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m15:25:26.034544 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m15:25:26.036119 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_operacoes_clientes does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_operacoes_clientes"
                    ^.
[0m15:25:26.036119 [info ] [Thread-1 (]: 52 of 61 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m15:25:26.038156 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m15:25:26.038793 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m15:25:26.042974 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m15:25:26.042974 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m15:25:26.045917 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m15:25:26.047953 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m15:25:26.047953 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m15:25:26.047953 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:26.048968 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:26.049473 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m15:25:26.049473 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:26.049473 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:26.049473 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:26.051017 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m15:25:26.053233 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m15:25:26.053793 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m15:25:26.055934 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_regiao_credito does not exist!
  Did you mean "silver.prudential_conglomerates_segmentation"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_regiao_credito"
                    ^
[0m15:25:26.056441 [error] [Thread-1 (]: 52 of 61 ERROR relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[31mERROR[0m in 0.02s]
[0m15:25:26.056948 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m15:25:26.057514 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:25:26.058524 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_regiao_credito does not exist!
  Did you mean "silver.prudential_conglomerates_segmentation"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_regiao_credito"
                    ^.
[0m15:25:26.057514 [info ] [Thread-1 (]: 53 of 61 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:25:26.058524 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m15:25:26.058524 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:25:26.063142 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:25:26.064152 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:25:26.066785 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:25:26.068883 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:25:26.069220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m15:25:26.069727 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:26.070251 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:26.070780 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:25:26.070780 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:26.071829 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:26.071829 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:26.072355 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m15:25:26.075045 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m15:25:26.075581 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m15:25:26.077130 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_resumo_financeiro"
                    ^
[0m15:25:26.078636 [error] [Thread-1 (]: 53 of 61 ERROR relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[31mERROR[0m in 0.02s]
[0m15:25:26.079242 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:25:26.079760 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:25:26.080293 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_resumo_financeiro"
                    ^.
[0m15:25:26.079760 [info ] [Thread-1 (]: 54 of 61 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:25:26.081302 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m15:25:26.081302 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:25:26.087480 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:25:26.088490 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:25:26.092007 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:25:26.093058 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:25:26.094086 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m15:25:26.094597 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:26.095115 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:26.095640 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:25:26.095640 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:26.096647 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:25:26.097209 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:26.097209 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m15:25:26.100815 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m15:25:26.100815 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m15:25:26.102449 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_resumo_financeiro"
                    ^
[0m15:25:26.103484 [error] [Thread-1 (]: 54 of 61 ERROR relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:25:26.103992 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:25:26.104538 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m15:25:26.105151 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_resumo_financeiro"
                    ^.
[0m15:25:26.105151 [info ] [Thread-1 (]: 55 of 61 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m15:25:26.106172 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m15:25:26.106172 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m15:25:26.110915 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m15:25:26.112558 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m15:25:26.113574 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m15:25:26.115665 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m15:25:26.115665 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m15:25:26.115665 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:26.116673 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:26.117179 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m15:25:26.117179 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.119189 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.119189 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:26.119697 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m15:25:26.121829 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m15:25:26.122354 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m15:25:26.124420 [debug] [Thread-1 (]: Runtime Error in test unique_dim_classe_instituicao_id_classe (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "silver.individual_institutions_assets"?
  
  LINE 18: from "gold_warehouse"."main"."dim_classe_instituicao"
                ^
[0m15:25:26.124420 [error] [Thread-1 (]: 55 of 61 ERROR unique_dim_classe_instituicao_id_classe ......................... [[31mERROR[0m in 0.02s]
[0m15:25:26.125443 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m15:25:26.125443 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m15:25:26.126421 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19' to be skipped because of status 'error'.  Reason: Runtime Error in test unique_dim_classe_instituicao_id_classe (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "silver.individual_institutions_assets"?
  
  LINE 18: from "gold_warehouse"."main"."dim_classe_instituicao"
                ^.
[0m15:25:26.126421 [info ] [Thread-1 (]: 56 of 61 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m15:25:26.126421 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m15:25:26.126421 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m15:25:26.129542 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m15:25:26.131132 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m15:25:26.132720 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m15:25:26.134280 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m15:25:26.134280 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m15:25:26.135837 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:26.135837 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:26.135837 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m15:25:26.136847 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.137404 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.137404 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:26.138406 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m15:25:26.139930 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m15:25:26.139930 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m15:25:26.143162 [debug] [Thread-1 (]: Runtime Error in test unique_dim_consolidado_id_consolidado (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "pg_catalog.pg_constraint"?
  
  LINE 18: from "gold_warehouse"."main"."dim_consolidado"
                ^
[0m15:25:26.143703 [error] [Thread-1 (]: 56 of 61 ERROR unique_dim_consolidado_id_consolidado ........................... [[31mERROR[0m in 0.02s]
[0m15:25:26.144214 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m15:25:26.144785 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m15:25:26.144785 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862' to be skipped because of status 'error'.  Reason: Runtime Error in test unique_dim_consolidado_id_consolidado (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "pg_catalog.pg_constraint"?
  
  LINE 18: from "gold_warehouse"."main"."dim_consolidado"
                ^.
[0m15:25:26.144785 [info ] [Thread-1 (]: 57 of 61 START test unique_dim_controle_id_controle ............................ [RUN]
[0m15:25:26.145805 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m15:25:26.145805 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m15:25:26.148830 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m15:25:26.149352 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m15:25:26.152095 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m15:25:26.153666 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m15:25:26.153666 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m15:25:26.154378 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:26.154907 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:26.154907 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m15:25:26.155441 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.155971 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.156549 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:26.157244 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m15:25:26.159367 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m15:25:26.159367 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m15:25:26.161968 [debug] [Thread-1 (]: Runtime Error in test unique_dim_controle_id_controle (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "pg_catalog.pg_constraint"?
  
  LINE 18: from "gold_warehouse"."main"."dim_controle"
                ^
[0m15:25:26.161968 [error] [Thread-1 (]: 57 of 61 ERROR unique_dim_controle_id_controle ................................. [[31mERROR[0m in 0.02s]
[0m15:25:26.163539 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m15:25:26.163539 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:25:26.163539 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c' to be skipped because of status 'error'.  Reason: Runtime Error in test unique_dim_controle_id_controle (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "pg_catalog.pg_constraint"?
  
  LINE 18: from "gold_warehouse"."main"."dim_controle"
                ^.
[0m15:25:26.163539 [info ] [Thread-1 (]: 58 of 61 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m15:25:26.165046 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m15:25:26.165046 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:25:26.168166 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:25:26.169145 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:25:26.170216 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:25:26.171247 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:25:26.172349 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m15:25:26.172990 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:26.173552 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:26.173552 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:25:26.173552 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.174567 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.174567 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:26.175579 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m15:25:26.178105 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m15:25:26.178105 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m15:25:26.181282 [debug] [Thread-1 (]: Runtime Error in test unique_dim_instituicao_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 18: from "gold_warehouse"."main"."dim_instituicao"
                ^
[0m15:25:26.181282 [error] [Thread-1 (]: 58 of 61 ERROR unique_dim_instituicao_id_instituicao ........................... [[31mERROR[0m in 0.02s]
[0m15:25:26.182853 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:25:26.182853 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m15:25:26.183864 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37' to be skipped because of status 'error'.  Reason: Runtime Error in test unique_dim_instituicao_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 18: from "gold_warehouse"."main"."dim_instituicao"
                ^.
[0m15:25:26.183864 [info ] [Thread-1 (]: 59 of 61 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m15:25:26.185005 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m15:25:26.185005 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m15:25:26.190011 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m15:25:26.190600 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m15:25:26.193682 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m15:25:26.194216 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m15:25:26.194785 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m15:25:26.194785 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:26.195796 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:26.195796 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m15:25:26.195796 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.196803 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.197389 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:26.197389 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m15:25:26.199399 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m15:25:26.199399 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m15:25:26.202190 [debug] [Thread-1 (]: Runtime Error in test unique_dim_localizacao_id_localizacao (models\gold\schema.yml)
  Catalog Error: Table with name dim_localizacao does not exist!
  Did you mean "silver.prudential_conglomerates_capital_information"?
  
  LINE 18: from "gold_warehouse"."main"."dim_localizacao"
                ^
[0m15:25:26.202190 [error] [Thread-1 (]: 59 of 61 ERROR unique_dim_localizacao_id_localizacao ........................... [[31mERROR[0m in 0.02s]
[0m15:25:26.203760 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m15:25:26.204400 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m15:25:26.205484 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb' to be skipped because of status 'error'.  Reason: Runtime Error in test unique_dim_localizacao_id_localizacao (models\gold\schema.yml)
  Catalog Error: Table with name dim_localizacao does not exist!
  Did you mean "silver.prudential_conglomerates_capital_information"?
  
  LINE 18: from "gold_warehouse"."main"."dim_localizacao"
                ^.
[0m15:25:26.204939 [info ] [Thread-1 (]: 60 of 61 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m15:25:26.206530 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m15:25:26.207059 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m15:25:26.209206 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m15:25:26.210224 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m15:25:26.212433 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m15:25:26.213999 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m15:25:26.213999 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m15:25:26.213999 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:26.215015 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:26.215015 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m15:25:26.215617 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.215617 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.216629 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:26.216629 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m15:25:26.219238 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m15:25:26.219746 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m15:25:26.222917 [debug] [Thread-1 (]: Runtime Error in test unique_dim_segmento_id_segmento (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "pg_catalog.pg_indexes"?
  
  LINE 18: from "gold_warehouse"."main"."dim_segmento"
                ^
[0m15:25:26.223447 [error] [Thread-1 (]: 60 of 61 ERROR unique_dim_segmento_id_segmento ................................. [[31mERROR[0m in 0.02s]
[0m15:25:26.224520 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m15:25:26.225083 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m15:25:26.225653 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a' to be skipped because of status 'error'.  Reason: Runtime Error in test unique_dim_segmento_id_segmento (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "pg_catalog.pg_indexes"?
  
  LINE 18: from "gold_warehouse"."main"."dim_segmento"
                ^.
[0m15:25:26.226190 [info ] [Thread-1 (]: 61 of 61 START test unique_dim_tempo_id_data ................................... [RUN]
[0m15:25:26.227272 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m15:25:26.227794 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m15:25:26.231703 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m15:25:26.232745 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m15:25:26.234428 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m15:25:26.235639 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m15:25:26.236189 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m15:25:26.236712 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:26.237262 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:26.237808 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m15:25:26.238346 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.238878 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:25:26.239416 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:26.239951 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m15:25:26.242205 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m15:25:26.242205 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m15:25:26.245381 [debug] [Thread-1 (]: Runtime Error in test unique_dim_tempo_id_data (models\gold\schema.yml)
  Catalog Error: Table with name dim_tempo does not exist!
  Did you mean "main.duckdb_types"?
  
  LINE 18: from "gold_warehouse"."main"."dim_tempo"
                ^
[0m15:25:26.245381 [error] [Thread-1 (]: 61 of 61 ERROR unique_dim_tempo_id_data ........................................ [[31mERROR[0m in 0.02s]
[0m15:25:26.245381 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m15:25:26.246905 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e' to be skipped because of status 'error'.  Reason: Runtime Error in test unique_dim_tempo_id_data (models\gold\schema.yml)
  Catalog Error: Table with name dim_tempo does not exist!
  Did you mean "main.duckdb_types"?
  
  LINE 18: from "gold_warehouse"."main"."dim_tempo"
                ^.
[0m15:25:26.247510 [debug] [MainThread]: Using duckdb connection "master"
[0m15:25:26.247510 [debug] [MainThread]: On master: BEGIN
[0m15:25:26.247510 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:25:26.249041 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:25:26.249590 [debug] [MainThread]: On master: COMMIT
[0m15:25:26.249590 [debug] [MainThread]: Using duckdb connection "master"
[0m15:25:26.250226 [debug] [MainThread]: On master: COMMIT
[0m15:25:26.250226 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:25:26.251239 [debug] [MainThread]: On master: Close
[0m15:25:26.251746 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:25:26.252325 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:25:26.252325 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e' was properly closed.
[0m15:25:26.252325 [info ] [MainThread]: 
[0m15:25:26.253334 [info ] [MainThread]: Finished running 61 data tests in 0 hours 0 minutes and 1.75 seconds (1.75s).
[0m15:25:26.258776 [debug] [MainThread]: Command end result
[0m15:25:26.292000 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:25:26.294395 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:25:26.304623 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:25:26.305148 [info ] [MainThread]: 
[0m15:25:26.305694 [info ] [MainThread]: [31mCompleted with 61 errors, 0 partial successes, and 0 warnings:[0m
[0m15:25:26.306210 [info ] [MainThread]: 
[0m15:25:26.306210 [error] [MainThread]: [31mFailure in test not_null_dim_classe_instituicao_id_classe (models\gold\schema.yml)[0m
[0m15:25:26.307218 [error] [MainThread]:   Runtime Error in test not_null_dim_classe_instituicao_id_classe (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "silver.individual_institutions_assets"?
  
  LINE 17: from "gold_warehouse"."main"."dim_classe_instituicao"
                ^
[0m15:25:26.307218 [info ] [MainThread]: 
[0m15:25:26.307218 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_dim_classe_instituicao_id_classe.sql
[0m15:25:26.308274 [info ] [MainThread]: 
[0m15:25:26.308274 [error] [MainThread]: [31mFailure in test not_null_dim_consolidado_id_consolidado (models\gold\schema.yml)[0m
[0m15:25:26.308274 [error] [MainThread]:   Runtime Error in test not_null_dim_consolidado_id_consolidado (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "pg_catalog.pg_constraint"?
  
  LINE 17: from "gold_warehouse"."main"."dim_consolidado"
                ^
[0m15:25:26.309782 [info ] [MainThread]: 
[0m15:25:26.309782 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_dim_consolidado_id_consolidado.sql
[0m15:25:26.310332 [info ] [MainThread]: 
[0m15:25:26.310332 [error] [MainThread]: [31mFailure in test not_null_dim_controle_id_controle (models\gold\schema.yml)[0m
[0m15:25:26.310332 [error] [MainThread]:   Runtime Error in test not_null_dim_controle_id_controle (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "pg_catalog.pg_constraint"?
  
  LINE 17: from "gold_warehouse"."main"."dim_controle"
                ^
[0m15:25:26.310332 [info ] [MainThread]: 
[0m15:25:26.311890 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_dim_controle_id_controle.sql
[0m15:25:26.312513 [info ] [MainThread]: 
[0m15:25:26.313100 [error] [MainThread]: [31mFailure in test not_null_dim_instituicao_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.313100 [error] [MainThread]:   Runtime Error in test not_null_dim_instituicao_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 17: from "gold_warehouse"."main"."dim_instituicao"
                ^
[0m15:25:26.314112 [info ] [MainThread]: 
[0m15:25:26.314112 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_dim_instituicao_id_instituicao.sql
[0m15:25:26.315112 [info ] [MainThread]: 
[0m15:25:26.315112 [error] [MainThread]: [31mFailure in test not_null_dim_instituicao_id_localizacao (models\gold\schema.yml)[0m
[0m15:25:26.316689 [error] [MainThread]:   Runtime Error in test not_null_dim_instituicao_id_localizacao (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 17: from "gold_warehouse"."main"."dim_instituicao"
                ^
[0m15:25:26.317290 [info ] [MainThread]: 
[0m15:25:26.318297 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_dim_instituicao_id_localizacao.sql
[0m15:25:26.318297 [info ] [MainThread]: 
[0m15:25:26.319298 [error] [MainThread]: [31mFailure in test not_null_dim_localizacao_id_localizacao (models\gold\schema.yml)[0m
[0m15:25:26.319298 [error] [MainThread]:   Runtime Error in test not_null_dim_localizacao_id_localizacao (models\gold\schema.yml)
  Catalog Error: Table with name dim_localizacao does not exist!
  Did you mean "silver.prudential_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."dim_localizacao"
                ^
[0m15:25:26.319298 [info ] [MainThread]: 
[0m15:25:26.320363 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_dim_localizacao_id_localizacao.sql
[0m15:25:26.320880 [info ] [MainThread]: 
[0m15:25:26.321400 [error] [MainThread]: [31mFailure in test not_null_dim_segmento_id_segmento (models\gold\schema.yml)[0m
[0m15:25:26.321400 [error] [MainThread]:   Runtime Error in test not_null_dim_segmento_id_segmento (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "pg_catalog.pg_indexes"?
  
  LINE 17: from "gold_warehouse"."main"."dim_segmento"
                ^
[0m15:25:26.322457 [info ] [MainThread]: 
[0m15:25:26.323032 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_dim_segmento_id_segmento.sql
[0m15:25:26.323032 [info ] [MainThread]: 
[0m15:25:26.324043 [error] [MainThread]: [31mFailure in test not_null_dim_tempo_id_data (models\gold\schema.yml)[0m
[0m15:25:26.325042 [error] [MainThread]:   Runtime Error in test not_null_dim_tempo_id_data (models\gold\schema.yml)
  Catalog Error: Table with name dim_tempo does not exist!
  Did you mean "main.duckdb_types"?
  
  LINE 17: from "gold_warehouse"."main"."dim_tempo"
                ^
[0m15:25:26.325042 [info ] [MainThread]: 
[0m15:25:26.325042 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_dim_tempo_id_data.sql
[0m15:25:26.326040 [info ] [MainThread]: 
[0m15:25:26.326040 [error] [MainThread]: [31mFailure in test not_null_fato_balanco_patrimonial_id_data (models\gold\schema.yml)[0m
[0m15:25:26.327041 [error] [MainThread]:   Runtime Error in test not_null_fato_balanco_patrimonial_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_balanco_patrimonial does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_balanco_patrimonial"
                ^
[0m15:25:26.327041 [info ] [MainThread]: 
[0m15:25:26.327675 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_balanco_patrimonial_id_data.sql
[0m15:25:26.327675 [info ] [MainThread]: 
[0m15:25:26.328238 [error] [MainThread]: [31mFailure in test not_null_fato_balanco_patrimonial_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.328818 [error] [MainThread]:   Runtime Error in test not_null_fato_balanco_patrimonial_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_balanco_patrimonial does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_balanco_patrimonial"
                ^
[0m15:25:26.328818 [info ] [MainThread]: 
[0m15:25:26.329330 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_balanco_patrimonial_id_instituicao.sql
[0m15:25:26.330342 [info ] [MainThread]: 
[0m15:25:26.330342 [error] [MainThread]: [31mFailure in test not_null_fato_capital_prudencial_id_data (models\gold\schema.yml)[0m
[0m15:25:26.331339 [error] [MainThread]:   Runtime Error in test not_null_fato_capital_prudencial_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "silver.financial_conglomerates_summary"?
  
  LINE 17: from "gold_warehouse"."main"."fato_capital_prudencial"
                ^
[0m15:25:26.331339 [info ] [MainThread]: 
[0m15:25:26.332468 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_capital_prudencial_id_data.sql
[0m15:25:26.332468 [info ] [MainThread]: 
[0m15:25:26.334050 [error] [MainThread]: [31mFailure in test not_null_fato_capital_prudencial_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.334587 [error] [MainThread]:   Runtime Error in test not_null_fato_capital_prudencial_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "silver.financial_conglomerates_summary"?
  
  LINE 17: from "gold_warehouse"."main"."fato_capital_prudencial"
                ^
[0m15:25:26.336876 [info ] [MainThread]: 
[0m15:25:26.337427 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_capital_prudencial_id_instituicao.sql
[0m15:25:26.337427 [info ] [MainThread]: 
[0m15:25:26.338434 [error] [MainThread]: [31mFailure in test not_null_fato_carteira_credito_atividade_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.338434 [error] [MainThread]:   Runtime Error in test not_null_fato_carteira_credito_atividade_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_atividade does not exist!
  Did you mean "silver.prudential_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_atividade"
                ^
[0m15:25:26.338434 [info ] [MainThread]: 
[0m15:25:26.339938 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_carteira_credito_atividade_id_instituicao.sql
[0m15:25:26.339938 [info ] [MainThread]: 
[0m15:25:26.340948 [error] [MainThread]: [31mFailure in test not_null_fato_carteira_credito_indexador_id_data (models\gold\schema.yml)[0m
[0m15:25:26.340948 [error] [MainThread]:   Runtime Error in test not_null_fato_carteira_credito_indexador_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                ^
[0m15:25:26.341947 [info ] [MainThread]: 
[0m15:25:26.341947 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_carteira_credito_indexador_id_data.sql
[0m15:25:26.343045 [info ] [MainThread]: 
[0m15:25:26.343658 [error] [MainThread]: [31mFailure in test not_null_fato_carteira_credito_indexador_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.344720 [error] [MainThread]:   Runtime Error in test not_null_fato_carteira_credito_indexador_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                ^
[0m15:25:26.345265 [info ] [MainThread]: 
[0m15:25:26.345790 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_carteira_credito_indexador_id_instituicao.sql
[0m15:25:26.345790 [info ] [MainThread]: 
[0m15:25:26.346328 [error] [MainThread]: [31mFailure in test not_null_fato_carteira_credito_porte_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.346885 [error] [MainThread]:   Runtime Error in test not_null_fato_carteira_credito_porte_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_porte does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_porte"
                ^
[0m15:25:26.347438 [info ] [MainThread]: 
[0m15:25:26.347970 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_carteira_credito_porte_id_instituicao.sql
[0m15:25:26.349027 [info ] [MainThread]: 
[0m15:25:26.350825 [error] [MainThread]: [31mFailure in test not_null_fato_carteira_credito_produto_id_data (models\gold\schema.yml)[0m
[0m15:25:26.351944 [error] [MainThread]:   Runtime Error in test not_null_fato_carteira_credito_produto_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_produto does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_individuals_type_maturity"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_produto"
                ^
[0m15:25:26.352487 [info ] [MainThread]: 
[0m15:25:26.353290 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_carteira_credito_produto_id_data.sql
[0m15:25:26.353820 [info ] [MainThread]: 
[0m15:25:26.355084 [error] [MainThread]: [31mFailure in test not_null_fato_carteira_credito_produto_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.355628 [error] [MainThread]:   Runtime Error in test not_null_fato_carteira_credito_produto_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_produto does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_individuals_type_maturity"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_produto"
                ^
[0m15:25:26.356148 [info ] [MainThread]: 
[0m15:25:26.356700 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_carteira_credito_produto_id_instituicao.sql
[0m15:25:26.357765 [info ] [MainThread]: 
[0m15:25:26.358306 [error] [MainThread]: [31mFailure in test not_null_fato_carteira_credito_totais_id_data (models\gold\schema.yml)[0m
[0m15:25:26.359052 [error] [MainThread]:   Runtime Error in test not_null_fato_carteira_credito_totais_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_totais"
                ^
[0m15:25:26.359654 [info ] [MainThread]: 
[0m15:25:26.360730 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_carteira_credito_totais_id_data.sql
[0m15:25:26.361265 [info ] [MainThread]: 
[0m15:25:26.361781 [error] [MainThread]: [31mFailure in test not_null_fato_carteira_credito_totais_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.362324 [error] [MainThread]:   Runtime Error in test not_null_fato_carteira_credito_totais_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_carteira_credito_totais"
                ^
[0m15:25:26.362868 [info ] [MainThread]: 
[0m15:25:26.363421 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_carteira_credito_totais_id_instituicao.sql
[0m15:25:26.363421 [info ] [MainThread]: 
[0m15:25:26.364571 [error] [MainThread]: [31mFailure in test not_null_fato_demonstracao_resultado_id_data (models\gold\schema.yml)[0m
[0m15:25:26.365095 [error] [MainThread]:   Runtime Error in test not_null_fato_demonstracao_resultado_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_demonstracao_resultado"
                ^
[0m15:25:26.365636 [info ] [MainThread]: 
[0m15:25:26.366187 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_demonstracao_resultado_id_data.sql
[0m15:25:26.366751 [info ] [MainThread]: 
[0m15:25:26.367294 [error] [MainThread]: [31mFailure in test not_null_fato_demonstracao_resultado_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.367822 [error] [MainThread]:   Runtime Error in test not_null_fato_demonstracao_resultado_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_demonstracao_resultado"
                ^
[0m15:25:26.368350 [info ] [MainThread]: 
[0m15:25:26.368865 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_demonstracao_resultado_id_instituicao.sql
[0m15:25:26.368865 [info ] [MainThread]: 
[0m15:25:26.369426 [error] [MainThread]: [31mFailure in test not_null_fato_movimentacao_cambio_id_data (models\gold\schema.yml)[0m
[0m15:25:26.369973 [error] [MainThread]:   Runtime Error in test not_null_fato_movimentacao_cambio_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_movimentacao_cambio does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_movimentacao_cambio"
                ^
[0m15:25:26.370587 [info ] [MainThread]: 
[0m15:25:26.371248 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_movimentacao_cambio_id_data.sql
[0m15:25:26.371790 [info ] [MainThread]: 
[0m15:25:26.372312 [error] [MainThread]: [31mFailure in test not_null_fato_movimentacao_cambio_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.372926 [error] [MainThread]:   Runtime Error in test not_null_fato_movimentacao_cambio_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_movimentacao_cambio does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 17: from "gold_warehouse"."main"."fato_movimentacao_cambio"
                ^
[0m15:25:26.373493 [info ] [MainThread]: 
[0m15:25:26.374133 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_movimentacao_cambio_id_instituicao.sql
[0m15:25:26.374705 [info ] [MainThread]: 
[0m15:25:26.375252 [error] [MainThread]: [31mFailure in test not_null_fato_operacoes_clientes_id_data (models\gold\schema.yml)[0m
[0m15:25:26.375826 [error] [MainThread]:   Runtime Error in test not_null_fato_operacoes_clientes_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_operacoes_clientes does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_operacoes_clientes"
                ^
[0m15:25:26.375826 [info ] [MainThread]: 
[0m15:25:26.376834 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_operacoes_clientes_id_data.sql
[0m15:25:26.376834 [info ] [MainThread]: 
[0m15:25:26.376834 [error] [MainThread]: [31mFailure in test not_null_fato_operacoes_clientes_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.377842 [error] [MainThread]:   Runtime Error in test not_null_fato_operacoes_clientes_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_operacoes_clientes does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_operacoes_clientes"
                ^
[0m15:25:26.377842 [info ] [MainThread]: 
[0m15:25:26.377842 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_operacoes_clientes_id_instituicao.sql
[0m15:25:26.379472 [info ] [MainThread]: 
[0m15:25:26.379472 [error] [MainThread]: [31mFailure in test not_null_fato_regiao_credito_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.379472 [error] [MainThread]:   Runtime Error in test not_null_fato_regiao_credito_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_regiao_credito does not exist!
  Did you mean "silver.prudential_conglomerates_segmentation"?
  
  LINE 17: from "gold_warehouse"."main"."fato_regiao_credito"
                ^
[0m15:25:26.381055 [info ] [MainThread]: 
[0m15:25:26.381055 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_regiao_credito_id_instituicao.sql
[0m15:25:26.381055 [info ] [MainThread]: 
[0m15:25:26.381055 [error] [MainThread]: [31mFailure in test not_null_fato_regiao_credito_id_regiao (models\gold\schema.yml)[0m
[0m15:25:26.382628 [error] [MainThread]:   Runtime Error in test not_null_fato_regiao_credito_id_regiao (models\gold\schema.yml)
  Catalog Error: Table with name fato_regiao_credito does not exist!
  Did you mean "silver.prudential_conglomerates_segmentation"?
  
  LINE 17: from "gold_warehouse"."main"."fato_regiao_credito"
                ^
[0m15:25:26.382628 [info ] [MainThread]: 
[0m15:25:26.382628 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_regiao_credito_id_regiao.sql
[0m15:25:26.384235 [info ] [MainThread]: 
[0m15:25:26.384235 [error] [MainThread]: [31mFailure in test not_null_fato_resumo_financeiro_id_data (models\gold\schema.yml)[0m
[0m15:25:26.384235 [error] [MainThread]:   Runtime Error in test not_null_fato_resumo_financeiro_id_data (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_resumo_financeiro"
                ^
[0m15:25:26.384235 [info ] [MainThread]: 
[0m15:25:26.385824 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_resumo_financeiro_id_data.sql
[0m15:25:26.385824 [info ] [MainThread]: 
[0m15:25:26.386835 [error] [MainThread]: [31mFailure in test not_null_fato_resumo_financeiro_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.386835 [error] [MainThread]:   Runtime Error in test not_null_fato_resumo_financeiro_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 17: from "gold_warehouse"."main"."fato_resumo_financeiro"
                ^
[0m15:25:26.386835 [info ] [MainThread]: 
[0m15:25:26.388128 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_resumo_financeiro_id_instituicao.sql
[0m15:25:26.388128 [info ] [MainThread]: 
[0m15:25:26.388128 [error] [MainThread]: [31mFailure in test not_null_fato_risco_credito_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.389136 [error] [MainThread]:   Runtime Error in test not_null_fato_risco_credito_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name fato_risco_credito does not exist!
  Did you mean "silver.prudential_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_risco_credito"
                ^
[0m15:25:26.389990 [info ] [MainThread]: 
[0m15:25:26.390527 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_risco_credito_id_instituicao.sql
[0m15:25:26.390527 [info ] [MainThread]: 
[0m15:25:26.390527 [error] [MainThread]: [31mFailure in test not_null_fato_risco_credito_id_nivel_risco (models\gold\schema.yml)[0m
[0m15:25:26.392045 [error] [MainThread]:   Runtime Error in test not_null_fato_risco_credito_id_nivel_risco (models\gold\schema.yml)
  Catalog Error: Table with name fato_risco_credito does not exist!
  Did you mean "silver.prudential_conglomerates_income_statement"?
  
  LINE 17: from "gold_warehouse"."main"."fato_risco_credito"
                ^
[0m15:25:26.392045 [info ] [MainThread]: 
[0m15:25:26.393054 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\not_null_fato_risco_credito_id_nivel_risco.sql
[0m15:25:26.393054 [info ] [MainThread]: 
[0m15:25:26.394149 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)[0m
[0m15:25:26.394714 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^
[0m15:25:26.395029 [info ] [MainThread]: 
[0m15:25:26.396072 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_b5bf1250f8e22e22ed6029d8a9776333.sql
[0m15:25:26.396590 [info ] [MainThread]: 
[0m15:25:26.397198 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)[0m
[0m15:25:26.397198 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^
[0m15:25:26.398210 [info ] [MainThread]: 
[0m15:25:26.398210 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_0eacdd127a052df6ef946b12273a2332.sql
[0m15:25:26.398210 [info ] [MainThread]: 
[0m15:25:26.399209 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)[0m
[0m15:25:26.399209 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^
[0m15:25:26.400324 [info ] [MainThread]: 
[0m15:25:26.400830 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_9713fcede76412e01759a305783eeec2.sql
[0m15:25:26.400830 [info ] [MainThread]: 
[0m15:25:26.401392 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)[0m
[0m15:25:26.401392 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^
[0m15:25:26.401948 [info ] [MainThread]: 
[0m15:25:26.402519 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_446031b84e0fad1bdbfdd1cf73647908.sql
[0m15:25:26.402519 [info ] [MainThread]: 
[0m15:25:26.403529 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)[0m
[0m15:25:26.404097 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 16:     from "gold_warehouse"."main"."dim_instituicao"
                    ^
[0m15:25:26.404666 [info ] [MainThread]: 
[0m15:25:26.405344 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_cf3f8176c8c99f31e0910db0802babb1.sql
[0m15:25:26.405884 [info ] [MainThread]: 
[0m15:25:26.406416 [error] [MainThread]: [31mFailure in test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)[0m
[0m15:25:26.406936 [error] [MainThread]:   Runtime Error in test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_balanco_patrimonial does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_balanco_patrimonial"
                    ^
[0m15:25:26.407495 [info ] [MainThread]: 
[0m15:25:26.407495 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_balanco_pat_2452a2f98f020a365a97bdc49cd2443d.sql
[0m15:25:26.407495 [info ] [MainThread]: 
[0m15:25:26.408501 [error] [MainThread]: [31mFailure in test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:25:26.408501 [error] [MainThread]:   Runtime Error in test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_balanco_patrimonial does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_balanco_patrimonial"
                    ^
[0m15:25:26.408501 [info ] [MainThread]: 
[0m15:25:26.410008 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_balanco_pat_f99122bd5f889fcd8f1b28b64e227cb7.sql
[0m15:25:26.410008 [info ] [MainThread]: 
[0m15:25:26.410565 [error] [MainThread]: [31mFailure in test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)[0m
[0m15:25:26.410565 [error] [MainThread]:   Runtime Error in test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "silver.financial_conglomerates_summary"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^
[0m15:25:26.411573 [info ] [MainThread]: 
[0m15:25:26.411573 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_capital_pru_c327a802c9a3946d362c7fcbe0a9c8d5.sql
[0m15:25:26.411573 [info ] [MainThread]: 
[0m15:25:26.412815 [error] [MainThread]: [31mFailure in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:25:26.412815 [error] [MainThread]:   Runtime Error in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "silver.financial_conglomerates_summary"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^
[0m15:25:26.412815 [info ] [MainThread]: 
[0m15:25:26.413824 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_capital_pru_dc7c09807e22eeacb03b88bc50c11898.sql
[0m15:25:26.413824 [info ] [MainThread]: 
[0m15:25:26.413824 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)[0m
[0m15:25:26.414823 [error] [MainThread]:   Runtime Error in test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^
[0m15:25:26.415411 [info ] [MainThread]: 
[0m15:25:26.415411 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_47367874933a8adef5348f7d5c16e955.sql
[0m15:25:26.416419 [info ] [MainThread]: 
[0m15:25:26.416419 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:25:26.416419 [error] [MainThread]:   Runtime Error in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^
[0m15:25:26.417471 [info ] [MainThread]: 
[0m15:25:26.417471 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_d80151d1e76d6c8de6ceccc7adebe863.sql
[0m15:25:26.417471 [info ] [MainThread]: 
[0m15:25:26.417471 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)[0m
[0m15:25:26.419048 [error] [MainThread]:   Runtime Error in test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^
[0m15:25:26.419650 [info ] [MainThread]: 
[0m15:25:26.420199 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_b80d619ed4a65f5f2f92f5f8999b7674.sql
[0m15:25:26.420782 [info ] [MainThread]: 
[0m15:25:26.420782 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:25:26.421798 [error] [MainThread]:   Runtime Error in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^
[0m15:25:26.422414 [info ] [MainThread]: 
[0m15:25:26.422414 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_b00506d5726bd2130bedc66dca5f83d0.sql
[0m15:25:26.422981 [info ] [MainThread]: 
[0m15:25:26.422981 [error] [MainThread]: [31mFailure in test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)[0m
[0m15:25:26.423994 [error] [MainThread]:   Runtime Error in test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^
[0m15:25:26.423994 [info ] [MainThread]: 
[0m15:25:26.423994 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_demonstraca_d5429a8a6e7f9fb65332850c9a7fba01.sql
[0m15:25:26.424992 [info ] [MainThread]: 
[0m15:25:26.424992 [error] [MainThread]: [31mFailure in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:25:26.424992 [error] [MainThread]:   Runtime Error in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^
[0m15:25:26.425991 [info ] [MainThread]: 
[0m15:25:26.425991 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_demonstraca_db359e0c9415ad5a3f4bbc17154e2e4a.sql
[0m15:25:26.426997 [info ] [MainThread]: 
[0m15:25:26.426997 [error] [MainThread]: [31mFailure in test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)[0m
[0m15:25:26.427994 [error] [MainThread]:   Runtime Error in test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_movimentacao_cambio does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_movimentacao_cambio"
                    ^
[0m15:25:26.427994 [info ] [MainThread]: 
[0m15:25:26.427994 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_movimentaca_e5c71bcdf93c6d4d116ad5f47c2565f6.sql
[0m15:25:26.429556 [info ] [MainThread]: 
[0m15:25:26.429556 [error] [MainThread]: [31mFailure in test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:25:26.429556 [error] [MainThread]:   Runtime Error in test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_movimentacao_cambio does not exist!
  Did you mean "silver.financial_conglomerates_capital_information"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_movimentacao_cambio"
                    ^
[0m15:25:26.431145 [info ] [MainThread]: 
[0m15:25:26.431145 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_movimentaca_f65fe7c26084232074cad8e621697c04.sql
[0m15:25:26.431145 [info ] [MainThread]: 
[0m15:25:26.432728 [error] [MainThread]: [31mFailure in test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)[0m
[0m15:25:26.432728 [error] [MainThread]:   Runtime Error in test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_operacoes_clientes does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_operacoes_clientes"
                    ^
[0m15:25:26.432728 [info ] [MainThread]: 
[0m15:25:26.432728 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_operacoes_c_944b5a940a53fb69871dabf153cb4770.sql
[0m15:25:26.434314 [info ] [MainThread]: 
[0m15:25:26.434314 [error] [MainThread]: [31mFailure in test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:25:26.434314 [error] [MainThread]:   Runtime Error in test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_operacoes_clientes does not exist!
  Did you mean "silver.financial_conglomerates_income_statement"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_operacoes_clientes"
                    ^
[0m15:25:26.434314 [info ] [MainThread]: 
[0m15:25:26.435879 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_operacoes_c_33521a505ad34b09fd04bb9cb908c25d.sql
[0m15:25:26.436534 [info ] [MainThread]: 
[0m15:25:26.437055 [error] [MainThread]: [31mFailure in test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_ (models\gold\schema.yml)[0m
[0m15:25:26.437055 [error] [MainThread]:   Runtime Error in test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_regiao_credito does not exist!
  Did you mean "silver.prudential_conglomerates_segmentation"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_regiao_credito"
                    ^
[0m15:25:26.437055 [info ] [MainThread]: 
[0m15:25:26.438072 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_regiao_cred_fa160f810cd3fcacbe6e5fb8a30f87f8.sql
[0m15:25:26.438072 [info ] [MainThread]: 
[0m15:25:26.439064 [error] [MainThread]: [31mFailure in test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)[0m
[0m15:25:26.439064 [error] [MainThread]:   Runtime Error in test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_resumo_financeiro"
                    ^
[0m15:25:26.440067 [info ] [MainThread]: 
[0m15:25:26.440067 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_resumo_fina_ae18b21cfd9c44e3a44222d5ca97250a.sql
[0m15:25:26.441211 [info ] [MainThread]: 
[0m15:25:26.441211 [error] [MainThread]: [31mFailure in test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:25:26.442210 [error] [MainThread]:   Runtime Error in test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "silver.financial_conglomerates_portfolio_indexer"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_resumo_financeiro"
                    ^
[0m15:25:26.442719 [info ] [MainThread]: 
[0m15:25:26.442719 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_resumo_fina_33b8ef218f06d998e4f59856b293d2fa.sql
[0m15:25:26.442719 [info ] [MainThread]: 
[0m15:25:26.444279 [error] [MainThread]: [31mFailure in test unique_dim_classe_instituicao_id_classe (models\gold\schema.yml)[0m
[0m15:25:26.444849 [error] [MainThread]:   Runtime Error in test unique_dim_classe_instituicao_id_classe (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "silver.individual_institutions_assets"?
  
  LINE 18: from "gold_warehouse"."main"."dim_classe_instituicao"
                ^
[0m15:25:26.444849 [info ] [MainThread]: 
[0m15:25:26.445858 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\unique_dim_classe_instituicao_id_classe.sql
[0m15:25:26.445858 [info ] [MainThread]: 
[0m15:25:26.446859 [error] [MainThread]: [31mFailure in test unique_dim_consolidado_id_consolidado (models\gold\schema.yml)[0m
[0m15:25:26.447364 [error] [MainThread]:   Runtime Error in test unique_dim_consolidado_id_consolidado (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "pg_catalog.pg_constraint"?
  
  LINE 18: from "gold_warehouse"."main"."dim_consolidado"
                ^
[0m15:25:26.447364 [info ] [MainThread]: 
[0m15:25:26.447364 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\unique_dim_consolidado_id_consolidado.sql
[0m15:25:26.448883 [info ] [MainThread]: 
[0m15:25:26.448883 [error] [MainThread]: [31mFailure in test unique_dim_controle_id_controle (models\gold\schema.yml)[0m
[0m15:25:26.449400 [error] [MainThread]:   Runtime Error in test unique_dim_controle_id_controle (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "pg_catalog.pg_constraint"?
  
  LINE 18: from "gold_warehouse"."main"."dim_controle"
                ^
[0m15:25:26.449400 [info ] [MainThread]: 
[0m15:25:26.449400 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\unique_dim_controle_id_controle.sql
[0m15:25:26.450967 [info ] [MainThread]: 
[0m15:25:26.450967 [error] [MainThread]: [31mFailure in test unique_dim_instituicao_id_instituicao (models\gold\schema.yml)[0m
[0m15:25:26.451543 [error] [MainThread]:   Runtime Error in test unique_dim_instituicao_id_instituicao (models\gold\schema.yml)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "main.duckdb_constraints"?
  
  LINE 18: from "gold_warehouse"."main"."dim_instituicao"
                ^
[0m15:25:26.452159 [info ] [MainThread]: 
[0m15:25:26.452704 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\unique_dim_instituicao_id_instituicao.sql
[0m15:25:26.452704 [info ] [MainThread]: 
[0m15:25:26.453719 [error] [MainThread]: [31mFailure in test unique_dim_localizacao_id_localizacao (models\gold\schema.yml)[0m
[0m15:25:26.454226 [error] [MainThread]:   Runtime Error in test unique_dim_localizacao_id_localizacao (models\gold\schema.yml)
  Catalog Error: Table with name dim_localizacao does not exist!
  Did you mean "silver.prudential_conglomerates_capital_information"?
  
  LINE 18: from "gold_warehouse"."main"."dim_localizacao"
                ^
[0m15:25:26.454226 [info ] [MainThread]: 
[0m15:25:26.454792 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\unique_dim_localizacao_id_localizacao.sql
[0m15:25:26.454792 [info ] [MainThread]: 
[0m15:25:26.455800 [error] [MainThread]: [31mFailure in test unique_dim_segmento_id_segmento (models\gold\schema.yml)[0m
[0m15:25:26.455800 [error] [MainThread]:   Runtime Error in test unique_dim_segmento_id_segmento (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "pg_catalog.pg_indexes"?
  
  LINE 18: from "gold_warehouse"."main"."dim_segmento"
                ^
[0m15:25:26.455800 [info ] [MainThread]: 
[0m15:25:26.455800 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\unique_dim_segmento_id_segmento.sql
[0m15:25:26.457357 [info ] [MainThread]: 
[0m15:25:26.457357 [error] [MainThread]: [31mFailure in test unique_dim_tempo_id_data (models\gold\schema.yml)[0m
[0m15:25:26.458365 [error] [MainThread]:   Runtime Error in test unique_dim_tempo_id_data (models\gold\schema.yml)
  Catalog Error: Table with name dim_tempo does not exist!
  Did you mean "main.duckdb_types"?
  
  LINE 18: from "gold_warehouse"."main"."dim_tempo"
                ^
[0m15:25:26.458365 [info ] [MainThread]: 
[0m15:25:26.458365 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\unique_dim_tempo_id_data.sql
[0m15:25:26.458365 [info ] [MainThread]: 
[0m15:25:26.459873 [info ] [MainThread]: Done. PASS=0 WARN=0 ERROR=61 SKIP=0 NO-OP=0 TOTAL=61
[0m15:25:26.460460 [debug] [MainThread]: Command `dbt test` failed at 15:25:26.460460 after 3.41 seconds
[0m15:25:26.461477 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A633FA8080>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A631E51AC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A632049C10>]}
[0m15:25:26.461477 [debug] [MainThread]: Flushing usage events
[0m15:25:27.055171 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:25:46.527318 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2B52B860>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2B3D0860>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2B3D21B0>]}


============================== 15:25:46.534396 | 1144487f-a50c-4881-8a62-40b45d1d877f ==============================
[0m15:25:46.534396 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:25:46.535398 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt run --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:25:46.817375 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2CEB4740>]}
[0m15:25:46.884257 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2AF17E00>]}
[0m15:25:46.887004 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:25:47.259255 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:25:47.413140 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m15:25:47.414065 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m15:25:47.414065 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m15:25:47.420171 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:25:47.459917 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2CFE90D0>]}
[0m15:25:47.596738 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:25:47.599550 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:25:47.645936 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2D61FC50>]}
[0m15:25:47.646961 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 33 sources, 590 macros
[0m15:25:47.646961 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2D654F50>]}
[0m15:25:47.650142 [info ] [MainThread]: 
[0m15:25:47.650142 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:25:47.651150 [info ] [MainThread]: 
[0m15:25:47.651697 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:25:47.658063 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:25:47.795625 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:25:47.796623 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:25:47.796623 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:25:47.919112 [debug] [ThreadPool]: SQL status: OK in 0.122 seconds
[0m15:25:47.920753 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:25:47.921822 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:25:47.922904 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:25:47.927686 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:25:47.928227 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:25:47.928227 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:25:47.929295 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:25:47.930367 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:25:47.930367 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:25:47.930905 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:25:47.931449 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:25:47.931449 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:25:47.932523 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:25:47.933589 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:25:47.933589 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:25:47.934122 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:25:47.934648 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:25:47.934648 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:25:47.937328 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:25:47.940852 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:25:47.941870 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:25:47.941870 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:25:47.942408 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:25:47.942921 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:25:47.942921 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:25:47.954194 [debug] [ThreadPool]: SQL status: OK in 0.011 seconds
[0m15:25:47.955208 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:25:47.956266 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:25:47.956266 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:25:47.957324 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2CE5BAD0>]}
[0m15:25:47.958415 [debug] [MainThread]: Using duckdb connection "master"
[0m15:25:47.958415 [debug] [MainThread]: On master: BEGIN
[0m15:25:47.958415 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:25:47.959922 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:25:47.959922 [debug] [MainThread]: On master: COMMIT
[0m15:25:47.960523 [debug] [MainThread]: Using duckdb connection "master"
[0m15:25:47.960523 [debug] [MainThread]: On master: COMMIT
[0m15:25:47.961048 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:25:47.961581 [debug] [MainThread]: On master: Close
[0m15:25:47.966408 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m15:25:47.966408 [info ] [Thread-1 (]: 1 of 26 START sql table model main.dim_atividade ............................... [RUN]
[0m15:25:47.967424 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_atividade'
[0m15:25:47.967932 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m15:25:47.972881 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m15:25:47.974489 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m15:25:47.998844 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m15:25:47.999926 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m15:25:47.999926 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m15:25:47.999926 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:25:48.001454 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.002058 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m15:25:48.002058 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m15:25:48.003630 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m15:25:48.003630 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.004213 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: ROLLBACK
[0m15:25:48.031097 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_atividade'
[0m15:25:48.031097 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m15:25:48.034097 [debug] [Thread-1 (]: Runtime Error in model dim_atividade (models\gold\dim_atividade.sql)
  Catalog Error: Table with name seed_dim_atividade does not exist!
  Did you mean "information_schema.schemata"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_atividade"
                ^
[0m15:25:48.038867 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2D009100>]}
[0m15:25:48.039946 [error] [Thread-1 (]: 1 of 26 ERROR creating sql table model main.dim_atividade ...................... [[31mERROR[0m in 0.07s]
[0m15:25:48.041022 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m15:25:48.042113 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m15:25:48.043246 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_atividade' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_atividade (models\gold\dim_atividade.sql)
  Catalog Error: Table with name seed_dim_atividade does not exist!
  Did you mean "information_schema.schemata"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_atividade"
                ^.
[0m15:25:48.043246 [info ] [Thread-1 (]: 2 of 26 START sql table model main.dim_classe_instituicao ...................... [RUN]
[0m15:25:48.044851 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m15:25:48.044851 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m15:25:48.048035 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m15:25:48.049551 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m15:25:48.051754 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m15:25:48.053403 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m15:25:48.053403 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m15:25:48.053914 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.054562 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.055164 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m15:25:48.055164 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m15:25:48.056677 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m15:25:48.057189 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.057189 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: ROLLBACK
[0m15:25:48.059789 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_classe_instituicao'
[0m15:25:48.060295 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m15:25:48.061886 [debug] [Thread-1 (]: Runtime Error in model dim_classe_instituicao (models\gold\dim_classe_instituicao.sql)
  Catalog Error: Table with name seed_dim_classe_instituicao does not exist!
  Did you mean "silver.individual_institutions_assets"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
                ^
[0m15:25:48.062573 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2DA66420>]}
[0m15:25:48.063109 [error] [Thread-1 (]: 2 of 26 ERROR creating sql table model main.dim_classe_instituicao ............. [[31mERROR[0m in 0.02s]
[0m15:25:48.063109 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m15:25:48.064650 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m15:25:48.065661 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_classe_instituicao' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_classe_instituicao (models\gold\dim_classe_instituicao.sql)
  Catalog Error: Table with name seed_dim_classe_instituicao does not exist!
  Did you mean "silver.individual_institutions_assets"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
                ^.
[0m15:25:48.064650 [info ] [Thread-1 (]: 3 of 26 START sql table model main.dim_consolidado ............................. [RUN]
[0m15:25:48.067048 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m15:25:48.067048 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m15:25:48.070643 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m15:25:48.071788 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m15:25:48.075027 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m15:25:48.076041 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m15:25:48.077042 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m15:25:48.077042 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.078047 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.078047 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m15:25:48.078047 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m15:25:48.079620 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m15:25:48.079620 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.079620 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: ROLLBACK
[0m15:25:48.081200 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_consolidado'
[0m15:25:48.082778 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m15:25:48.084422 [debug] [Thread-1 (]: Runtime Error in model dim_consolidado (models\gold\dim_consolidado.sql)
  Catalog Error: Table with name seed_dim_consolidado does not exist!
  Did you mean "main.sqlite_schema"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_consolidado"
                ^
[0m15:25:48.084422 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2DA8FA40>]}
[0m15:25:48.084422 [error] [Thread-1 (]: 3 of 26 ERROR creating sql table model main.dim_consolidado .................... [[31mERROR[0m in 0.02s]
[0m15:25:48.086041 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m15:25:48.086041 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m15:25:48.087049 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_consolidado' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_consolidado (models\gold\dim_consolidado.sql)
  Catalog Error: Table with name seed_dim_consolidado does not exist!
  Did you mean "main.sqlite_schema"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_consolidado"
                ^.
[0m15:25:48.087049 [info ] [Thread-1 (]: 4 of 26 START sql table model main.dim_controle ................................ [RUN]
[0m15:25:48.088111 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m15:25:48.088111 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m15:25:48.090118 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m15:25:48.091930 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m15:25:48.093453 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m15:25:48.095846 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m15:25:48.096854 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m15:25:48.096854 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.097827 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.097827 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m15:25:48.098335 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m15:25:48.099388 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m15:25:48.099388 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.099911 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: ROLLBACK
[0m15:25:48.102061 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_controle'
[0m15:25:48.102591 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m15:25:48.106392 [debug] [Thread-1 (]: Runtime Error in model dim_controle (models\gold\dim_controle.sql)
  Catalog Error: Table with name seed_dim_controle does not exist!
  Did you mean "information_schema.constraint_column_usage"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_controle"
                ^
[0m15:25:48.106910 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2DAA67E0>]}
[0m15:25:48.107472 [error] [Thread-1 (]: 4 of 26 ERROR creating sql table model main.dim_controle ....................... [[31mERROR[0m in 0.02s]
[0m15:25:48.107472 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m15:25:48.108488 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m15:25:48.109083 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_controle' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_controle (models\gold\dim_controle.sql)
  Catalog Error: Table with name seed_dim_controle does not exist!
  Did you mean "information_schema.constraint_column_usage"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_controle"
                ^.
[0m15:25:48.109601 [info ] [Thread-1 (]: 5 of 26 START sql table model main.dim_faixa_vencimento ........................ [RUN]
[0m15:25:48.110106 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m15:25:48.110106 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m15:25:48.112870 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m15:25:48.114883 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m15:25:48.117413 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m15:25:48.118932 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m15:25:48.118932 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m15:25:48.119494 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.120059 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:48.120059 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m15:25:48.120059 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m15:25:48.120059 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m15:25:48.121651 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.121651 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: ROLLBACK
[0m15:25:48.124202 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_faixa_vencimento'
[0m15:25:48.124875 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m15:25:48.126887 [debug] [Thread-1 (]: Runtime Error in model dim_faixa_vencimento (models\gold\dim_faixa_vencimento.sql)
  Catalog Error: Table with name seed_dim_faixa_vencimento does not exist!
  Did you mean "main.sqlite_temp_schema"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
                ^
[0m15:25:48.126887 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2DA740B0>]}
[0m15:25:48.127901 [error] [Thread-1 (]: 5 of 26 ERROR creating sql table model main.dim_faixa_vencimento ............... [[31mERROR[0m in 0.02s]
[0m15:25:48.127901 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m15:25:48.127901 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:25:48.129481 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_faixa_vencimento' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_faixa_vencimento (models\gold\dim_faixa_vencimento.sql)
  Catalog Error: Table with name seed_dim_faixa_vencimento does not exist!
  Did you mean "main.sqlite_temp_schema"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
                ^.
[0m15:25:48.129481 [info ] [Thread-1 (]: 6 of 26 START sql table model main.dim_instituicao ............................. [RUN]
[0m15:25:48.129481 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_instituicao)
[0m15:25:48.129481 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m15:25:48.134135 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:25:48.135716 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m15:25:48.137775 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:25:48.138784 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:25:48.138784 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m15:25:48.139780 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.140295 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.140295 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:25:48.140295 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT DISTINCT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
    );
  
  
[0m15:25:48.270229 [debug] [Thread-1 (]: SQL status: OK in 0.129 seconds
[0m15:25:48.275109 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:25:48.276096 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m15:25:48.277104 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.287971 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:25:48.288668 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:25:48.289178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:25:48.307335 [debug] [Thread-1 (]: SQL status: OK in 0.018 seconds
[0m15:25:48.312807 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:25:48.312807 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m15:25:48.313892 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.315552 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m15:25:48.316566 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2D12C050>]}
[0m15:25:48.317080 [info ] [Thread-1 (]: 6 of 26 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.19s]
[0m15:25:48.318102 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:25:48.318102 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m15:25:48.318102 [info ] [Thread-1 (]: 7 of 26 START sql table model main.dim_localizacao ............................. [RUN]
[0m15:25:48.319094 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m15:25:48.319094 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m15:25:48.322349 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:25:48.322865 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m15:25:48.325882 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:25:48.327309 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:25:48.327840 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m15:25:48.327840 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.328363 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.328363 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:25:48.328363 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m15:25:48.371189 [debug] [Thread-1 (]: SQL status: OK in 0.042 seconds
[0m15:25:48.375379 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:25:48.375962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m15:25:48.376965 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.378486 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m15:25:48.379492 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:25:48.379492 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m15:25:48.381065 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:25:48.382693 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:25:48.384298 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m15:25:48.384298 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:48.385880 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m15:25:48.385880 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2EAC2DB0>]}
[0m15:25:48.386897 [info ] [Thread-1 (]: 7 of 26 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.07s]
[0m15:25:48.386897 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m15:25:48.386897 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m15:25:48.388362 [info ] [Thread-1 (]: 8 of 26 START sql table model main.dim_porte ................................... [RUN]
[0m15:25:48.388930 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_porte)
[0m15:25:48.388930 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m15:25:48.391004 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m15:25:48.392003 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m15:25:48.395984 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m15:25:48.397049 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m15:25:48.397588 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m15:25:48.398129 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.398129 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:48.398668 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m15:25:48.398668 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m15:25:48.399767 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m15:25:48.400291 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.400291 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: ROLLBACK
[0m15:25:48.402498 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_porte'
[0m15:25:48.403057 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m15:25:48.404825 [debug] [Thread-1 (]: Runtime Error in model dim_porte (models\gold\dim_porte.sql)
  Catalog Error: Table with name seed_dim_porte does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_porte"
                ^
[0m15:25:48.405837 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2DA91EE0>]}
[0m15:25:48.405837 [error] [Thread-1 (]: 8 of 26 ERROR creating sql table model main.dim_porte .......................... [[31mERROR[0m in 0.02s]
[0m15:25:48.407431 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m15:25:48.407431 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m15:25:48.407431 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_porte' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_porte (models\gold\dim_porte.sql)
  Catalog Error: Table with name seed_dim_porte does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_porte"
                ^.
[0m15:25:48.408448 [info ] [Thread-1 (]: 9 of 26 START sql table model main.dim_produto_credito ......................... [RUN]
[0m15:25:48.408448 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m15:25:48.408448 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m15:25:48.412607 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m15:25:48.413647 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m15:25:48.416881 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m15:25:48.417959 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m15:25:48.417959 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m15:25:48.417959 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.419474 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.420018 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m15:25:48.420568 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m15:25:48.420568 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m15:25:48.421577 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.421577 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: ROLLBACK
[0m15:25:48.424148 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_produto_credito'
[0m15:25:48.425148 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m15:25:48.427153 [debug] [Thread-1 (]: Runtime Error in model dim_produto_credito (models\gold\dim_produto_credito.sql)
  Catalog Error: Table with name seed_dim_produto_credito does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_produto_credito"
                ^
[0m15:25:48.427153 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2DA99970>]}
[0m15:25:48.428151 [error] [Thread-1 (]: 9 of 26 ERROR creating sql table model main.dim_produto_credito ................ [[31mERROR[0m in 0.02s]
[0m15:25:48.428151 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m15:25:48.428151 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m15:25:48.428151 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_produto_credito' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_produto_credito (models\gold\dim_produto_credito.sql)
  Catalog Error: Table with name seed_dim_produto_credito does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_produto_credito"
                ^.
[0m15:25:48.429774 [info ] [Thread-1 (]: 10 of 26 START sql table model main.dim_regiao ................................. [RUN]
[0m15:25:48.429774 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m15:25:48.429774 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m15:25:48.432891 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m15:25:48.433905 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m15:25:48.438091 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m15:25:48.439809 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m15:25:48.440354 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m15:25:48.440890 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.441449 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.442000 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m15:25:48.442000 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m15:25:48.443076 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m15:25:48.443076 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.443657 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: ROLLBACK
[0m15:25:48.445303 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_regiao'
[0m15:25:48.445303 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m15:25:48.448434 [debug] [Thread-1 (]: Runtime Error in model dim_regiao (models\gold\dim_regiao.sql)
  Catalog Error: Table with name seed_dim_regiao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_regiao"
                ^
[0m15:25:48.448434 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2EAE1FD0>]}
[0m15:25:48.449437 [error] [Thread-1 (]: 10 of 26 ERROR creating sql table model main.dim_regiao ........................ [[31mERROR[0m in 0.02s]
[0m15:25:48.449437 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m15:25:48.449437 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m15:25:48.449437 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_regiao' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_regiao (models\gold\dim_regiao.sql)
  Catalog Error: Table with name seed_dim_regiao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_regiao"
                ^.
[0m15:25:48.449437 [info ] [Thread-1 (]: 11 of 26 START sql table model main.dim_risco .................................. [RUN]
[0m15:25:48.451913 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m15:25:48.451913 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m15:25:48.454226 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m15:25:48.454796 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m15:25:48.458601 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m15:25:48.460108 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m15:25:48.460108 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m15:25:48.461724 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.462254 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.462802 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m15:25:48.462802 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m15:25:48.463879 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m15:25:48.464416 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.464416 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: ROLLBACK
[0m15:25:48.467626 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_risco'
[0m15:25:48.468138 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m15:25:48.470408 [debug] [Thread-1 (]: Runtime Error in model dim_risco (models\gold\dim_risco.sql)
  Catalog Error: Table with name seed_dim_risco does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_risco"
                ^
[0m15:25:48.471426 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2EAE0C80>]}
[0m15:25:48.472449 [error] [Thread-1 (]: 11 of 26 ERROR creating sql table model main.dim_risco ......................... [[31mERROR[0m in 0.02s]
[0m15:25:48.473011 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m15:25:48.473011 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m15:25:48.474021 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_risco' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_risco (models\gold\dim_risco.sql)
  Catalog Error: Table with name seed_dim_risco does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_risco"
                ^.
[0m15:25:48.475022 [info ] [Thread-1 (]: 12 of 26 START sql table model main.dim_segmento ............................... [RUN]
[0m15:25:48.475022 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m15:25:48.476021 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m15:25:48.478023 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m15:25:48.479696 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m15:25:48.481904 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m15:25:48.483254 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m15:25:48.483254 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m15:25:48.484279 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.484788 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.484788 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m15:25:48.484788 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m15:25:48.485846 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m15:25:48.485846 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.486861 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: ROLLBACK
[0m15:25:48.489791 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_segmento'
[0m15:25:48.489791 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m15:25:48.492381 [debug] [Thread-1 (]: Runtime Error in model dim_segmento (models\gold\dim_segmento.sql)
  Catalog Error: Table with name seed_dim_segmento does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_segmento"
                ^
[0m15:25:48.492381 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2DA92330>]}
[0m15:25:48.493040 [error] [Thread-1 (]: 12 of 26 ERROR creating sql table model main.dim_segmento ...................... [[31mERROR[0m in 0.02s]
[0m15:25:48.493040 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m15:25:48.493040 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m15:25:48.494769 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_segmento' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_segmento (models\gold\dim_segmento.sql)
  Catalog Error: Table with name seed_dim_segmento does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_segmento"
                ^.
[0m15:25:48.494769 [info ] [Thread-1 (]: 13 of 26 START sql table model main.dim_tempo .................................. [RUN]
[0m15:25:48.495782 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now model.bacen_ifdata_analytics.dim_tempo)
[0m15:25:48.495782 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m15:25:48.499510 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m15:25:48.500527 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m15:25:48.503383 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m15:25:48.504671 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m15:25:48.504671 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m15:25:48.504671 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.506277 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.506868 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m15:25:48.506868 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m15:25:48.521458 [debug] [Thread-1 (]: SQL status: OK in 0.014 seconds
[0m15:25:48.525520 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m15:25:48.526530 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m15:25:48.528037 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.529763 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m15:25:48.529763 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m15:25:48.529763 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m15:25:48.531369 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.532387 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m15:25:48.533969 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m15:25:48.533969 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:48.534991 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m15:25:48.535985 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2EAAE0C0>]}
[0m15:25:48.536500 [info ] [Thread-1 (]: 13 of 26 OK created sql table model main.dim_tempo ............................. [[32mOK[0m in 0.04s]
[0m15:25:48.537005 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m15:25:48.537005 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:25:48.538021 [info ] [Thread-1 (]: 14 of 26 START sql table model main.fato_balanco_patrimonial ................... [RUN]
[0m15:25:48.538021 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m15:25:48.538021 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:25:48.543161 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:25:48.544173 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:25:48.548432 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:25:48.550039 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:25:48.550569 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m15:25:48.551106 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.552171 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.552171 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:25:48.552707 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.resultado_exercicios_futuros,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.resultado_exercicios_futuros,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.resultado_exercicios_futuros,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes_totais as captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    resultado_exercicios_futuros,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:25:48.554916 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.resultado_exercicios_futuros,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.resultado_exercicios_futuros,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.resultado_exercicios_futuros,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes_totais as captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    resultado_exercicios_futuros,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:25:48.555937 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.556451 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: ROLLBACK
[0m15:25:48.558562 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_balanco_patrimonial'
[0m15:25:48.559166 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m15:25:48.560697 [debug] [Thread-1 (]: Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Binder Error: Table "l" does not have a column named "depositos"
  
  Candidate bindings: : "depositos_vista", "depositos_outros", "depositos_a_prazo", "depositos_poupanca", "depositos_interfinanceiros"
  
  LINE 35:         l.depositos,
                   ^
[0m15:25:48.561705 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2EAEC800>]}
[0m15:25:48.561705 [error] [Thread-1 (]: 14 of 26 ERROR creating sql table model main.fato_balanco_patrimonial .......... [[31mERROR[0m in 0.02s]
[0m15:25:48.562715 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:25:48.562715 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m15:25:48.562715 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_balanco_patrimonial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Binder Error: Table "l" does not have a column named "depositos"
  
  Candidate bindings: : "depositos_vista", "depositos_outros", "depositos_a_prazo", "depositos_poupanca", "depositos_interfinanceiros"
  
  LINE 35:         l.depositos,
                   ^.
[0m15:25:48.563872 [info ] [Thread-1 (]: 15 of 26 START sql table model main.fato_capital_prudencial .................... [RUN]
[0m15:25:48.563872 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m15:25:48.564862 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m15:25:48.567534 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m15:25:48.569326 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m15:25:48.573571 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m15:25:48.575319 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m15:25:48.575857 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m15:25:48.575857 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.576876 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.576876 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m15:25:48.576876 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m15:25:48.579911 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m15:25:48.579911 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.579911 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: ROLLBACK
[0m15:25:48.582488 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_capital_prudencial'
[0m15:25:48.582488 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m15:25:48.585079 [debug] [Thread-1 (]: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m15:25:48.586077 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2DA9CAA0>]}
[0m15:25:48.586583 [error] [Thread-1 (]: 15 of 26 ERROR creating sql table model main.fato_capital_prudencial ........... [[31mERROR[0m in 0.02s]
[0m15:25:48.587091 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m15:25:48.587091 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m15:25:48.588104 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_capital_prudencial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^.
[0m15:25:48.588104 [info ] [Thread-1 (]: 16 of 26 START sql table model main.fato_carteira_credito_indexador ............ [RUN]
[0m15:25:48.589108 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m15:25:48.589108 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m15:25:48.591965 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m15:25:48.593010 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m15:25:48.597320 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m15:25:48.598329 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m15:25:48.599338 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m15:25:48.600014 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.600534 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.601065 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m15:25:48.601065 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."prudential_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m15:25:48.602669 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."prudential_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m15:25:48.603203 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.603750 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: ROLLBACK
[0m15:25:48.606414 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador'
[0m15:25:48.606414 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m15:25:48.608578 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Catalog Error: Table with name prudential_conglomerates_portfolio_indexer does not exist!
  Did you mean "prudential_conglomerates_capital_information"?
  
  LINE 40: FROM "silver"."main"."prudential_conglomerates_portfolio_indexer...
                ^
[0m15:25:48.608578 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2DA92E40>]}
[0m15:25:48.608578 [error] [Thread-1 (]: 16 of 26 ERROR creating sql table model main.fato_carteira_credito_indexador ... [[31mERROR[0m in 0.02s]
[0m15:25:48.610087 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m15:25:48.610963 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m15:25:48.610963 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Catalog Error: Table with name prudential_conglomerates_portfolio_indexer does not exist!
  Did you mean "prudential_conglomerates_capital_information"?
  
  LINE 40: FROM "silver"."main"."prudential_conglomerates_portfolio_indexer...
                ^.
[0m15:25:48.611972 [info ] [Thread-1 (]: 17 of 26 START sql table model main.fato_carteira_credito_totais ............... [RUN]
[0m15:25:48.612616 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m15:25:48.612616 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m15:25:48.615142 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m15:25:48.617327 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m15:25:48.619508 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m15:25:48.621126 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m15:25:48.621637 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m15:25:48.621637 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.621637 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:48.622647 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m15:25:48.622647 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m15:25:48.625231 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m15:25:48.625231 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.625231 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: ROLLBACK
[0m15:25:48.628195 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_totais'
[0m15:25:48.628538 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m15:25:48.630618 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m15:25:48.631152 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2EB17C50>]}
[0m15:25:48.631697 [error] [Thread-1 (]: 17 of 26 ERROR creating sql table model main.fato_carteira_credito_totais ...... [[31mERROR[0m in 0.02s]
[0m15:25:48.632239 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m15:25:48.632784 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m15:25:48.633314 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_totais' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^.
[0m15:25:48.633841 [info ] [Thread-1 (]: 18 of 26 START sql table model main.fato_demonstracao_resultado ................ [RUN]
[0m15:25:48.634353 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m15:25:48.634913 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m15:25:48.638486 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m15:25:48.639994 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m15:25:48.644631 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m15:25:48.645643 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m15:25:48.646640 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m15:25:48.646640 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.647209 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.647209 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m15:25:48.648215 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m15:25:48.650464 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m15:25:48.650968 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.650968 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: ROLLBACK
[0m15:25:48.653837 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_demonstracao_resultado'
[0m15:25:48.654407 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m15:25:48.656006 [debug] [Thread-1 (]: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m15:25:48.657076 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2EAEBC20>]}
[0m15:25:48.657660 [error] [Thread-1 (]: 18 of 26 ERROR creating sql table model main.fato_demonstracao_resultado ....... [[31mERROR[0m in 0.02s]
[0m15:25:48.658671 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m15:25:48.658671 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m15:25:48.658671 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_demonstracao_resultado' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT".
[0m15:25:48.658671 [info ] [Thread-1 (]: 19 of 26 START sql table model main.fato_movimentacao_cambio ................... [RUN]
[0m15:25:48.660180 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m15:25:48.661880 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m15:25:48.665971 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:25:48.669013 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m15:25:48.676066 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:25:48.678079 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:25:48.678588 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m15:25:48.678588 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.679599 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:25:48.679599 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:25:48.679599 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m15:25:48.687601 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m15:25:48.688623 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:25:48.690131 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m15:25:48.690131 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:48.691139 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m15:25:48.691139 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:25:48.692156 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m15:25:48.696929 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m15:25:48.698748 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:25:48.699269 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m15:25:48.699801 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:48.700996 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m15:25:48.701537 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2DAA1E20>]}
[0m15:25:48.702084 [info ] [Thread-1 (]: 19 of 26 OK created sql table model main.fato_movimentacao_cambio .............. [[32mOK[0m in 0.04s]
[0m15:25:48.702624 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m15:25:48.703172 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:25:48.703722 [info ] [Thread-1 (]: 20 of 26 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m15:25:48.704261 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m15:25:48.704261 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:25:48.707438 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:25:48.708450 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:25:48.713161 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:25:48.714679 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:25:48.715252 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m15:25:48.715252 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.715252 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:48.716259 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:25:48.716259 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."prudential_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m15:25:48.717309 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."prudential_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m15:25:48.717309 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.717309 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: ROLLBACK
[0m15:25:48.720077 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_operacoes_clientes'
[0m15:25:48.720077 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m15:25:48.721651 [debug] [Thread-1 (]: Runtime Error in model fato_operacoes_clientes (models\gold\fato_operacoes_clientes.sql)
  Catalog Error: Table with name prudential_conglomerates_portfolio_number_clients_operations does not exist!
  Did you mean "prudential_conglomerates_income_statement"?
  
  LINE 19:     FROM "silver"."main"."prudential_conglomerates_portfolio_number_...
                    ^
[0m15:25:48.722659 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2EAEC410>]}
[0m15:25:48.723165 [error] [Thread-1 (]: 20 of 26 ERROR creating sql table model main.fato_operacoes_clientes ........... [[31mERROR[0m in 0.02s]
[0m15:25:48.723165 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:25:48.723165 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:25:48.724175 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_operacoes_clientes' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_operacoes_clientes (models\gold\fato_operacoes_clientes.sql)
  Catalog Error: Table with name prudential_conglomerates_portfolio_number_clients_operations does not exist!
  Did you mean "prudential_conglomerates_income_statement"?
  
  LINE 19:     FROM "silver"."main"."prudential_conglomerates_portfolio_number_...
                    ^.
[0m15:25:48.724175 [info ] [Thread-1 (]: 21 of 26 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m15:25:48.725175 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m15:25:48.725175 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:25:48.729331 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:25:48.730907 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:25:48.733616 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:25:48.734152 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:25:48.734152 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m15:25:48.734152 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:25:48.735742 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:25:48.735742 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:25:48.735742 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_credito_classificada as carteira_credito,
        passivo_circulante_exigivel_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        quantidade_agencias,
        quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_credito_classificada as carteira_credito,
        passivo_circulante_exigivel_longo_prazo as passivo_exigivel,
        captacoes_totais as captacoes,
        patrimonio_liquido,
        lucro_liquido,
        quantidade_agencias,
        quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(cast(d.codigo as bigint) as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido

FROM dados_brutos d
    );
  
  
[0m15:25:48.737785 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_credito_classificada as carteira_credito,
        passivo_circulante_exigivel_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        quantidade_agencias,
        quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_credito_classificada as carteira_credito,
        passivo_circulante_exigivel_longo_prazo as passivo_exigivel,
        captacoes_totais as captacoes,
        patrimonio_liquido,
        lucro_liquido,
        quantidade_agencias,
        quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(cast(d.codigo as bigint) as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido

FROM dados_brutos d
    );
  
  
[0m15:25:48.737785 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:25:48.737785 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: ROLLBACK
[0m15:25:48.740375 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_resumo_financeiro'
[0m15:25:48.740375 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m15:25:48.742917 [debug] [Thread-1 (]: Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Binder Error: Referenced column "carteira_credito_classificada" not found in FROM clause!
  Candidate bindings: "carteira_de_credito_classificada", "captacoes", "ativo_total", "tipo_de_consolidacao", "data_base"
  
  LINE 25:         carteira_credito_classificada as carteira_credito,
                   ^
[0m15:25:48.743424 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '1144487f-a50c-4881-8a62-40b45d1d877f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2EB45220>]}
[0m15:25:48.743424 [error] [Thread-1 (]: 21 of 26 ERROR creating sql table model main.fato_resumo_financeiro ............ [[31mERROR[0m in 0.02s]
[0m15:25:48.744431 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:25:48.744431 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m15:25:48.745494 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_resumo_financeiro' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Binder Error: Referenced column "carteira_credito_classificada" not found in FROM clause!
  Candidate bindings: "carteira_de_credito_classificada", "captacoes", "ativo_total", "tipo_de_consolidacao", "data_base"
  
  LINE 25:         carteira_credito_classificada as carteira_credito,
                   ^.
[0m15:25:48.745494 [info ] [Thread-1 (]: 22 of 26 SKIP relation main.fato_carteira_credito_atividade .................... [[33mSKIP[0m]
[0m15:25:48.745494 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m15:25:48.747005 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m15:25:48.747005 [info ] [Thread-1 (]: 23 of 26 SKIP relation main.fato_carteira_credito_porte ........................ [[33mSKIP[0m]
[0m15:25:48.747005 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m15:25:48.748022 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m15:25:48.748022 [info ] [Thread-1 (]: 24 of 26 SKIP relation main.fato_carteira_credito_produto ...................... [[33mSKIP[0m]
[0m15:25:48.748022 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m15:25:48.748022 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m15:25:48.749531 [info ] [Thread-1 (]: 25 of 26 SKIP relation main.fato_regiao_credito ................................ [[33mSKIP[0m]
[0m15:25:48.749531 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m15:25:48.749531 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m15:25:48.749531 [info ] [Thread-1 (]: 26 of 26 SKIP relation main.fato_risco_credito ................................. [[33mSKIP[0m]
[0m15:25:48.751095 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m15:25:48.752242 [debug] [MainThread]: Using duckdb connection "master"
[0m15:25:48.752242 [debug] [MainThread]: On master: BEGIN
[0m15:25:48.752242 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:25:48.753272 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:25:48.753272 [debug] [MainThread]: On master: COMMIT
[0m15:25:48.753272 [debug] [MainThread]: Using duckdb connection "master"
[0m15:25:48.753866 [debug] [MainThread]: On master: COMMIT
[0m15:25:48.753866 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:25:48.754425 [debug] [MainThread]: On master: Close
[0m15:25:48.754425 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:25:48.754985 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:25:48.754985 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:25:48.754985 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_resumo_financeiro' was properly closed.
[0m15:25:48.754985 [info ] [MainThread]: 
[0m15:25:48.756004 [info ] [MainThread]: Finished running 26 table models in 0 hours 0 minutes and 1.10 seconds (1.10s).
[0m15:25:48.759011 [debug] [MainThread]: Command end result
[0m15:25:48.792330 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:25:48.795502 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:25:48.801809 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:25:48.801809 [info ] [MainThread]: 
[0m15:25:48.802392 [info ] [MainThread]: [31mCompleted with 17 errors, 0 partial successes, and 0 warnings:[0m
[0m15:25:48.802392 [info ] [MainThread]: 
[0m15:25:48.803401 [error] [MainThread]: [31mFailure in model dim_atividade (models\gold\dim_atividade.sql)[0m
[0m15:25:48.803982 [error] [MainThread]:   Runtime Error in model dim_atividade (models\gold\dim_atividade.sql)
  Catalog Error: Table with name seed_dim_atividade does not exist!
  Did you mean "information_schema.schemata"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_atividade"
                ^
[0m15:25:48.804540 [info ] [MainThread]: 
[0m15:25:48.805120 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_atividade.sql
[0m15:25:48.805655 [info ] [MainThread]: 
[0m15:25:48.806171 [error] [MainThread]: [31mFailure in model dim_classe_instituicao (models\gold\dim_classe_instituicao.sql)[0m
[0m15:25:48.806171 [error] [MainThread]:   Runtime Error in model dim_classe_instituicao (models\gold\dim_classe_instituicao.sql)
  Catalog Error: Table with name seed_dim_classe_instituicao does not exist!
  Did you mean "silver.individual_institutions_assets"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
                ^
[0m15:25:48.806171 [info ] [MainThread]: 
[0m15:25:48.807179 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_classe_instituicao.sql
[0m15:25:48.807687 [info ] [MainThread]: 
[0m15:25:48.807687 [error] [MainThread]: [31mFailure in model dim_consolidado (models\gold\dim_consolidado.sql)[0m
[0m15:25:48.807687 [error] [MainThread]:   Runtime Error in model dim_consolidado (models\gold\dim_consolidado.sql)
  Catalog Error: Table with name seed_dim_consolidado does not exist!
  Did you mean "main.sqlite_schema"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_consolidado"
                ^
[0m15:25:48.808695 [info ] [MainThread]: 
[0m15:25:48.808695 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_consolidado.sql
[0m15:25:48.808695 [info ] [MainThread]: 
[0m15:25:48.808695 [error] [MainThread]: [31mFailure in model dim_controle (models\gold\dim_controle.sql)[0m
[0m15:25:48.810209 [error] [MainThread]:   Runtime Error in model dim_controle (models\gold\dim_controle.sql)
  Catalog Error: Table with name seed_dim_controle does not exist!
  Did you mean "information_schema.constraint_column_usage"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_controle"
                ^
[0m15:25:48.810209 [info ] [MainThread]: 
[0m15:25:48.810209 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_controle.sql
[0m15:25:48.811826 [info ] [MainThread]: 
[0m15:25:48.811826 [error] [MainThread]: [31mFailure in model dim_faixa_vencimento (models\gold\dim_faixa_vencimento.sql)[0m
[0m15:25:48.812837 [error] [MainThread]:   Runtime Error in model dim_faixa_vencimento (models\gold\dim_faixa_vencimento.sql)
  Catalog Error: Table with name seed_dim_faixa_vencimento does not exist!
  Did you mean "main.sqlite_temp_schema"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
                ^
[0m15:25:48.812837 [info ] [MainThread]: 
[0m15:25:48.812837 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_faixa_vencimento.sql
[0m15:25:48.814313 [info ] [MainThread]: 
[0m15:25:48.814819 [error] [MainThread]: [31mFailure in model dim_porte (models\gold\dim_porte.sql)[0m
[0m15:25:48.815391 [error] [MainThread]:   Runtime Error in model dim_porte (models\gold\dim_porte.sql)
  Catalog Error: Table with name seed_dim_porte does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_porte"
                ^
[0m15:25:48.815391 [info ] [MainThread]: 
[0m15:25:48.815391 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_porte.sql
[0m15:25:48.815391 [info ] [MainThread]: 
[0m15:25:48.816398 [error] [MainThread]: [31mFailure in model dim_produto_credito (models\gold\dim_produto_credito.sql)[0m
[0m15:25:48.816398 [error] [MainThread]:   Runtime Error in model dim_produto_credito (models\gold\dim_produto_credito.sql)
  Catalog Error: Table with name seed_dim_produto_credito does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_produto_credito"
                ^
[0m15:25:48.817435 [info ] [MainThread]: 
[0m15:25:48.817435 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_produto_credito.sql
[0m15:25:48.817435 [info ] [MainThread]: 
[0m15:25:48.817435 [error] [MainThread]: [31mFailure in model dim_regiao (models\gold\dim_regiao.sql)[0m
[0m15:25:48.819270 [error] [MainThread]:   Runtime Error in model dim_regiao (models\gold\dim_regiao.sql)
  Catalog Error: Table with name seed_dim_regiao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_regiao"
                ^
[0m15:25:48.820280 [info ] [MainThread]: 
[0m15:25:48.820789 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_regiao.sql
[0m15:25:48.821799 [info ] [MainThread]: 
[0m15:25:48.822305 [error] [MainThread]: [31mFailure in model dim_risco (models\gold\dim_risco.sql)[0m
[0m15:25:48.822305 [error] [MainThread]:   Runtime Error in model dim_risco (models\gold\dim_risco.sql)
  Catalog Error: Table with name seed_dim_risco does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_risco"
                ^
[0m15:25:48.822836 [info ] [MainThread]: 
[0m15:25:48.823895 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_risco.sql
[0m15:25:48.824422 [info ] [MainThread]: 
[0m15:25:48.824422 [error] [MainThread]: [31mFailure in model dim_segmento (models\gold\dim_segmento.sql)[0m
[0m15:25:48.824962 [error] [MainThread]:   Runtime Error in model dim_segmento (models\gold\dim_segmento.sql)
  Catalog Error: Table with name seed_dim_segmento does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_segmento"
                ^
[0m15:25:48.825492 [info ] [MainThread]: 
[0m15:25:48.826020 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_segmento.sql
[0m15:25:48.826549 [info ] [MainThread]: 
[0m15:25:48.826549 [error] [MainThread]: [31mFailure in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)[0m
[0m15:25:48.827557 [error] [MainThread]:   Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Binder Error: Table "l" does not have a column named "depositos"
  
  Candidate bindings: : "depositos_vista", "depositos_outros", "depositos_a_prazo", "depositos_poupanca", "depositos_interfinanceiros"
  
  LINE 35:         l.depositos,
                   ^
[0m15:25:48.827557 [info ] [MainThread]: 
[0m15:25:48.828560 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_balanco_patrimonial.sql
[0m15:25:48.828560 [info ] [MainThread]: 
[0m15:25:48.828560 [error] [MainThread]: [31mFailure in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)[0m
[0m15:25:48.828560 [error] [MainThread]:   Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m15:25:48.829944 [info ] [MainThread]: 
[0m15:25:48.829944 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_capital_prudencial.sql
[0m15:25:48.830951 [info ] [MainThread]: 
[0m15:25:48.831511 [error] [MainThread]: [31mFailure in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)[0m
[0m15:25:48.831511 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Catalog Error: Table with name prudential_conglomerates_portfolio_indexer does not exist!
  Did you mean "prudential_conglomerates_capital_information"?
  
  LINE 40: FROM "silver"."main"."prudential_conglomerates_portfolio_indexer...
                ^
[0m15:25:48.831511 [info ] [MainThread]: 
[0m15:25:48.832521 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_indexador.sql
[0m15:25:48.832521 [info ] [MainThread]: 
[0m15:25:48.832521 [error] [MainThread]: [31mFailure in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)[0m
[0m15:25:48.834376 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m15:25:48.834376 [info ] [MainThread]: 
[0m15:25:48.834376 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_totais.sql
[0m15:25:48.835953 [info ] [MainThread]: 
[0m15:25:48.836643 [error] [MainThread]: [31mFailure in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)[0m
[0m15:25:48.837161 [error] [MainThread]:   Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m15:25:48.837683 [info ] [MainThread]: 
[0m15:25:48.837683 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_demonstracao_resultado.sql
[0m15:25:48.838691 [info ] [MainThread]: 
[0m15:25:48.838691 [error] [MainThread]: [31mFailure in model fato_operacoes_clientes (models\gold\fato_operacoes_clientes.sql)[0m
[0m15:25:48.838691 [error] [MainThread]:   Runtime Error in model fato_operacoes_clientes (models\gold\fato_operacoes_clientes.sql)
  Catalog Error: Table with name prudential_conglomerates_portfolio_number_clients_operations does not exist!
  Did you mean "prudential_conglomerates_income_statement"?
  
  LINE 19:     FROM "silver"."main"."prudential_conglomerates_portfolio_number_...
                    ^
[0m15:25:48.838691 [info ] [MainThread]: 
[0m15:25:48.840196 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_operacoes_clientes.sql
[0m15:25:48.840196 [info ] [MainThread]: 
[0m15:25:48.840196 [error] [MainThread]: [31mFailure in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)[0m
[0m15:25:48.841206 [error] [MainThread]:   Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Binder Error: Referenced column "carteira_credito_classificada" not found in FROM clause!
  Candidate bindings: "carteira_de_credito_classificada", "captacoes", "ativo_total", "tipo_de_consolidacao", "data_base"
  
  LINE 25:         carteira_credito_classificada as carteira_credito,
                   ^
[0m15:25:48.841206 [info ] [MainThread]: 
[0m15:25:48.842208 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_resumo_financeiro.sql
[0m15:25:48.842715 [info ] [MainThread]: 
[0m15:25:48.842715 [info ] [MainThread]: Done. PASS=4 WARN=0 ERROR=17 SKIP=5 NO-OP=0 TOTAL=26
[0m15:25:48.844276 [debug] [MainThread]: Command `dbt run` failed at 15:25:48.844276 after 2.60 seconds
[0m15:25:48.844836 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2B2D8A40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2A6011F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020B2AE82090>]}
[0m15:25:48.844836 [debug] [MainThread]: Flushing usage events
[0m15:25:49.609784 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:26:09.583891 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696B76F920>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696B57E2D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696B57E240>]}


============================== 15:26:09.588729 | 7eceed94-10c8-499d-a6fe-55c08f31113a ==============================
[0m15:26:09.588729 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:26:09.588729 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'None', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt seed --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:26:09.815596 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696CE99340>]}
[0m15:26:09.877507 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696ACC3800>]}
[0m15:26:09.879723 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:26:10.141955 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:26:10.290612 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m15:26:10.290612 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m15:26:10.292131 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m15:26:10.297431 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:26:10.338337 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696CFA8B30>]}
[0m15:26:10.420736 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:26:10.422761 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:26:10.459718 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696D446030>]}
[0m15:26:10.460253 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 33 sources, 590 macros
[0m15:26:10.460801 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696D4B4E90>]}
[0m15:26:10.463477 [info ] [MainThread]: 
[0m15:26:10.463477 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:26:10.463477 [info ] [MainThread]: 
[0m15:26:10.465073 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:26:10.467795 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:26:10.595132 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:26:10.595132 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:26:10.595132 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:26:10.707339 [debug] [ThreadPool]: SQL status: OK in 0.111 seconds
[0m15:26:10.708648 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:26:10.708648 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:26:10.708648 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:26:10.717434 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:26:10.717434 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:26:10.717962 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:26:10.719024 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:26:10.720128 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:26:10.720128 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:26:10.720687 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:26:10.720687 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:26:10.721253 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:26:10.721253 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:26:10.721795 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:26:10.721795 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:26:10.721795 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:26:10.722824 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:26:10.722824 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:26:10.724874 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:26:10.728430 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:26:10.729438 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:26:10.729438 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:26:10.729438 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:26:10.729438 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:26:10.729438 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:26:10.741233 [debug] [ThreadPool]: SQL status: OK in 0.010 seconds
[0m15:26:10.773126 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:26:10.774722 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:26:10.774722 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:26:10.775791 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696D491730>]}
[0m15:26:10.776336 [debug] [MainThread]: Using duckdb connection "master"
[0m15:26:10.776336 [debug] [MainThread]: On master: BEGIN
[0m15:26:10.776336 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:26:10.776336 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:26:10.776336 [debug] [MainThread]: On master: COMMIT
[0m15:26:10.776336 [debug] [MainThread]: Using duckdb connection "master"
[0m15:26:10.776336 [debug] [MainThread]: On master: COMMIT
[0m15:26:10.777893 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:26:10.777893 [debug] [MainThread]: On master: Close
[0m15:26:10.781132 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:26:10.781132 [info ] [Thread-1 (]: 1 of 10 START seed file main.seed_dim_atividade ................................ [RUN]
[0m15:26:10.781132 [debug] [Thread-1 (]: Acquiring new duckdb connection 'seed.bacen_ifdata_analytics.seed_dim_atividade'
[0m15:26:10.782760 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:26:10.782760 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:26:10.804735 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:26:10.805815 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m15:26:10.805815 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:26:10.806888 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:26:10.806888 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:26:10.807445 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m15:26:10.807445 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:26:10.815483 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:26:10.815483 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:26:10.826491 [debug] [Thread-1 (]: SQL status: OK in 0.010 seconds
[0m15:26:10.830271 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:26:10.843190 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m15:26:10.843733 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:26:10.844295 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m15:26:10.845437 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:26:10.847593 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m15:26:10.849176 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696CEBE930>]}
[0m15:26:10.850194 [info ] [Thread-1 (]: 1 of 10 OK loaded seed file main.seed_dim_atividade ............................ [[32mINSERT 10[0m in 0.07s]
[0m15:26:10.850194 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:26:10.850194 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:26:10.851229 [info ] [Thread-1 (]: 2 of 10 START seed file main.seed_dim_classe_instituicao ....................... [RUN]
[0m15:26:10.851738 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m15:26:10.852363 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:26:10.852363 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:26:10.922506 [debug] [Thread-1 (]: Compilation Error in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
  Row 12 has 3 values, but Table only has 2 columns.
  
  > in macro materialization_seed_default (macros\materializations\seeds\seed.sql)
  > called by seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
[0m15:26:10.923010 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696D752780>]}
[0m15:26:10.923010 [error] [Thread-1 (]: 2 of 10 ERROR loading seed file main.seed_dim_classe_instituicao ............... [[31mERROR[0m in 0.07s]
[0m15:26:10.924017 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:26:10.925017 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:26:10.925017 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_classe_instituicao' to be skipped because of status 'error'.  Reason: Compilation Error in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
  Row 12 has 3 values, but Table only has 2 columns.
  
  > in macro materialization_seed_default (macros\materializations\seeds\seed.sql)
  > called by seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv).
[0m15:26:10.926017 [info ] [Thread-1 (]: 3 of 10 START seed file main.seed_dim_consolidado .............................. [RUN]
[0m15:26:10.927017 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m15:26:10.927017 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:26:10.928017 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:26:10.931158 [debug] [Thread-1 (]: Compilation Error in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
  Row 0 has 3 values, but Table only has 2 columns.
  
  > in macro materialization_seed_default (macros\materializations\seeds\seed.sql)
  > called by seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
[0m15:26:10.932724 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696D841190>]}
[0m15:26:10.932724 [error] [Thread-1 (]: 3 of 10 ERROR loading seed file main.seed_dim_consolidado ...................... [[31mERROR[0m in 0.01s]
[0m15:26:10.932724 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:26:10.934304 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:26:10.934304 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_consolidado' to be skipped because of status 'error'.  Reason: Compilation Error in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
  Row 0 has 3 values, but Table only has 2 columns.
  
  > in macro materialization_seed_default (macros\materializations\seeds\seed.sql)
  > called by seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv).
[0m15:26:10.934304 [info ] [Thread-1 (]: 4 of 10 START seed file main.seed_dim_controle ................................. [RUN]
[0m15:26:10.936082 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m15:26:10.936082 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:26:10.937093 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:26:10.940157 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:26:10.940157 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m15:26:10.940157 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:26:10.941206 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:26:10.941206 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:26:10.942207 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m15:26:10.942711 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:26:10.944822 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:26:10.944822 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:26:10.947334 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:26:10.948341 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:26:10.949341 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m15:26:10.950957 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:26:10.950957 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m15:26:10.953004 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:26:10.953529 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m15:26:10.954099 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696D8AA8A0>]}
[0m15:26:10.954659 [info ] [Thread-1 (]: 4 of 10 OK loaded seed file main.seed_dim_controle ............................. [[32mINSERT 3[0m in 0.02s]
[0m15:26:10.955253 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:26:10.955253 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:26:10.956260 [info ] [Thread-1 (]: 5 of 10 START seed file main.seed_dim_faixa_vencimento ......................... [RUN]
[0m15:26:10.956260 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m15:26:10.956260 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:26:10.957388 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:26:10.960491 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:26:10.960491 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m15:26:10.960491 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:26:10.961499 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:26:10.961499 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:26:10.961499 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m15:26:10.962601 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:26:10.962601 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:26:10.964119 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:26:10.965643 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:26:10.966821 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:26:10.969358 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m15:26:10.969358 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:26:10.969358 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m15:26:10.971763 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:26:10.972774 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m15:26:10.974200 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696D8CF410>]}
[0m15:26:10.975200 [info ] [Thread-1 (]: 5 of 10 OK loaded seed file main.seed_dim_faixa_vencimento ..................... [[32mINSERT 7[0m in 0.02s]
[0m15:26:10.976202 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:26:10.977201 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:26:10.977201 [info ] [Thread-1 (]: 6 of 10 START seed file main.seed_dim_porte .................................... [RUN]
[0m15:26:10.978826 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m15:26:10.979837 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:26:10.979837 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:26:10.984427 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:26:10.984427 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m15:26:10.984427 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:26:10.985948 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:26:10.986567 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:26:10.987082 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m15:26:10.987599 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:26:10.988607 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:26:10.988607 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:26:10.991119 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:26:10.991119 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:26:10.994746 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m15:26:10.995485 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:26:10.995995 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m15:26:10.998605 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:26:10.999114 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m15:26:11.000228 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696D8DEF30>]}
[0m15:26:11.001227 [info ] [Thread-1 (]: 6 of 10 OK loaded seed file main.seed_dim_porte ................................ [[32mINSERT 6[0m in 0.02s]
[0m15:26:11.002298 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:26:11.003310 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:26:11.003818 [info ] [Thread-1 (]: 7 of 10 START seed file main.seed_dim_produto_credito .......................... [RUN]
[0m15:26:11.005029 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m15:26:11.005029 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:26:11.006039 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:26:11.010408 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:26:11.012219 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m15:26:11.012219 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:26:11.012833 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:26:11.012833 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:26:11.013845 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m15:26:11.015069 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:26:11.016600 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:26:11.017109 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:26:11.020173 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m15:26:11.021873 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:26:11.024360 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m15:26:11.024360 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:26:11.025360 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m15:26:11.026363 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:26:11.027872 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m15:26:11.027872 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696D8E5CD0>]}
[0m15:26:11.029483 [info ] [Thread-1 (]: 7 of 10 OK loaded seed file main.seed_dim_produto_credito ...................... [[32mINSERT 14[0m in 0.02s]
[0m15:26:11.030172 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:26:11.031188 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:26:11.031697 [info ] [Thread-1 (]: 8 of 10 START seed file main.seed_dim_regiao ................................... [RUN]
[0m15:26:11.032706 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m15:26:11.032706 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:26:11.032706 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:26:11.037906 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:26:11.038902 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m15:26:11.038902 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:26:11.039902 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:26:11.040950 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:26:11.040950 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m15:26:11.041946 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:26:11.043006 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:26:11.044068 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:26:11.045272 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:26:11.046797 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:26:11.049389 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m15:26:11.049389 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:26:11.049389 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m15:26:11.052171 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:26:11.052171 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m15:26:11.052171 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696E8E7B30>]}
[0m15:26:11.053740 [info ] [Thread-1 (]: 8 of 10 OK loaded seed file main.seed_dim_regiao ............................... [[32mINSERT 7[0m in 0.02s]
[0m15:26:11.054324 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:26:11.054918 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:26:11.054918 [info ] [Thread-1 (]: 9 of 10 START seed file main.seed_dim_risco .................................... [RUN]
[0m15:26:11.055927 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m15:26:11.055927 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:26:11.057123 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:26:11.062417 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:26:11.062417 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m15:26:11.062975 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:26:11.063981 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:26:11.063981 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:26:11.063981 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m15:26:11.065609 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:26:11.066616 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:26:11.067164 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:26:11.069684 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:26:11.070258 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:26:11.073133 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m15:26:11.074140 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:26:11.074140 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m15:26:11.076140 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:26:11.076862 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m15:26:11.077872 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696D8E7890>]}
[0m15:26:11.077872 [info ] [Thread-1 (]: 9 of 10 OK loaded seed file main.seed_dim_risco ................................ [[32mINSERT 10[0m in 0.02s]
[0m15:26:11.077872 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:26:11.079706 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:26:11.079706 [info ] [Thread-1 (]: 10 of 10 START seed file main.seed_dim_segmento ................................ [RUN]
[0m15:26:11.079706 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m15:26:11.081286 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:26:11.081286 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:26:11.088260 [debug] [Thread-1 (]: Compilation Error in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
  Row 0 has 5 values, but Table only has 2 columns.
  
  > in macro materialization_seed_default (macros\materializations\seeds\seed.sql)
  > called by seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
[0m15:26:11.089261 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7eceed94-10c8-499d-a6fe-55c08f31113a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696D8DE600>]}
[0m15:26:11.090774 [error] [Thread-1 (]: 10 of 10 ERROR loading seed file main.seed_dim_segmento ........................ [[31mERROR[0m in 0.01s]
[0m15:26:11.092329 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:26:11.093383 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_segmento' to be skipped because of status 'error'.  Reason: Compilation Error in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
  Row 0 has 5 values, but Table only has 2 columns.
  
  > in macro materialization_seed_default (macros\materializations\seeds\seed.sql)
  > called by seed seed_dim_segmento (seeds\seed_dim_segmento.csv).
[0m15:26:11.094986 [debug] [MainThread]: Using duckdb connection "master"
[0m15:26:11.094986 [debug] [MainThread]: On master: BEGIN
[0m15:26:11.095516 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:26:11.096041 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:26:11.096041 [debug] [MainThread]: On master: COMMIT
[0m15:26:11.096571 [debug] [MainThread]: Using duckdb connection "master"
[0m15:26:11.096571 [debug] [MainThread]: On master: COMMIT
[0m15:26:11.097089 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:26:11.097634 [debug] [MainThread]: On master: Close
[0m15:26:11.097634 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:26:11.097634 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:26:11.097634 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:26:11.097634 [debug] [MainThread]: Connection 'seed.bacen_ifdata_analytics.seed_dim_segmento' was properly closed.
[0m15:26:11.097634 [info ] [MainThread]: 
[0m15:26:11.099153 [info ] [MainThread]: Finished running 10 seeds in 0 hours 0 minutes and 0.63 seconds (0.63s).
[0m15:26:11.100160 [debug] [MainThread]: Command end result
[0m15:26:11.131247 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:26:11.133824 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:26:11.138967 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:26:11.138967 [info ] [MainThread]: 
[0m15:26:11.139977 [info ] [MainThread]: [31mCompleted with 3 errors, 0 partial successes, and 0 warnings:[0m
[0m15:26:11.139977 [info ] [MainThread]: 
[0m15:26:11.141071 [error] [MainThread]: [31mFailure in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)[0m
[0m15:26:11.142070 [error] [MainThread]:   Compilation Error in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
  Row 12 has 3 values, but Table only has 2 columns.
  
  > in macro materialization_seed_default (macros\materializations\seeds\seed.sql)
  > called by seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
[0m15:26:11.142579 [info ] [MainThread]: 
[0m15:26:11.143761 [error] [MainThread]: [31mFailure in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)[0m
[0m15:26:11.144296 [error] [MainThread]:   Compilation Error in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
  Row 0 has 3 values, but Table only has 2 columns.
  
  > in macro materialization_seed_default (macros\materializations\seeds\seed.sql)
  > called by seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
[0m15:26:11.144836 [info ] [MainThread]: 
[0m15:26:11.145477 [error] [MainThread]: [31mFailure in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)[0m
[0m15:26:11.146523 [error] [MainThread]:   Compilation Error in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
  Row 0 has 5 values, but Table only has 2 columns.
  
  > in macro materialization_seed_default (macros\materializations\seeds\seed.sql)
  > called by seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
[0m15:26:11.147046 [info ] [MainThread]: 
[0m15:26:11.147587 [info ] [MainThread]: Done. PASS=7 WARN=0 ERROR=3 SKIP=0 NO-OP=0 TOTAL=10
[0m15:26:11.148663 [debug] [MainThread]: Command `dbt seed` failed at 15:26:11.148663 after 1.79 seconds
[0m15:26:11.148663 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696BC24C50>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696ADC77D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002696ACE5EB0>]}
[0m15:26:11.149673 [debug] [MainThread]: Flushing usage events
[0m15:26:11.981155 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:27:14.031268 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221D8A71C70>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DB88FAA0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DB7B24B0>]}


============================== 15:27:14.037339 | 60d670eb-9276-426b-89be-2c108b80bf61 ==============================
[0m15:27:14.037339 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:27:14.038158 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'invocation_command': 'dbt seed --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:27:14.507730 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DBFD5D30>]}
[0m15:27:14.578235 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DC113830>]}
[0m15:27:14.580521 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:27:14.873696 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:27:15.023370 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 3 files changed.
[0m15:27:15.024380 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://seeds\seed_dim_consolidado.csv
[0m15:27:15.025378 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://seeds\seed_dim_classe_instituicao.csv
[0m15:27:15.025378 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://seeds\seed_dim_segmento.csv
[0m15:27:15.221876 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:27:15.232835 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DD8669C0>]}
[0m15:27:15.362745 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:27:15.364955 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:27:15.396707 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DD84C650>]}
[0m15:27:15.397278 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 33 sources, 590 macros
[0m15:27:15.397278 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221D8BD4530>]}
[0m15:27:15.400897 [info ] [MainThread]: 
[0m15:27:15.402418 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:27:15.402784 [info ] [MainThread]: 
[0m15:27:15.403792 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:27:15.407504 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:27:15.493091 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:27:15.494233 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:27:15.494752 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:27:15.609055 [debug] [ThreadPool]: SQL status: OK in 0.115 seconds
[0m15:27:15.610065 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:27:15.610065 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:27:15.611658 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:27:15.616590 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:27:15.616590 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:27:15.616590 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:27:15.618245 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:27:15.619253 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:27:15.619253 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:27:15.619759 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:27:15.620263 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:27:15.620263 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:27:15.620263 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:27:15.621268 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:27:15.621268 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:27:15.621268 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:27:15.622311 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:27:15.622887 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:27:15.626381 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:27:15.630748 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:27:15.631284 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:27:15.631284 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:27:15.631815 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:27:15.631815 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:27:15.632825 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:27:15.644702 [debug] [ThreadPool]: SQL status: OK in 0.012 seconds
[0m15:27:15.645710 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:27:15.646811 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:27:15.647373 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:27:15.648402 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DDB8C770>]}
[0m15:27:15.649386 [debug] [MainThread]: Using duckdb connection "master"
[0m15:27:15.649896 [debug] [MainThread]: On master: BEGIN
[0m15:27:15.649896 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:27:15.649896 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:27:15.649896 [debug] [MainThread]: On master: COMMIT
[0m15:27:15.650921 [debug] [MainThread]: Using duckdb connection "master"
[0m15:27:15.650921 [debug] [MainThread]: On master: COMMIT
[0m15:27:15.650921 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:27:15.651493 [debug] [MainThread]: On master: Close
[0m15:27:15.656518 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:27:15.657039 [info ] [Thread-1 (]: 1 of 10 START seed file main.seed_dim_atividade ................................ [RUN]
[0m15:27:15.657574 [debug] [Thread-1 (]: Acquiring new duckdb connection 'seed.bacen_ifdata_analytics.seed_dim_atividade'
[0m15:27:15.658102 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:27:15.658102 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:27:15.678254 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:27:15.678254 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m15:27:15.678254 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:27:15.679772 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.679772 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:27:15.679772 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */
truncate table "gold_warehouse"."main"."seed_dim_atividade"
[0m15:27:15.685765 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m15:27:15.693782 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:27:15.694305 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:27:15.697435 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m15:27:15.702209 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:27:15.709211 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m15:27:15.709211 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:27:15.710213 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m15:27:15.712377 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:27:15.712943 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m15:27:15.715574 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DB7EC920>]}
[0m15:27:15.715574 [info ] [Thread-1 (]: 1 of 10 OK loaded seed file main.seed_dim_atividade ............................ [[32mINSERT 10[0m in 0.06s]
[0m15:27:15.716593 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:27:15.716593 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:27:15.717840 [info ] [Thread-1 (]: 2 of 10 START seed file main.seed_dim_classe_instituicao ....................... [RUN]
[0m15:27:15.717840 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m15:27:15.718851 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:27:15.719357 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:27:15.728368 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m15:27:15.728876 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m15:27:15.729398 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:27:15.729398 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.729398 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m15:27:15.729398 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m15:27:15.729398 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.730979 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m15:27:15.730979 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:27:15.732543 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.732543 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m15:27:15.737796 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m15:27:15.738332 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m15:27:15.738332 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m15:27:15.739826 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.739826 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m15:27:15.740841 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DDB62EA0>]}
[0m15:27:15.740841 [info ] [Thread-1 (]: 2 of 10 OK loaded seed file main.seed_dim_classe_instituicao ................... [[32mINSERT 26[0m in 0.02s]
[0m15:27:15.741839 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:27:15.741839 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:27:15.742376 [info ] [Thread-1 (]: 3 of 10 START seed file main.seed_dim_consolidado .............................. [RUN]
[0m15:27:15.742887 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m15:27:15.742887 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:27:15.742887 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:27:15.745494 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m15:27:15.745494 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m15:27:15.745494 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:27:15.747004 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.747004 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m15:27:15.747004 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m15:27:15.748014 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.748014 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m15:27:15.749550 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:27:15.751133 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.751699 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m15:27:15.754343 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m15:27:15.754889 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m15:27:15.754889 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m15:27:15.813257 [debug] [Thread-1 (]: SQL status: OK in 0.059 seconds
[0m15:27:15.814767 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m15:27:15.815413 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DDB81940>]}
[0m15:27:15.815413 [info ] [Thread-1 (]: 3 of 10 OK loaded seed file main.seed_dim_consolidado .......................... [[32mINSERT 8[0m in 0.07s]
[0m15:27:15.815990 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:27:15.816514 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:27:15.816514 [info ] [Thread-1 (]: 4 of 10 START seed file main.seed_dim_controle ................................. [RUN]
[0m15:27:15.816514 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m15:27:15.817532 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:27:15.817532 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:27:15.822819 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:27:15.823385 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m15:27:15.823942 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:27:15.823942 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.824486 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:27:15.824486 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */
truncate table "gold_warehouse"."main"."seed_dim_controle"
[0m15:27:15.825034 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.826152 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:27:15.826152 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:27:15.826683 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.828240 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:27:15.829777 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m15:27:15.829777 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:27:15.829777 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m15:27:15.831877 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.832906 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m15:27:15.832906 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DEC73E90>]}
[0m15:27:15.833445 [info ] [Thread-1 (]: 4 of 10 OK loaded seed file main.seed_dim_controle ............................. [[32mINSERT 3[0m in 0.02s]
[0m15:27:15.833953 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:27:15.833953 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:27:15.834960 [info ] [Thread-1 (]: 5 of 10 START seed file main.seed_dim_faixa_vencimento ......................... [RUN]
[0m15:27:15.834960 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m15:27:15.834960 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:27:15.835961 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:27:15.840589 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:27:15.841115 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m15:27:15.841640 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:27:15.841640 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.841640 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:27:15.841640 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */
truncate table "gold_warehouse"."main"."seed_dim_faixa_vencimento"
[0m15:27:15.842645 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.842645 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:27:15.844437 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:27:15.845455 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:27:15.846961 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:27:15.849214 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m15:27:15.849724 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:27:15.849724 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m15:27:15.852489 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:27:15.853506 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m15:27:15.853506 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DEC69310>]}
[0m15:27:15.854018 [info ] [Thread-1 (]: 5 of 10 OK loaded seed file main.seed_dim_faixa_vencimento ..................... [[32mINSERT 7[0m in 0.02s]
[0m15:27:15.854566 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:27:15.855154 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:27:15.855154 [info ] [Thread-1 (]: 6 of 10 START seed file main.seed_dim_porte .................................... [RUN]
[0m15:27:15.856166 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m15:27:15.856166 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:27:15.856166 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:27:15.860422 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:27:15.860422 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m15:27:15.860422 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:27:15.860422 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.862058 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:27:15.862058 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */
truncate table "gold_warehouse"."main"."seed_dim_porte"
[0m15:27:15.862642 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.863276 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:27:15.863276 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:27:15.865416 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.866434 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:27:15.867453 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m15:27:15.867453 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:27:15.867453 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m15:27:15.870228 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.870980 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m15:27:15.872245 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DEC66480>]}
[0m15:27:15.872752 [info ] [Thread-1 (]: 6 of 10 OK loaded seed file main.seed_dim_porte ................................ [[32mINSERT 6[0m in 0.02s]
[0m15:27:15.872752 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:27:15.873766 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:27:15.873766 [info ] [Thread-1 (]: 7 of 10 START seed file main.seed_dim_produto_credito .......................... [RUN]
[0m15:27:15.874771 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m15:27:15.874771 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:27:15.874771 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:27:15.880440 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:27:15.880440 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m15:27:15.881460 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:27:15.881460 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.882467 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:27:15.882467 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */
truncate table "gold_warehouse"."main"."seed_dim_produto_credito"
[0m15:27:15.883511 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.884058 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:27:15.884606 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:27:15.886309 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:27:15.886309 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:27:15.888855 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m15:27:15.888855 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:27:15.889854 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m15:27:15.891201 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.892172 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m15:27:15.892769 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DD5BD3A0>]}
[0m15:27:15.892769 [info ] [Thread-1 (]: 7 of 10 OK loaded seed file main.seed_dim_produto_credito ...................... [[32mINSERT 14[0m in 0.02s]
[0m15:27:15.892769 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:27:15.894326 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:27:15.894898 [info ] [Thread-1 (]: 8 of 10 START seed file main.seed_dim_regiao ................................... [RUN]
[0m15:27:15.895542 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m15:27:15.895542 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:27:15.897069 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:27:15.901209 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:27:15.901209 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m15:27:15.901788 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:27:15.902373 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.902373 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:27:15.902373 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */
truncate table "gold_warehouse"."main"."seed_dim_regiao"
[0m15:27:15.903378 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.903889 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:27:15.904433 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:27:15.906031 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:27:15.906031 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:27:15.907637 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m15:27:15.908651 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:27:15.908651 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m15:27:15.910773 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.910773 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m15:27:15.910773 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DDB8EAB0>]}
[0m15:27:15.912302 [info ] [Thread-1 (]: 8 of 10 OK loaded seed file main.seed_dim_regiao ............................... [[32mINSERT 7[0m in 0.02s]
[0m15:27:15.912877 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:27:15.912877 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:27:15.912877 [info ] [Thread-1 (]: 9 of 10 START seed file main.seed_dim_risco .................................... [RUN]
[0m15:27:15.913889 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m15:27:15.913889 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:27:15.914886 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:27:15.919672 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:27:15.920232 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m15:27:15.920232 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:27:15.920232 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.921239 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:27:15.921239 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */
truncate table "gold_warehouse"."main"."seed_dim_risco"
[0m15:27:15.921776 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:15.922840 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:27:15.922840 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:27:15.923861 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.924848 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:27:15.926938 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m15:27:15.926938 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:27:15.926938 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m15:27:15.929541 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.930090 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m15:27:15.930621 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DEC9B2C0>]}
[0m15:27:15.931160 [info ] [Thread-1 (]: 9 of 10 OK loaded seed file main.seed_dim_risco ................................ [[32mINSERT 10[0m in 0.02s]
[0m15:27:15.931687 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:27:15.932217 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:27:15.932217 [info ] [Thread-1 (]: 10 of 10 START seed file main.seed_dim_segmento ................................ [RUN]
[0m15:27:15.932750 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m15:27:15.933277 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:27:15.933277 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:27:15.937025 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m15:27:15.937561 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m15:27:15.938111 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:27:15.938644 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.939207 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m15:27:15.939736 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m15:27:15.941000 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.942500 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m15:27:15.943041 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:27:15.944737 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:27:15.945341 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m15:27:15.947639 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m15:27:15.948222 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m15:27:15.948794 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m15:27:15.950051 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:15.951268 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m15:27:15.951868 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '60d670eb-9276-426b-89be-2c108b80bf61', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DDB6A330>]}
[0m15:27:15.951868 [info ] [Thread-1 (]: 10 of 10 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.02s]
[0m15:27:15.952999 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:27:15.954191 [debug] [MainThread]: Using duckdb connection "master"
[0m15:27:15.954770 [debug] [MainThread]: On master: BEGIN
[0m15:27:15.954770 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:27:15.955364 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:27:15.955953 [debug] [MainThread]: On master: COMMIT
[0m15:27:15.955953 [debug] [MainThread]: Using duckdb connection "master"
[0m15:27:15.956548 [debug] [MainThread]: On master: COMMIT
[0m15:27:15.956548 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:27:15.957238 [debug] [MainThread]: On master: Close
[0m15:27:15.957238 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:27:15.957808 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:27:15.957808 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:27:15.957808 [debug] [MainThread]: Connection 'seed.bacen_ifdata_analytics.seed_dim_segmento' was properly closed.
[0m15:27:15.958362 [info ] [MainThread]: 
[0m15:27:15.958914 [info ] [MainThread]: Finished running 10 seeds in 0 hours 0 minutes and 0.55 seconds (0.55s).
[0m15:27:15.960623 [debug] [MainThread]: Command end result
[0m15:27:16.001982 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:27:16.005909 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:27:16.012916 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:27:16.012916 [info ] [MainThread]: 
[0m15:27:16.014424 [info ] [MainThread]: [32mCompleted successfully[0m
[0m15:27:16.015576 [info ] [MainThread]: 
[0m15:27:16.015576 [info ] [MainThread]: Done. PASS=10 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=10
[0m15:27:16.017577 [debug] [MainThread]: Command `dbt seed` succeeded at 15:27:16.016577 after 2.12 seconds
[0m15:27:16.017577 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DB3C7740>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DBC69F40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000221DBC684A0>]}
[0m15:27:16.018576 [debug] [MainThread]: Flushing usage events
[0m15:27:16.822860 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:27:33.512676 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC666C680>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC76EE120>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC666E330>]}


============================== 15:27:33.517335 | 3028a8cb-f38b-46af-86fd-99286e58a5ce ==============================
[0m15:27:33.517335 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:27:33.517335 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'invocation_command': 'dbt run --select dim_instituicao fato_balanco_patrimonial fato_operacoes_clientes --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:27:33.731375 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '3028a8cb-f38b-46af-86fd-99286e58a5ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC66AB860>]}
[0m15:27:33.785878 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '3028a8cb-f38b-46af-86fd-99286e58a5ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC75EBCB0>]}
[0m15:27:33.787915 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:27:34.056796 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:27:34.238370 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m15:27:34.238370 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m15:27:34.239874 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m15:27:34.245498 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:27:34.284814 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '3028a8cb-f38b-46af-86fd-99286e58a5ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC7B0A630>]}
[0m15:27:34.368173 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:27:34.370832 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:27:34.400985 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '3028a8cb-f38b-46af-86fd-99286e58a5ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC934FA40>]}
[0m15:27:34.401576 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 33 sources, 590 macros
[0m15:27:34.402133 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '3028a8cb-f38b-46af-86fd-99286e58a5ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC9364C50>]}
[0m15:27:34.404869 [info ] [MainThread]: 
[0m15:27:34.404869 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:27:34.405878 [info ] [MainThread]: 
[0m15:27:34.405878 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:27:34.410060 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:27:34.536028 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:27:34.536028 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:27:34.537515 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:27:34.653584 [debug] [ThreadPool]: SQL status: OK in 0.116 seconds
[0m15:27:34.654802 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:27:34.655339 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:27:34.655853 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:27:34.660508 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:27:34.661515 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:27:34.661515 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:27:34.662604 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:27:34.663656 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:27:34.664185 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:27:34.664707 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:27:34.664707 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:27:34.665239 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:27:34.665758 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:27:34.666296 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:27:34.666823 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:27:34.666823 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:27:34.666823 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:27:34.667356 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:27:34.670577 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:27:34.674253 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:27:34.674253 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:27:34.675255 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:27:34.675255 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:27:34.675255 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:27:34.676177 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:27:34.686402 [debug] [ThreadPool]: SQL status: OK in 0.010 seconds
[0m15:27:34.686918 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:27:34.688431 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:27:34.688431 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:27:34.691970 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '3028a8cb-f38b-46af-86fd-99286e58a5ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC46AA7E0>]}
[0m15:27:34.691970 [debug] [MainThread]: Using duckdb connection "master"
[0m15:27:34.691970 [debug] [MainThread]: On master: BEGIN
[0m15:27:34.693410 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:27:34.693410 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:27:34.694424 [debug] [MainThread]: On master: COMMIT
[0m15:27:34.694424 [debug] [MainThread]: Using duckdb connection "master"
[0m15:27:34.694424 [debug] [MainThread]: On master: COMMIT
[0m15:27:34.694424 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:27:34.695463 [debug] [MainThread]: On master: Close
[0m15:27:34.702720 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:27:34.702720 [info ] [Thread-1 (]: 1 of 3 START sql table model main.dim_instituicao .............................. [RUN]
[0m15:27:34.703734 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m15:27:34.704246 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m15:27:34.710450 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:27:34.712021 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m15:27:34.735688 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:27:34.736697 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:27:34.736697 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m15:27:34.737846 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:27:34.738846 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:34.738846 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:27:34.739868 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT DISTINCT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
    );
  
  
[0m15:27:34.834246 [debug] [Thread-1 (]: SQL status: OK in 0.095 seconds
[0m15:27:34.838377 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:27:34.838377 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m15:27:34.839925 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:34.840933 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:27:34.841961 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m15:27:34.843037 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:34.848292 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:27:34.848292 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m15:27:34.849317 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:34.851841 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:27:34.851841 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m15:27:34.852447 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:34.862691 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:27:34.863863 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:27:34.863863 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:27:34.937065 [debug] [Thread-1 (]: SQL status: OK in 0.073 seconds
[0m15:27:34.941138 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:27:34.941138 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m15:27:34.942649 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:27:34.945404 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m15:27:34.948629 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '3028a8cb-f38b-46af-86fd-99286e58a5ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC9651CA0>]}
[0m15:27:34.949150 [info ] [Thread-1 (]: 1 of 3 OK created sql table model main.dim_instituicao ......................... [[32mOK[0m in 0.24s]
[0m15:27:34.949670 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:27:34.950199 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:27:34.950848 [info ] [Thread-1 (]: 2 of 3 START sql table model main.fato_balanco_patrimonial ..................... [RUN]
[0m15:27:34.951367 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m15:27:34.951923 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:27:34.955949 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:27:34.957637 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:27:34.960019 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:27:34.961543 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:27:34.962068 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m15:27:34.962068 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:27:34.962611 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:34.963134 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:27:34.963134 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.resultado_exercicios_futuros,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.resultado_exercicios_futuros,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.resultado_exercicios_futuros,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes_totais as captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    resultado_exercicios_futuros,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:27:34.965225 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.resultado_exercicios_futuros,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.resultado_exercicios_futuros,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.resultado_exercicios_futuros,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes_totais as captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    resultado_exercicios_futuros,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:27:34.965771 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:27:34.966321 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: ROLLBACK
[0m15:27:34.971436 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_balanco_patrimonial'
[0m15:27:34.971436 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m15:27:34.974286 [debug] [Thread-1 (]: Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Binder Error: Table "l" does not have a column named "depositos"
  
  Candidate bindings: : "depositos_vista", "depositos_outros", "depositos_a_prazo", "depositos_poupanca", "depositos_interfinanceiros"
  
  LINE 35:         l.depositos,
                   ^
[0m15:27:34.974867 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '3028a8cb-f38b-46af-86fd-99286e58a5ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC976C5C0>]}
[0m15:27:34.975394 [error] [Thread-1 (]: 2 of 3 ERROR creating sql table model main.fato_balanco_patrimonial ............ [[31mERROR[0m in 0.02s]
[0m15:27:34.975916 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:27:34.976446 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:27:34.977493 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_balanco_patrimonial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Binder Error: Table "l" does not have a column named "depositos"
  
  Candidate bindings: : "depositos_vista", "depositos_outros", "depositos_a_prazo", "depositos_poupanca", "depositos_interfinanceiros"
  
  LINE 35:         l.depositos,
                   ^.
[0m15:27:34.976973 [info ] [Thread-1 (]: 3 of 3 START sql table model main.fato_operacoes_clientes ...................... [RUN]
[0m15:27:34.978537 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m15:27:34.978537 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:27:34.982865 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:27:34.983470 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:27:34.986842 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:27:34.988596 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:27:34.989117 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m15:27:34.989117 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:27:34.990175 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:27:34.991190 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:27:34.991190 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."prudential_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m15:27:34.992716 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."prudential_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m15:27:34.992716 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:27:34.992716 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: ROLLBACK
[0m15:27:34.995928 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_operacoes_clientes'
[0m15:27:34.995928 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m15:27:34.997474 [debug] [Thread-1 (]: Runtime Error in model fato_operacoes_clientes (models\gold\fato_operacoes_clientes.sql)
  Catalog Error: Table with name prudential_conglomerates_portfolio_number_clients_operations does not exist!
  Did you mean "prudential_conglomerates_income_statement"?
  
  LINE 19:     FROM "silver"."main"."prudential_conglomerates_portfolio_number_...
                    ^
[0m15:27:34.998507 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '3028a8cb-f38b-46af-86fd-99286e58a5ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CCF6CBF50>]}
[0m15:27:34.999572 [error] [Thread-1 (]: 3 of 3 ERROR creating sql table model main.fato_operacoes_clientes ............. [[31mERROR[0m in 0.02s]
[0m15:27:35.000106 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:27:35.000106 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_operacoes_clientes' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_operacoes_clientes (models\gold\fato_operacoes_clientes.sql)
  Catalog Error: Table with name prudential_conglomerates_portfolio_number_clients_operations does not exist!
  Did you mean "prudential_conglomerates_income_statement"?
  
  LINE 19:     FROM "silver"."main"."prudential_conglomerates_portfolio_number_...
                    ^.
[0m15:27:35.001620 [debug] [MainThread]: Using duckdb connection "master"
[0m15:27:35.001620 [debug] [MainThread]: On master: BEGIN
[0m15:27:35.002217 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:27:35.002217 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:27:35.002217 [debug] [MainThread]: On master: COMMIT
[0m15:27:35.002217 [debug] [MainThread]: Using duckdb connection "master"
[0m15:27:35.002217 [debug] [MainThread]: On master: COMMIT
[0m15:27:35.002217 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:27:35.003805 [debug] [MainThread]: On master: Close
[0m15:27:35.003805 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:27:35.003805 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:27:35.004420 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:27:35.004420 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_operacoes_clientes' was properly closed.
[0m15:27:35.004420 [info ] [MainThread]: 
[0m15:27:35.005051 [info ] [MainThread]: Finished running 3 table models in 0 hours 0 minutes and 0.60 seconds (0.60s).
[0m15:27:35.006060 [debug] [MainThread]: Command end result
[0m15:27:35.039003 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:27:35.041346 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:27:35.045968 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:27:35.045968 [info ] [MainThread]: 
[0m15:27:35.045968 [info ] [MainThread]: [31mCompleted with 2 errors, 0 partial successes, and 0 warnings:[0m
[0m15:27:35.046978 [info ] [MainThread]: 
[0m15:27:35.047488 [error] [MainThread]: [31mFailure in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)[0m
[0m15:27:35.047488 [error] [MainThread]:   Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Binder Error: Table "l" does not have a column named "depositos"
  
  Candidate bindings: : "depositos_vista", "depositos_outros", "depositos_a_prazo", "depositos_poupanca", "depositos_interfinanceiros"
  
  LINE 35:         l.depositos,
                   ^
[0m15:27:35.048497 [info ] [MainThread]: 
[0m15:27:35.048497 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_balanco_patrimonial.sql
[0m15:27:35.049497 [info ] [MainThread]: 
[0m15:27:35.049497 [error] [MainThread]: [31mFailure in model fato_operacoes_clientes (models\gold\fato_operacoes_clientes.sql)[0m
[0m15:27:35.049497 [error] [MainThread]:   Runtime Error in model fato_operacoes_clientes (models\gold\fato_operacoes_clientes.sql)
  Catalog Error: Table with name prudential_conglomerates_portfolio_number_clients_operations does not exist!
  Did you mean "prudential_conglomerates_income_statement"?
  
  LINE 19:     FROM "silver"."main"."prudential_conglomerates_portfolio_number_...
                    ^
[0m15:27:35.049497 [info ] [MainThread]: 
[0m15:27:35.051067 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_operacoes_clientes.sql
[0m15:27:35.051067 [info ] [MainThread]: 
[0m15:27:35.051637 [info ] [MainThread]: Done. PASS=1 WARN=0 ERROR=2 SKIP=0 NO-OP=0 TOTAL=3
[0m15:27:35.052210 [debug] [MainThread]: Command `dbt run` failed at 15:27:35.052210 after 1.68 seconds
[0m15:27:35.052210 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC3BBA9F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC6B92660>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018CC6B92120>]}
[0m15:27:35.053218 [debug] [MainThread]: Flushing usage events
[0m15:27:35.701596 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:30:23.592542 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000252A001AF60>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002529F9E7800>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002529FE66570>]}


============================== 15:30:23.598195 | da336fcc-09e3-4f79-bcfb-7c8b57e74582 ==============================
[0m15:30:23.598195 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:30:23.599189 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt run --select dim_instituicao fato_balanco_patrimonial --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:30:23.881529 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'da336fcc-09e3-4f79-bcfb-7c8b57e74582', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000252A1AEF8F0>]}
[0m15:30:24.002379 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'da336fcc-09e3-4f79-bcfb-7c8b57e74582', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002529D95A3F0>]}
[0m15:30:24.009311 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:30:24.455232 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:30:24.677929 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 2 files changed.
[0m15:30:24.677929 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_balanco_patrimonial.sql
[0m15:30:24.679515 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_operacoes_clientes.sql
[0m15:30:25.016720 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on
'fato_balanco_patrimonial' in package 'bacen_ifdata_analytics'
(models\gold\schema.yml). Arguments to generic tests should be nested under the
`arguments` property.
[0m15:30:25.017783 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': 'da336fcc-09e3-4f79-bcfb-7c8b57e74582', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000252A20ADA90>]}
[0m15:30:25.051424 [debug] [MainThread]: [[33mWARNING[0m]: Test 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004' (models\gold\schema.yml) depends on a node named 'fato_operacoes_clientes' which is disabled
[0m15:30:25.051424 [debug] [MainThread]: [[33mWARNING[0m]: Test 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871' (models\gold\schema.yml) depends on a node named 'fato_operacoes_clientes' which is disabled
[0m15:30:25.051956 [debug] [MainThread]: [[33mWARNING[0m]: Test 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21' (models\gold\schema.yml) depends on a node named 'fato_operacoes_clientes' which is disabled
[0m15:30:25.051956 [debug] [MainThread]: [[33mWARNING[0m]: Test 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5' (models\gold\schema.yml) depends on a node named 'fato_operacoes_clientes' which is disabled
[0m15:30:25.157823 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:30:25.169252 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'da336fcc-09e3-4f79-bcfb-7c8b57e74582', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000252A21A1880>]}
[0m15:30:25.258216 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:30:25.263820 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:30:25.305616 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'da336fcc-09e3-4f79-bcfb-7c8b57e74582', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000252A1E123F0>]}
[0m15:30:25.306145 [info ] [MainThread]: Found 25 models, 10 seeds, 57 data tests, 33 sources, 590 macros
[0m15:30:25.306691 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'da336fcc-09e3-4f79-bcfb-7c8b57e74582', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000252A1E42750>]}
[0m15:30:25.308831 [info ] [MainThread]: 
[0m15:30:25.310349 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:30:25.310349 [info ] [MainThread]: 
[0m15:30:25.310349 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:30:25.315049 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:30:25.397371 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:30:25.398378 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:30:25.398378 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:30:26.127118 [debug] [ThreadPool]: SQL status: OK in 0.728 seconds
[0m15:30:26.128987 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:30:26.129516 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:30:26.129516 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:30:26.134234 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:30:26.135875 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:30:26.135875 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:30:26.136880 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:30:26.138969 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:30:26.138969 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:30:26.139967 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:30:26.139967 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:30:26.139967 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:30:26.142029 [debug] [ThreadPool]: SQL status: OK in 0.002 seconds
[0m15:30:26.143039 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:30:26.143576 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:30:26.144088 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:30:26.144625 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:30:26.145152 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:30:26.148852 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:30:26.153503 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:30:26.154007 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:30:26.154007 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:30:26.154544 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:30:26.155139 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:30:26.155139 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:30:26.167497 [debug] [ThreadPool]: SQL status: OK in 0.012 seconds
[0m15:30:26.169066 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:30:26.170105 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:30:26.170630 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:30:26.172740 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'da336fcc-09e3-4f79-bcfb-7c8b57e74582', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000252A1E42F60>]}
[0m15:30:26.172740 [debug] [MainThread]: Using duckdb connection "master"
[0m15:30:26.172740 [debug] [MainThread]: On master: BEGIN
[0m15:30:26.173745 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:30:26.174303 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:30:26.174303 [debug] [MainThread]: On master: COMMIT
[0m15:30:26.174303 [debug] [MainThread]: Using duckdb connection "master"
[0m15:30:26.174303 [debug] [MainThread]: On master: COMMIT
[0m15:30:26.175306 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:30:26.175306 [debug] [MainThread]: On master: Close
[0m15:30:26.179405 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:30:26.180957 [info ] [Thread-1 (]: 1 of 2 START sql table model main.dim_instituicao .............................. [RUN]
[0m15:30:26.180957 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m15:30:26.180957 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m15:30:26.188406 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:30:26.189997 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m15:30:26.214735 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:30:26.215297 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:30:26.216306 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m15:30:26.216306 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:30:26.217482 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:30:26.217482 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:30:26.219052 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT DISTINCT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
    );
  
  
[0m15:30:26.345394 [debug] [Thread-1 (]: SQL status: OK in 0.127 seconds
[0m15:30:26.351085 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:30:26.351085 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m15:30:26.352231 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:30:26.353239 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:30:26.353745 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m15:30:26.356916 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m15:30:26.362565 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:30:26.362565 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m15:30:26.363139 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:30:26.366717 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:30:26.367287 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m15:30:26.368295 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:30:26.383907 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:30:26.384480 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:30:26.385005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:30:26.403657 [debug] [Thread-1 (]: SQL status: OK in 0.018 seconds
[0m15:30:26.409729 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:30:26.410325 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m15:30:26.411916 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:30:26.414022 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m15:30:26.417279 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'da336fcc-09e3-4f79-bcfb-7c8b57e74582', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000252A2082990>]}
[0m15:30:26.417279 [info ] [Thread-1 (]: 1 of 2 OK created sql table model main.dim_instituicao ......................... [[32mOK[0m in 0.23s]
[0m15:30:26.418282 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:30:26.418282 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:30:26.419285 [info ] [Thread-1 (]: 2 of 2 START sql table model main.fato_balanco_patrimonial ..................... [RUN]
[0m15:30:26.419285 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m15:30:26.420571 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:30:26.425971 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:30:26.426974 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:30:26.430553 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:30:26.431606 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:30:26.431606 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m15:30:26.432129 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:30:26.432659 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:30:26.433190 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:30:26.433715 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
)

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    resultado_exercicios_futuros,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:30:26.439913 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
)

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    resultado_exercicios_futuros,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:30:26.439913 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:30:26.440920 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: ROLLBACK
[0m15:30:26.447601 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_balanco_patrimonial'
[0m15:30:26.448608 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m15:30:26.450113 [debug] [Thread-1 (]: Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Parser Error: syntax error at or near "unificacao"
[0m15:30:26.451119 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'da336fcc-09e3-4f79-bcfb-7c8b57e74582', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000252A3626F90>]}
[0m15:30:26.451689 [error] [Thread-1 (]: 2 of 2 ERROR creating sql table model main.fato_balanco_patrimonial ............ [[31mERROR[0m in 0.03s]
[0m15:30:26.452286 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:30:26.452286 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_balanco_patrimonial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Parser Error: syntax error at or near "unificacao".
[0m15:30:26.454339 [debug] [MainThread]: Using duckdb connection "master"
[0m15:30:26.454339 [debug] [MainThread]: On master: BEGIN
[0m15:30:26.454904 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:30:26.455478 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:30:26.455478 [debug] [MainThread]: On master: COMMIT
[0m15:30:26.455478 [debug] [MainThread]: Using duckdb connection "master"
[0m15:30:26.455984 [debug] [MainThread]: On master: COMMIT
[0m15:30:26.455984 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:30:26.455984 [debug] [MainThread]: On master: Close
[0m15:30:26.456989 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:30:26.456989 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:30:26.457491 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:30:26.457491 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_balanco_patrimonial' was properly closed.
[0m15:30:26.457491 [info ] [MainThread]: 
[0m15:30:26.457491 [info ] [MainThread]: Finished running 2 table models in 0 hours 0 minutes and 1.15 seconds (1.15s).
[0m15:30:26.458497 [debug] [MainThread]: Command end result
[0m15:30:26.488720 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:30:26.490784 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:30:26.495432 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:30:26.497253 [info ] [MainThread]: 
[0m15:30:26.497811 [info ] [MainThread]: [31mCompleted with 1 error, 0 partial successes, and 0 warnings:[0m
[0m15:30:26.497811 [info ] [MainThread]: 
[0m15:30:26.497811 [error] [MainThread]: [31mFailure in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)[0m
[0m15:30:26.497811 [error] [MainThread]:   Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Parser Error: syntax error at or near "unificacao"
[0m15:30:26.499326 [info ] [MainThread]: 
[0m15:30:26.499326 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_balanco_patrimonial.sql
[0m15:30:26.499326 [info ] [MainThread]: 
[0m15:30:26.499326 [info ] [MainThread]: Done. PASS=1 WARN=0 ERROR=1 SKIP=0 NO-OP=0 TOTAL=2
[0m15:30:26.500886 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 4 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m15:30:26.502031 [debug] [MainThread]: Command `dbt run` failed at 15:30:26.502031 after 3.05 seconds
[0m15:30:26.502562 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000252A04ADDC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000252A0509AC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000252A2169280>]}
[0m15:30:26.502562 [debug] [MainThread]: Flushing usage events
[0m15:30:27.350268 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:30:58.357670 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CD3781A90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CD988E570>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CD96F7920>]}


============================== 15:30:58.362518 | b82d161d-1a3f-429c-813c-bd182d67f13f ==============================
[0m15:30:58.362518 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:30:58.363063 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'invocation_command': 'dbt run --select dim_instituicao fato_balanco_patrimonial --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:30:58.572974 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'b82d161d-1a3f-429c-813c-bd182d67f13f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CD674F3B0>]}
[0m15:30:58.627791 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'b82d161d-1a3f-429c-813c-bd182d67f13f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CD86C7F80>]}
[0m15:30:58.631120 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:30:58.892416 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:30:59.073093 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 1 files changed.
[0m15:30:59.074100 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_balanco_patrimonial.sql
[0m15:30:59.415450 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on
'fato_balanco_patrimonial' in package 'bacen_ifdata_analytics'
(models\gold\schema.yml). Arguments to generic tests should be nested under the
`arguments` property.
[0m15:30:59.419030 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': 'b82d161d-1a3f-429c-813c-bd182d67f13f', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CDB604CB0>]}
[0m15:30:59.693499 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:30:59.717560 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'b82d161d-1a3f-429c-813c-bd182d67f13f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CDB508080>]}
[0m15:30:59.848065 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:30:59.851987 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:30:59.905076 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'b82d161d-1a3f-429c-813c-bd182d67f13f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CDB4C7F20>]}
[0m15:30:59.905076 [info ] [MainThread]: Found 25 models, 10 seeds, 57 data tests, 33 sources, 590 macros
[0m15:30:59.906084 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'b82d161d-1a3f-429c-813c-bd182d67f13f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CDAE81EE0>]}
[0m15:30:59.908692 [info ] [MainThread]: 
[0m15:30:59.908692 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:30:59.908692 [info ] [MainThread]: 
[0m15:30:59.910197 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:30:59.913936 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:30:59.998237 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:30:59.999011 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:30:59.999527 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:31:00.126170 [debug] [ThreadPool]: SQL status: OK in 0.126 seconds
[0m15:31:00.127178 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:31:00.128190 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:31:00.128190 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:31:00.134305 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:31:00.135813 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:31:00.136385 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:31:00.136894 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:31:00.137903 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:31:00.138903 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:31:00.138903 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:31:00.139902 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:31:00.139902 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:31:00.140406 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:31:00.140406 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:31:00.140406 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:31:00.141911 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:31:00.141911 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:31:00.141911 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:31:00.144425 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:31:00.149511 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:31:00.150015 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:31:00.150015 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:31:00.151022 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:31:00.151022 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:31:00.151640 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:31:00.165443 [debug] [ThreadPool]: SQL status: OK in 0.014 seconds
[0m15:31:00.167475 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:31:00.167475 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:31:00.167475 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:31:00.170187 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'b82d161d-1a3f-429c-813c-bd182d67f13f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CD6874DA0>]}
[0m15:31:00.170187 [debug] [MainThread]: Using duckdb connection "master"
[0m15:31:00.171197 [debug] [MainThread]: On master: BEGIN
[0m15:31:00.171197 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:31:00.171706 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:31:00.171706 [debug] [MainThread]: On master: COMMIT
[0m15:31:00.171706 [debug] [MainThread]: Using duckdb connection "master"
[0m15:31:00.171706 [debug] [MainThread]: On master: COMMIT
[0m15:31:00.172714 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:31:00.172714 [debug] [MainThread]: On master: Close
[0m15:31:00.176721 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:31:00.176721 [info ] [Thread-1 (]: 1 of 2 START sql table model main.dim_instituicao .............................. [RUN]
[0m15:31:00.176721 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m15:31:00.178226 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m15:31:00.185932 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:31:00.187674 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m15:31:00.211784 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:31:00.212939 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:31:00.213525 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m15:31:00.214184 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:31:00.214184 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:31:00.215173 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:31:00.215691 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT DISTINCT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
    );
  
  
[0m15:31:00.322807 [debug] [Thread-1 (]: SQL status: OK in 0.107 seconds
[0m15:31:00.327703 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:31:00.328222 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m15:31:00.328764 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:31:00.329773 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:31:00.330278 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m15:31:00.331286 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:31:00.335817 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:31:00.336323 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m15:31:00.336825 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:31:00.338403 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:31:00.339912 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m15:31:00.339912 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:31:00.350013 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:31:00.351018 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:31:00.351592 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:31:00.367278 [debug] [Thread-1 (]: SQL status: OK in 0.015 seconds
[0m15:31:00.372484 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:31:00.373073 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m15:31:00.374081 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:31:00.376079 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m15:31:00.378080 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b82d161d-1a3f-429c-813c-bd182d67f13f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CDB7099D0>]}
[0m15:31:00.378080 [info ] [Thread-1 (]: 1 of 2 OK created sql table model main.dim_instituicao ......................... [[32mOK[0m in 0.20s]
[0m15:31:00.379780 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:31:00.379780 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:31:00.379780 [info ] [Thread-1 (]: 2 of 2 START sql table model main.fato_balanco_patrimonial ..................... [RUN]
[0m15:31:00.381370 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m15:31:00.381370 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:31:00.387178 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:31:00.388255 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:31:00.390407 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:31:00.392925 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:31:00.393431 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m15:31:00.393431 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:31:00.394441 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:31:00.394441 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:31:00.395445 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    resultado_exercicios_futuros,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:31:00.402511 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.captacoes_mercado_aberto,
        l.recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_repasses,
        l.obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    resultado_exercicios_futuros,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:31:00.403432 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:31:00.404028 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: ROLLBACK
[0m15:31:00.407695 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_balanco_patrimonial'
[0m15:31:00.408699 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m15:31:00.410201 [debug] [Thread-1 (]: Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Binder Error: Table "l" does not have a column named "captacoes_mercado_aberto"
  
  Candidate bindings: : "captacoes"
  
  LINE 36:         l.captacoes_mercado_aberto,
                   ^
[0m15:31:00.410201 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'b82d161d-1a3f-429c-813c-bd182d67f13f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CE195D8E0>]}
[0m15:31:00.410201 [error] [Thread-1 (]: 2 of 2 ERROR creating sql table model main.fato_balanco_patrimonial ............ [[31mERROR[0m in 0.03s]
[0m15:31:00.412377 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:31:00.412377 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_balanco_patrimonial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Binder Error: Table "l" does not have a column named "captacoes_mercado_aberto"
  
  Candidate bindings: : "captacoes"
  
  LINE 36:         l.captacoes_mercado_aberto,
                   ^.
[0m15:31:00.413922 [debug] [MainThread]: Using duckdb connection "master"
[0m15:31:00.414922 [debug] [MainThread]: On master: BEGIN
[0m15:31:00.415484 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:31:00.416584 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:31:00.416584 [debug] [MainThread]: On master: COMMIT
[0m15:31:00.417590 [debug] [MainThread]: Using duckdb connection "master"
[0m15:31:00.417590 [debug] [MainThread]: On master: COMMIT
[0m15:31:00.417590 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:31:00.417590 [debug] [MainThread]: On master: Close
[0m15:31:00.419330 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:31:00.419330 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:31:00.420338 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:31:00.420845 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_balanco_patrimonial' was properly closed.
[0m15:31:00.421365 [info ] [MainThread]: 
[0m15:31:00.421893 [info ] [MainThread]: Finished running 2 table models in 0 hours 0 minutes and 0.51 seconds (0.51s).
[0m15:31:00.422948 [debug] [MainThread]: Command end result
[0m15:31:00.456024 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:31:00.458620 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:31:00.463265 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:31:00.464774 [info ] [MainThread]: 
[0m15:31:00.465355 [info ] [MainThread]: [31mCompleted with 1 error, 0 partial successes, and 0 warnings:[0m
[0m15:31:00.465355 [info ] [MainThread]: 
[0m15:31:00.466362 [error] [MainThread]: [31mFailure in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)[0m
[0m15:31:00.466362 [error] [MainThread]:   Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Binder Error: Table "l" does not have a column named "captacoes_mercado_aberto"
  
  Candidate bindings: : "captacoes"
  
  LINE 36:         l.captacoes_mercado_aberto,
                   ^
[0m15:31:00.467435 [info ] [MainThread]: 
[0m15:31:00.467435 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_balanco_patrimonial.sql
[0m15:31:00.467435 [info ] [MainThread]: 
[0m15:31:00.467435 [info ] [MainThread]: Done. PASS=1 WARN=0 ERROR=1 SKIP=0 NO-OP=0 TOTAL=2
[0m15:31:00.469112 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 2 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m15:31:00.470318 [debug] [MainThread]: Command `dbt run` failed at 15:31:00.470318 after 2.25 seconds
[0m15:31:00.470318 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CD950EE10>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CD93D84A0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000013CD93D9F10>]}
[0m15:31:00.471324 [debug] [MainThread]: Flushing usage events
[0m15:31:01.121159 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:33:19.428157 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000191766B1A90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917C1BE570>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917C6BF920>]}


============================== 15:33:19.436857 | 9aa613ad-e578-4f03-8558-568581efa1b9 ==============================
[0m15:33:19.436857 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:33:19.437364 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt run --select dim_instituicao fato_balanco_patrimonial --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:33:19.699299 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '9aa613ad-e578-4f03-8558-568581efa1b9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917DC2C770>]}
[0m15:33:19.751021 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '9aa613ad-e578-4f03-8558-568581efa1b9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917DC43D70>]}
[0m15:33:19.753734 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:33:20.068065 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:33:20.289910 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 1 files changed.
[0m15:33:20.290961 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_balanco_patrimonial.sql
[0m15:33:20.621623 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on
'fato_balanco_patrimonial' in package 'bacen_ifdata_analytics'
(models\gold\schema.yml). Arguments to generic tests should be nested under the
`arguments` property.
[0m15:33:20.622628 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '9aa613ad-e578-4f03-8558-568581efa1b9', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917E4F0E60>]}
[0m15:33:20.758456 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:33:20.771765 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '9aa613ad-e578-4f03-8558-568581efa1b9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917E4F8C50>]}
[0m15:33:20.851703 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:33:20.855923 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:33:20.898572 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '9aa613ad-e578-4f03-8558-568581efa1b9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917E252060>]}
[0m15:33:20.899570 [info ] [MainThread]: Found 25 models, 10 seeds, 57 data tests, 33 sources, 590 macros
[0m15:33:20.900077 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '9aa613ad-e578-4f03-8558-568581efa1b9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917E33A8D0>]}
[0m15:33:20.902326 [info ] [MainThread]: 
[0m15:33:20.902326 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:33:20.902326 [info ] [MainThread]: 
[0m15:33:20.903843 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:33:20.907460 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:33:20.987094 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:33:20.987094 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:33:20.987094 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:33:21.783935 [debug] [ThreadPool]: SQL status: OK in 0.796 seconds
[0m15:33:21.786452 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:33:21.787967 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:33:21.788965 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:33:21.798296 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:33:21.798296 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:33:21.799809 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:33:21.801317 [debug] [ThreadPool]: SQL status: OK in 0.002 seconds
[0m15:33:21.802574 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:33:21.804812 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:33:21.805822 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:33:21.805822 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:33:21.805822 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:33:21.807533 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:33:21.808829 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:33:21.809620 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:33:21.810158 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:33:21.810703 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:33:21.810703 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:33:21.815214 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:33:21.825496 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:33:21.825496 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:33:21.826504 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:33:21.826504 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:33:21.827506 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:33:21.827506 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:33:21.860396 [debug] [ThreadPool]: SQL status: OK in 0.032 seconds
[0m15:33:21.862395 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:33:21.865396 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:33:21.866396 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:33:21.868398 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '9aa613ad-e578-4f03-8558-568581efa1b9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917E1EB0E0>]}
[0m15:33:21.869835 [debug] [MainThread]: Using duckdb connection "master"
[0m15:33:21.869835 [debug] [MainThread]: On master: BEGIN
[0m15:33:21.869835 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:33:21.870842 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:33:21.871846 [debug] [MainThread]: On master: COMMIT
[0m15:33:21.871846 [debug] [MainThread]: Using duckdb connection "master"
[0m15:33:21.872842 [debug] [MainThread]: On master: COMMIT
[0m15:33:21.873846 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:33:21.873846 [debug] [MainThread]: On master: Close
[0m15:33:21.917685 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:33:21.918687 [info ] [Thread-1 (]: 1 of 2 START sql table model main.dim_instituicao .............................. [RUN]
[0m15:33:21.924208 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m15:33:21.925205 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m15:33:21.938844 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:33:21.940839 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m15:33:21.978831 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:33:21.979830 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:33:21.979830 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m15:33:21.980833 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:33:21.981828 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:33:21.981828 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:33:21.982832 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT DISTINCT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
    );
  
  
[0m15:33:22.116357 [debug] [Thread-1 (]: SQL status: OK in 0.133 seconds
[0m15:33:22.122806 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:33:22.122806 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m15:33:22.124816 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:33:22.125818 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:33:22.126817 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m15:33:22.127831 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:33:22.137872 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:33:22.137872 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m15:33:22.139879 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:33:22.144766 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:33:22.145068 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m15:33:22.146078 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:33:22.166363 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:33:22.166877 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:33:22.167404 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:33:22.192306 [debug] [Thread-1 (]: SQL status: OK in 0.024 seconds
[0m15:33:22.201342 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:33:22.201849 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m15:33:22.204478 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:33:22.207119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m15:33:22.210747 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9aa613ad-e578-4f03-8558-568581efa1b9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917E8A35F0>]}
[0m15:33:22.211893 [info ] [Thread-1 (]: 1 of 2 OK created sql table model main.dim_instituicao ......................... [[32mOK[0m in 0.28s]
[0m15:33:22.213596 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:33:22.214123 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:33:22.215226 [info ] [Thread-1 (]: 2 of 2 START sql table model main.fato_balanco_patrimonial ..................... [RUN]
[0m15:33:22.216286 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m15:33:22.217343 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:33:22.223196 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:33:22.225413 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:33:22.229955 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:33:22.230962 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:33:22.230962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m15:33:22.230962 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:33:22.232920 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:33:22.233929 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:33:22.233929 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido, -- Fixed missing comma from previous logic just in case? No, it looks correct
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:33:22.244237 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido, -- Fixed missing comma from previous logic just in case? No, it looks correct
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:33:22.244781 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:33:22.244781 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: ROLLBACK
[0m15:33:22.253578 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_balanco_patrimonial'
[0m15:33:22.254169 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m15:33:22.256290 [debug] [Thread-1 (]: Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Binder Error: Table "l" does not have a column named "outras_obrigacoes"
  
  Candidate bindings: : "outras_obrigações"
  
  LINE 40:         l.outras_obrigacoes,
                   ^
[0m15:33:22.256290 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9aa613ad-e578-4f03-8558-568581efa1b9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917F991670>]}
[0m15:33:22.257799 [error] [Thread-1 (]: 2 of 2 ERROR creating sql table model main.fato_balanco_patrimonial ............ [[31mERROR[0m in 0.04s]
[0m15:33:22.257799 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:33:22.258806 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_balanco_patrimonial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Binder Error: Table "l" does not have a column named "outras_obrigacoes"
  
  Candidate bindings: : "outras_obrigações"
  
  LINE 40:         l.outras_obrigacoes,
                   ^.
[0m15:33:22.260310 [debug] [MainThread]: Using duckdb connection "master"
[0m15:33:22.260310 [debug] [MainThread]: On master: BEGIN
[0m15:33:22.261853 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:33:22.262987 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:33:22.262987 [debug] [MainThread]: On master: COMMIT
[0m15:33:22.262987 [debug] [MainThread]: Using duckdb connection "master"
[0m15:33:22.262987 [debug] [MainThread]: On master: COMMIT
[0m15:33:22.263995 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:33:22.263995 [debug] [MainThread]: On master: Close
[0m15:33:22.263995 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:33:22.263995 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:33:22.264996 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:33:22.264996 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_balanco_patrimonial' was properly closed.
[0m15:33:22.265502 [info ] [MainThread]: 
[0m15:33:22.265502 [info ] [MainThread]: Finished running 2 table models in 0 hours 0 minutes and 1.36 seconds (1.36s).
[0m15:33:22.267018 [debug] [MainThread]: Command end result
[0m15:33:22.308754 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:33:22.311484 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:33:22.317346 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:33:22.317346 [info ] [MainThread]: 
[0m15:33:22.317870 [info ] [MainThread]: [31mCompleted with 1 error, 0 partial successes, and 0 warnings:[0m
[0m15:33:22.318397 [info ] [MainThread]: 
[0m15:33:22.319564 [error] [MainThread]: [31mFailure in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)[0m
[0m15:33:22.320112 [error] [MainThread]:   Runtime Error in model fato_balanco_patrimonial (models\gold\fato_balanco_patrimonial.sql)
  Binder Error: Table "l" does not have a column named "outras_obrigacoes"
  
  Candidate bindings: : "outras_obrigações"
  
  LINE 40:         l.outras_obrigacoes,
                   ^
[0m15:33:22.320652 [info ] [MainThread]: 
[0m15:33:22.321172 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_balanco_patrimonial.sql
[0m15:33:22.321172 [info ] [MainThread]: 
[0m15:33:22.321172 [info ] [MainThread]: Done. PASS=1 WARN=0 ERROR=1 SKIP=0 NO-OP=0 TOTAL=2
[0m15:33:22.322756 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 2 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m15:33:22.323762 [debug] [MainThread]: Command `dbt run` failed at 15:33:22.323762 after 3.24 seconds
[0m15:33:22.324762 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917CBBDA60>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917C8093D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001917C80A390>]}
[0m15:33:22.324762 [debug] [MainThread]: Flushing usage events
[0m15:33:23.107444 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:34:26.654127 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E062AF0E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E089A4E30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E04C4FEC0>]}


============================== 15:34:26.665501 | 193bc173-0c33-43de-941f-38d430a6f0be ==============================
[0m15:34:26.665501 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:34:26.666534 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt run --select dim_instituicao fato_balanco_patrimonial --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:34:27.172252 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '193bc173-0c33-43de-941f-38d430a6f0be', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E07D81BB0>]}
[0m15:34:27.265653 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '193bc173-0c33-43de-941f-38d430a6f0be', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E082E0440>]}
[0m15:34:27.272693 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:34:27.569500 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:34:27.770061 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 1 files changed.
[0m15:34:27.771657 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_balanco_patrimonial.sql
[0m15:34:28.066565 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on
'fato_balanco_patrimonial' in package 'bacen_ifdata_analytics'
(models\gold\schema.yml). Arguments to generic tests should be nested under the
`arguments` property.
[0m15:34:28.067609 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '193bc173-0c33-43de-941f-38d430a6f0be', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E0A5C3DD0>]}
[0m15:34:28.192820 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:34:28.206150 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '193bc173-0c33-43de-941f-38d430a6f0be', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E0A5BB8F0>]}
[0m15:34:28.292693 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:34:28.295449 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:34:28.346737 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '193bc173-0c33-43de-941f-38d430a6f0be', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E0A4DFAD0>]}
[0m15:34:28.346737 [info ] [MainThread]: Found 25 models, 10 seeds, 57 data tests, 33 sources, 590 macros
[0m15:34:28.347274 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '193bc173-0c33-43de-941f-38d430a6f0be', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E0A4FD580>]}
[0m15:34:28.349898 [info ] [MainThread]: 
[0m15:34:28.350566 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:34:28.350566 [info ] [MainThread]: 
[0m15:34:28.351082 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:34:28.354702 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:34:28.431306 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:34:28.431817 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:34:28.432324 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:34:29.152451 [debug] [ThreadPool]: SQL status: OK in 0.720 seconds
[0m15:34:29.154041 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:34:29.154614 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:34:29.155148 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:34:29.158719 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:34:29.160226 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:34:29.160226 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:34:29.160226 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:34:29.162944 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:34:29.162944 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:34:29.163472 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:34:29.164028 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:34:29.164028 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:34:29.165046 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:34:29.165564 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:34:29.166091 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:34:29.166091 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:34:29.166616 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:34:29.167139 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:34:29.169219 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:34:29.173857 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:34:29.173857 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:34:29.174856 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:34:29.174856 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:34:29.174856 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:34:29.175855 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:34:29.194469 [debug] [ThreadPool]: SQL status: OK in 0.018 seconds
[0m15:34:29.196534 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:34:29.198644 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:34:29.199170 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:34:29.199698 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '193bc173-0c33-43de-941f-38d430a6f0be', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E0A5BA030>]}
[0m15:34:29.201208 [debug] [MainThread]: Using duckdb connection "master"
[0m15:34:29.201766 [debug] [MainThread]: On master: BEGIN
[0m15:34:29.201766 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:34:29.202311 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:34:29.202311 [debug] [MainThread]: On master: COMMIT
[0m15:34:29.202311 [debug] [MainThread]: Using duckdb connection "master"
[0m15:34:29.202311 [debug] [MainThread]: On master: COMMIT
[0m15:34:29.203316 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:34:29.203819 [debug] [MainThread]: On master: Close
[0m15:34:29.207453 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:34:29.208456 [info ] [Thread-1 (]: 1 of 2 START sql table model main.dim_instituicao .............................. [RUN]
[0m15:34:29.208456 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m15:34:29.208456 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m15:34:29.217128 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:34:29.218136 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m15:34:29.243469 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:34:29.245486 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:34:29.245486 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m15:34:29.245486 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:34:29.246483 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:34:29.247534 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:34:29.247534 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT DISTINCT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
    );
  
  
[0m15:34:29.362908 [debug] [Thread-1 (]: SQL status: OK in 0.115 seconds
[0m15:34:29.367642 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:34:29.367642 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m15:34:29.369202 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:34:29.370302 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:34:29.370302 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m15:34:29.371307 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:34:29.376994 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:34:29.377518 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m15:34:29.378581 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:34:29.382313 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:34:29.382896 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m15:34:29.384523 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:34:29.400670 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:34:29.401183 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:34:29.401183 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:34:29.417337 [debug] [Thread-1 (]: SQL status: OK in 0.017 seconds
[0m15:34:29.423187 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:34:29.423187 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m15:34:29.424193 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:34:29.426791 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m15:34:29.428296 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '193bc173-0c33-43de-941f-38d430a6f0be', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E07D81340>]}
[0m15:34:29.429300 [info ] [Thread-1 (]: 1 of 2 OK created sql table model main.dim_instituicao ......................... [[32mOK[0m in 0.22s]
[0m15:34:29.429300 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:34:29.430307 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:34:29.430812 [info ] [Thread-1 (]: 2 of 2 START sql table model main.fato_balanco_patrimonial ..................... [RUN]
[0m15:34:29.430812 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m15:34:29.430812 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:34:29.434872 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:34:29.435872 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:34:29.438241 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:34:29.438241 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:34:29.439747 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m15:34:29.439747 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:34:29.439747 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:34:29.440754 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:34:29.441339 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:34:29.886822 [debug] [Thread-1 (]: SQL status: OK in 0.445 seconds
[0m15:34:29.890896 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:34:29.890896 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m15:34:29.891896 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:34:29.893017 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m15:34:29.893622 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:34:29.894137 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m15:34:30.065659 [debug] [Thread-1 (]: SQL status: OK in 0.171 seconds
[0m15:34:30.069601 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:34:30.069601 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m15:34:30.071580 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:34:30.073473 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m15:34:30.074481 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '193bc173-0c33-43de-941f-38d430a6f0be', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E10992000>]}
[0m15:34:30.074987 [info ] [Thread-1 (]: 2 of 2 OK created sql table model main.fato_balanco_patrimonial ................ [[32mOK[0m in 0.64s]
[0m15:34:30.077000 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:34:30.079011 [debug] [MainThread]: Using duckdb connection "master"
[0m15:34:30.079516 [debug] [MainThread]: On master: BEGIN
[0m15:34:30.079516 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:34:30.080523 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:34:30.081523 [debug] [MainThread]: On master: COMMIT
[0m15:34:30.081523 [debug] [MainThread]: Using duckdb connection "master"
[0m15:34:30.081523 [debug] [MainThread]: On master: COMMIT
[0m15:34:30.083030 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:34:30.083030 [debug] [MainThread]: On master: Close
[0m15:34:30.083030 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:34:30.083030 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:34:30.084553 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:34:30.084553 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_balanco_patrimonial' was properly closed.
[0m15:34:30.084553 [info ] [MainThread]: 
[0m15:34:30.085497 [info ] [MainThread]: Finished running 2 table models in 0 hours 0 minutes and 1.73 seconds (1.73s).
[0m15:34:30.086504 [debug] [MainThread]: Command end result
[0m15:34:30.169904 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:34:30.174912 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:34:30.182428 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:34:30.183428 [info ] [MainThread]: 
[0m15:34:30.186631 [info ] [MainThread]: [32mCompleted successfully[0m
[0m15:34:30.187638 [info ] [MainThread]: 
[0m15:34:30.187638 [info ] [MainThread]: Done. PASS=2 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=2
[0m15:34:30.188638 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 2 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m15:34:30.192151 [debug] [MainThread]: Command `dbt run` succeeded at 15:34:30.192151 after 3.71 seconds
[0m15:34:30.193160 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E08844CE0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E07FDA120>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023E0845E210>]}
[0m15:34:30.193665 [debug] [MainThread]: Flushing usage events
[0m15:34:33.986195 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:34:59.408219 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000210D72C9550>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000210D72CAF90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000210D72CB800>]}


============================== 15:34:59.413044 | 4af6996a-f9d4-44ab-b481-ecc203ad6682 ==============================
[0m15:34:59.413044 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:34:59.413044 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt test --select dim_instituicao fato_balanco_patrimonial --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:34:59.622825 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '4af6996a-f9d4-44ab-b481-ecc203ad6682', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000210D9428470>]}
[0m15:34:59.673862 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '4af6996a-f9d4-44ab-b481-ecc203ad6682', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000210D4E0AAE0>]}
[0m15:34:59.678736 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:34:59.938728 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:35:00.291921 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m15:35:00.292931 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m15:35:00.293439 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m15:35:00.306691 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:35:00.379630 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '4af6996a-f9d4-44ab-b481-ecc203ad6682', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000210D9577110>]}
[0m15:35:00.499535 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:35:00.504997 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:35:00.632379 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '4af6996a-f9d4-44ab-b481-ecc203ad6682', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000210D99AD070>]}
[0m15:35:00.632888 [info ] [MainThread]: Found 25 models, 10 seeds, 57 data tests, 33 sources, 590 macros
[0m15:35:00.633896 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '4af6996a-f9d4-44ab-b481-ecc203ad6682', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000210D97D99A0>]}
[0m15:35:00.637931 [info ] [MainThread]: 
[0m15:35:00.638932 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:35:00.638932 [info ] [MainThread]: 
[0m15:35:00.639933 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:35:00.647813 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:35:00.732745 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:35:00.734383 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:35:00.734383 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:35:00.849546 [debug] [ThreadPool]: SQL status: OK in 0.115 seconds
[0m15:35:00.849546 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:35:00.849546 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:35:00.861631 [debug] [ThreadPool]: SQL status: OK in 0.011 seconds
[0m15:35:00.862644 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:35:00.864675 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:35:00.865180 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:35:00.866690 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '4af6996a-f9d4-44ab-b481-ecc203ad6682', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000210D99ACDD0>]}
[0m15:35:00.867286 [debug] [MainThread]: Using duckdb connection "master"
[0m15:35:00.867286 [debug] [MainThread]: On master: BEGIN
[0m15:35:00.867286 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:35:00.868293 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:35:00.868293 [debug] [MainThread]: On master: COMMIT
[0m15:35:00.868293 [debug] [MainThread]: Using duckdb connection "master"
[0m15:35:00.869293 [debug] [MainThread]: On master: COMMIT
[0m15:35:00.869293 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:35:00.869798 [debug] [MainThread]: On master: Close
[0m15:35:00.874496 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:35:00.874496 [info ] [Thread-1 (]: 1 of 18 START test not_null_dim_instituicao_id_instituicao ..................... [RUN]
[0m15:35:00.875529 [debug] [Thread-1 (]: Acquiring new duckdb connection 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m15:35:00.875529 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:35:00.887907 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:35:00.888960 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:35:00.902263 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:35:00.903266 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:35:00.903266 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m15:35:00.903769 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:35:00.904375 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:00.904375 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:35:00.904997 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:35:00.906020 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:00.910136 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m15:35:00.910136 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m15:35:00.910136 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m15:35:00.912137 [info ] [Thread-1 (]: 1 of 18 PASS not_null_dim_instituicao_id_instituicao ........................... [[32mPASS[0m in 0.04s]
[0m15:35:00.912731 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:35:00.913258 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:35:00.914346 [info ] [Thread-1 (]: 2 of 18 START test not_null_dim_instituicao_id_localizacao ..................... [RUN]
[0m15:35:00.914902 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m15:35:00.915423 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:35:00.917569 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:35:00.919685 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:35:00.921768 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:35:00.922274 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:35:00.922879 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m15:35:00.923463 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:00.923463 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:00.923463 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:35:00.924474 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m15:35:00.924474 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:35:00.926470 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m15:35:00.926470 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m15:35:00.926470 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m15:35:00.927978 [info ] [Thread-1 (]: 2 of 18 PASS not_null_dim_instituicao_id_localizacao ........................... [[32mPASS[0m in 0.01s]
[0m15:35:00.927978 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:35:00.927978 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:35:00.929529 [info ] [Thread-1 (]: 3 of 18 START test not_null_fato_balanco_patrimonial_id_data ................... [RUN]
[0m15:35:00.929529 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m15:35:00.929529 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:35:00.932671 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:35:00.932671 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:35:00.934260 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:35:00.936850 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:35:00.937360 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m15:35:00.937360 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:00.938367 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:00.938992 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:35:00.938992 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:35:00.940510 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:00.942020 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m15:35:00.942020 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m15:35:00.943034 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m15:35:00.943546 [info ] [Thread-1 (]: 3 of 18 PASS not_null_fato_balanco_patrimonial_id_data ......................... [[32mPASS[0m in 0.01s]
[0m15:35:00.944706 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:35:00.945717 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:35:00.945717 [info ] [Thread-1 (]: 4 of 18 START test not_null_fato_balanco_patrimonial_id_instituicao ............ [RUN]
[0m15:35:00.946713 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m15:35:00.947221 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:35:00.952300 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:35:00.953304 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:35:00.956073 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:35:00.957584 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:35:00.957584 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m15:35:00.958589 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:00.958589 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:35:00.958589 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:35:00.958589 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:35:00.960093 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:35:00.960093 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m15:35:00.961626 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m15:35:00.961626 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m15:35:00.962631 [info ] [Thread-1 (]: 4 of 18 PASS not_null_fato_balanco_patrimonial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m15:35:00.962631 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:35:00.963668 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:35:00.963668 [info ] [Thread-1 (]: 5 of 18 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m15:35:00.964667 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m15:35:00.964667 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:35:00.972785 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:35:00.973315 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:35:00.975720 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:35:00.976769 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:35:00.977282 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m15:35:00.977282 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:00.977832 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:35:00.978343 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:35:00.978343 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:00.987787 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:00.987787 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:35:00.988793 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m15:35:00.995355 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m15:35:00.995355 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m15:35:00.998447 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_classe_instituicao"
                    ^
[0m15:35:00.998447 [error] [Thread-1 (]: 5 of 18 ERROR relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[31mERROR[0m in 0.03s]
[0m15:35:00.999958 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:35:00.999958 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:35:00.999958 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_classe_instituicao"
                    ^.
[0m15:35:01.000967 [info ] [Thread-1 (]: 6 of 18 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m15:35:01.002165 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m15:35:01.002165 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:35:01.007975 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:35:01.008982 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:35:01.011495 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:35:01.013045 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:35:01.013045 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m15:35:01.013045 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.014048 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:01.015050 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:35:01.015557 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.016566 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.017071 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:35:01.017585 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m15:35:01.019635 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m15:35:01.020176 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m15:35:01.022698 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_consolidado"
                    ^
[0m15:35:01.022698 [error] [Thread-1 (]: 6 of 18 ERROR relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[31mERROR[0m in 0.02s]
[0m15:35:01.024369 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:35:01.024900 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:35:01.025434 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_consolidado"
                    ^.
[0m15:35:01.025973 [info ] [Thread-1 (]: 7 of 18 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m15:35:01.026505 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m15:35:01.027030 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:35:01.031163 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:35:01.032679 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:35:01.035037 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:35:01.036617 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:35:01.036617 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m15:35:01.037151 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.037151 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:01.038163 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:35:01.038163 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.039163 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.039163 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:35:01.040157 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m15:35:01.042738 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m15:35:01.042738 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m15:35:01.044856 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "seed_dim_controle"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_controle"
                    ^
[0m15:35:01.044856 [error] [Thread-1 (]: 7 of 18 ERROR relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[31mERROR[0m in 0.02s]
[0m15:35:01.045861 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:35:01.045861 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:35:01.047368 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "seed_dim_controle"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_controle"
                    ^.
[0m15:35:01.047986 [info ] [Thread-1 (]: 8 of 18 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m15:35:01.048645 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m15:35:01.048645 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:35:01.052286 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:35:01.053803 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:35:01.055929 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:35:01.057497 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:35:01.057497 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m15:35:01.058023 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.058543 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:01.058543 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:35:01.058543 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.063301 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m15:35:01.064816 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m15:35:01.065381 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m15:35:01.065381 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m15:35:01.066387 [error] [Thread-1 (]: 8 of 18 FAIL 3 relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[31mFAIL 3[0m in 0.02s]
[0m15:35:01.066387 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:35:01.066387 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:35:01.066387 [info ] [Thread-1 (]: 9 of 18 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m15:35:01.067857 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m15:35:01.067857 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:35:01.074011 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:35:01.076014 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:35:01.078508 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:35:01.079514 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:35:01.080019 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m15:35:01.080019 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.080019 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:35:01.081024 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:35:01.081024 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.081024 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.081024 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:35:01.082603 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m15:35:01.084197 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m15:35:01.084197 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m15:35:01.087332 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "dim_tempo"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_segmento"
                    ^
[0m15:35:01.087332 [error] [Thread-1 (]: 9 of 18 ERROR relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[31mERROR[0m in 0.02s]
[0m15:35:01.088339 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:35:01.088339 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:35:01.089844 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "dim_tempo"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_segmento"
                    ^.
[0m15:35:01.088339 [info ] [Thread-1 (]: 10 of 18 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:35:01.089844 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m15:35:01.090850 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:35:01.094964 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:35:01.096976 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:35:01.101475 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:35:01.102045 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:35:01.103601 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m15:35:01.104181 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.104895 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:01.104895 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:35:01.104895 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.111843 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m15:35:01.114237 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m15:35:01.115321 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m15:35:01.115849 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m15:35:01.116912 [info ] [Thread-1 (]: 10 of 18 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m15:35:01.117443 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:35:01.117975 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:35:01.117975 [info ] [Thread-1 (]: 11 of 18 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:35:01.118981 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m15:35:01.118981 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:35:01.123857 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:35:01.125414 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:35:01.126415 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:35:01.127919 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:35:01.127919 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m15:35:01.129506 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.129506 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:35:01.129506 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:35:01.129506 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.153935 [debug] [Thread-1 (]: SQL status: OK in 0.023 seconds
[0m15:35:01.155601 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m15:35:01.156111 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m15:35:01.157119 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m15:35:01.157622 [info ] [Thread-1 (]: 11 of 18 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m15:35:01.158630 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:35:01.158630 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:35:01.158630 [info ] [Thread-1 (]: 12 of 18 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:35:01.158630 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m15:35:01.160139 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:35:01.163218 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:35:01.164728 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:35:01.166329 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:35:01.167344 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:35:01.167344 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m15:35:01.167344 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.168909 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:01.168909 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:35:01.169533 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.170185 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.170857 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:35:01.171383 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m15:35:01.175388 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m15:35:01.175910 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m15:35:01.179017 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "fato_balanco_patrimonial"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^
[0m15:35:01.179530 [error] [Thread-1 (]: 12 of 18 ERROR relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:35:01.179530 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:35:01.181119 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:35:01.181119 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "fato_balanco_patrimonial"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^.
[0m15:35:01.181119 [info ] [Thread-1 (]: 13 of 18 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:35:01.182730 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m15:35:01.182730 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:35:01.187015 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:35:01.188024 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:35:01.190023 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:35:01.190528 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:35:01.190528 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m15:35:01.190528 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.192034 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:01.192034 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:35:01.193042 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.194051 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.194051 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:35:01.194620 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m15:35:01.197138 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m15:35:01.197138 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m15:35:01.199145 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^
[0m15:35:01.200189 [error] [Thread-1 (]: 13 of 18 ERROR relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:35:01.201467 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:35:01.202136 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:35:01.202136 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^.
[0m15:35:01.202695 [info ] [Thread-1 (]: 14 of 18 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:35:01.203262 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m15:35:01.203792 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:35:01.207534 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:35:01.208538 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:35:01.210046 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:35:01.211716 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:35:01.212722 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m15:35:01.212722 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.212722 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:35:01.213802 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:35:01.213802 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.214800 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.214800 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:35:01.215302 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m15:35:01.217879 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m15:35:01.218889 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m15:35:01.220178 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^
[0m15:35:01.221184 [error] [Thread-1 (]: 14 of 18 ERROR relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:35:01.221184 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:35:01.221184 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:35:01.222738 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^.
[0m15:35:01.223747 [info ] [Thread-1 (]: 15 of 18 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:35:01.223747 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m15:35:01.223747 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:35:01.229259 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:35:01.230311 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:35:01.232856 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:35:01.232856 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:35:01.234373 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m15:35:01.234373 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.234373 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:01.234373 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:35:01.235919 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.236929 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.236929 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:35:01.237438 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m15:35:01.239956 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m15:35:01.240488 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m15:35:01.242652 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^
[0m15:35:01.243192 [error] [Thread-1 (]: 15 of 18 ERROR relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:35:01.244285 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:35:01.244285 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:35:01.244803 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^.
[0m15:35:01.245341 [info ] [Thread-1 (]: 16 of 18 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:35:01.245341 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m15:35:01.246868 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:35:01.249579 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:35:01.252272 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:35:01.254883 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:35:01.255889 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:35:01.256394 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m15:35:01.256394 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.256898 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:35:01.257469 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:35:01.257469 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.263103 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m15:35:01.264609 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m15:35:01.265737 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m15:35:01.266323 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m15:35:01.266947 [info ] [Thread-1 (]: 16 of 18 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m15:35:01.267463 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:35:01.267463 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:35:01.267463 [info ] [Thread-1 (]: 17 of 18 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:35:01.267463 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m15:35:01.267463 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:35:01.272724 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:35:01.273729 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:35:01.275740 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:35:01.276735 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:35:01.276735 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m15:35:01.277731 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.278840 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:35:01.279348 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:35:01.279348 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.280915 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:35:01.281536 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:35:01.282057 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m15:35:01.284340 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m15:35:01.284919 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m15:35:01.286944 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "fato_balanco_patrimonial"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_resumo_financeiro"
                    ^
[0m15:35:01.286944 [error] [Thread-1 (]: 17 of 18 ERROR relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:35:01.287949 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:35:01.287949 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:35:01.287949 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "fato_balanco_patrimonial"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_resumo_financeiro"
                    ^.
[0m15:35:01.288950 [info ] [Thread-1 (]: 18 of 18 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m15:35:01.289952 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m15:35:01.289952 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:35:01.294657 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:35:01.295663 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:35:01.297728 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:35:01.299245 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:35:01.300256 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m15:35:01.300256 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:35:01.300256 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:35:01.300256 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:35:01.301257 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:35:01.308402 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m15:35:01.309908 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m15:35:01.310456 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m15:35:01.310456 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m15:35:01.311462 [error] [Thread-1 (]: 18 of 18 FAIL 3859 unique_dim_instituicao_id_instituicao ....................... [[31mFAIL 3859[0m in 0.02s]
[0m15:35:01.312472 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:35:01.313005 [debug] [MainThread]: Using duckdb connection "master"
[0m15:35:01.314012 [debug] [MainThread]: On master: BEGIN
[0m15:35:01.314012 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:35:01.314012 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:35:01.315009 [debug] [MainThread]: On master: COMMIT
[0m15:35:01.315009 [debug] [MainThread]: Using duckdb connection "master"
[0m15:35:01.315512 [debug] [MainThread]: On master: COMMIT
[0m15:35:01.315512 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:35:01.315512 [debug] [MainThread]: On master: Close
[0m15:35:01.315512 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:35:01.316518 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:35:01.316518 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37' was properly closed.
[0m15:35:01.317024 [info ] [MainThread]: 
[0m15:35:01.317528 [info ] [MainThread]: Finished running 18 data tests in 0 hours 0 minutes and 0.68 seconds (0.68s).
[0m15:35:01.320303 [debug] [MainThread]: Command end result
[0m15:35:01.360166 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:35:01.364875 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:35:01.371575 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:35:01.371575 [info ] [MainThread]: 
[0m15:35:01.372637 [info ] [MainThread]: [31mCompleted with 11 errors, 0 partial successes, and 0 warnings:[0m
[0m15:35:01.373204 [info ] [MainThread]: 
[0m15:35:01.373732 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)[0m
[0m15:35:01.374254 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_classe_instituicao"
                    ^
[0m15:35:01.374254 [info ] [MainThread]: 
[0m15:35:01.375261 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_b5bf1250f8e22e22ed6029d8a9776333.sql
[0m15:35:01.376261 [info ] [MainThread]: 
[0m15:35:01.376261 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)[0m
[0m15:35:01.376261 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_consolidado"
                    ^
[0m15:35:01.377262 [info ] [MainThread]: 
[0m15:35:01.378262 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_0eacdd127a052df6ef946b12273a2332.sql
[0m15:35:01.378262 [info ] [MainThread]: 
[0m15:35:01.378769 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)[0m
[0m15:35:01.379274 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "seed_dim_controle"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_controle"
                    ^
[0m15:35:01.379274 [info ] [MainThread]: 
[0m15:35:01.380282 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_9713fcede76412e01759a305783eeec2.sql
[0m15:35:01.380282 [info ] [MainThread]: 
[0m15:35:01.381279 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)[0m
[0m15:35:01.381786 [error] [MainThread]:   Got 3 results, configured to fail if != 0
[0m15:35:01.381786 [info ] [MainThread]: 
[0m15:35:01.381786 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_446031b84e0fad1bdbfdd1cf73647908.sql
[0m15:35:01.382791 [info ] [MainThread]: 
[0m15:35:01.382791 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)[0m
[0m15:35:01.383799 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "dim_tempo"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_segmento"
                    ^
[0m15:35:01.383799 [info ] [MainThread]: 
[0m15:35:01.384306 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_cf3f8176c8c99f31e0910db0802babb1.sql
[0m15:35:01.384306 [info ] [MainThread]: 
[0m15:35:01.384306 [error] [MainThread]: [31mFailure in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:35:01.385811 [error] [MainThread]:   Runtime Error in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "fato_balanco_patrimonial"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^
[0m15:35:01.385811 [info ] [MainThread]: 
[0m15:35:01.386820 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_capital_pru_dc7c09807e22eeacb03b88bc50c11898.sql
[0m15:35:01.386820 [info ] [MainThread]: 
[0m15:35:01.387876 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:35:01.387876 [error] [MainThread]:   Runtime Error in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^
[0m15:35:01.388874 [info ] [MainThread]: 
[0m15:35:01.388874 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_d80151d1e76d6c8de6ceccc7adebe863.sql
[0m15:35:01.389874 [info ] [MainThread]: 
[0m15:35:01.390383 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:35:01.390383 [error] [MainThread]:   Runtime Error in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^
[0m15:35:01.391900 [info ] [MainThread]: 
[0m15:35:01.391900 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_b00506d5726bd2130bedc66dca5f83d0.sql
[0m15:35:01.392910 [info ] [MainThread]: 
[0m15:35:01.393938 [error] [MainThread]: [31mFailure in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:35:01.394463 [error] [MainThread]:   Runtime Error in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^
[0m15:35:01.394981 [info ] [MainThread]: 
[0m15:35:01.394981 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_demonstraca_db359e0c9415ad5a3f4bbc17154e2e4a.sql
[0m15:35:01.396048 [info ] [MainThread]: 
[0m15:35:01.396580 [error] [MainThread]: [31mFailure in test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:35:01.397114 [error] [MainThread]:   Runtime Error in test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_resumo_financeiro does not exist!
  Did you mean "fato_balanco_patrimonial"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_resumo_financeiro"
                    ^
[0m15:35:01.397645 [info ] [MainThread]: 
[0m15:35:01.398174 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_resumo_fina_33b8ef218f06d998e4f59856b293d2fa.sql
[0m15:35:01.398174 [info ] [MainThread]: 
[0m15:35:01.398174 [error] [MainThread]: [31mFailure in test unique_dim_instituicao_id_instituicao (models\gold\schema.yml)[0m
[0m15:35:01.399688 [error] [MainThread]:   Got 3859 results, configured to fail if != 0
[0m15:35:01.399688 [info ] [MainThread]: 
[0m15:35:01.399688 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\unique_dim_instituicao_id_instituicao.sql
[0m15:35:01.401247 [info ] [MainThread]: 
[0m15:35:01.401247 [info ] [MainThread]: Done. PASS=7 WARN=0 ERROR=11 SKIP=0 NO-OP=0 TOTAL=18
[0m15:35:01.402368 [debug] [MainThread]: Command `dbt test` failed at 15:35:01.402368 after 2.13 seconds
[0m15:35:01.402368 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000210D9E60560>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000210D79D3230>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000210D79D29F0>]}
[0m15:35:01.403376 [debug] [MainThread]: Flushing usage events
[0m15:35:02.066385 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:36:53.960233 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002B398CC0FB0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002B39939D400>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002B398CC0C80>]}


============================== 15:36:53.969954 | ba8336a0-f877-4f46-8c55-25d8bf071390 ==============================
[0m15:36:53.969954 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:36:53.971822 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'invocation_command': 'dbt compile --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:36:53.980147 [error] [MainThread]: Encountered an error:
Parsing Error
  Env var required but not provided: 'GOLD_DB_PATH'
[0m15:36:53.982035 [debug] [MainThread]: Command `dbt compile` failed at 15:36:53.982035 after 0.27 seconds
[0m15:36:53.982684 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002B3998E5820>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002B399B84AA0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002B399487620>]}
[0m15:36:53.982684 [debug] [MainThread]: Flushing usage events
[0m15:36:56.835825 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:37:10.360191 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025820BFDF10>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025822E44AD0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025823987530>]}


============================== 15:37:10.367255 | 03d77614-8c1c-47dc-b838-fa512980e8e1 ==============================
[0m15:37:10.367255 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:37:10.367763 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:37:10.702130 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025820CDEEA0>]}
[0m15:37:10.798435 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000258239FC7A0>]}
[0m15:37:10.802072 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:37:11.097207 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:37:11.281212 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m15:37:11.281212 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m15:37:11.281212 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m15:37:11.288697 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:37:11.331649 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025825533980>]}
[0m15:37:11.416159 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:37:11.417818 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:37:11.534324 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000258258C3500>]}
[0m15:37:11.535885 [info ] [MainThread]: Found 25 models, 10 seeds, 57 data tests, 33 sources, 590 macros
[0m15:37:11.544407 [info ] [MainThread]: 
[0m15:37:11.544921 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:37:11.544921 [info ] [MainThread]: 
[0m15:37:11.544921 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:37:11.549515 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:37:11.629627 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:37:11.630159 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:37:11.630697 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:37:12.306227 [debug] [ThreadPool]: SQL status: OK in 0.676 seconds
[0m15:37:12.307449 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:37:12.308829 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:37:12.309358 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:37:12.315100 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:37:12.315100 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:37:12.315685 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:37:12.316742 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:37:12.317794 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:37:12.317794 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:37:12.317794 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:37:12.317794 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:37:12.317794 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:37:12.319301 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:37:12.319301 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:37:12.320326 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:37:12.320326 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:37:12.320326 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:37:12.320326 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:37:12.323039 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:37:12.328050 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:37:12.328050 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:37:12.329735 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:37:12.329735 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:37:12.329735 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:37:12.329735 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:37:12.348218 [debug] [ThreadPool]: SQL status: OK in 0.017 seconds
[0m15:37:12.349267 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:37:12.350803 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:37:12.350803 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:37:12.352315 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002582432C2F0>]}
[0m15:37:12.352315 [debug] [MainThread]: Using duckdb connection "master"
[0m15:37:12.353655 [debug] [MainThread]: On master: BEGIN
[0m15:37:12.353655 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:37:12.355242 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:37:12.355242 [debug] [MainThread]: On master: COMMIT
[0m15:37:12.356252 [debug] [MainThread]: Using duckdb connection "master"
[0m15:37:12.356252 [debug] [MainThread]: On master: COMMIT
[0m15:37:12.357744 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:37:12.358279 [debug] [MainThread]: On master: Close
[0m15:37:12.381254 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:37:12.388797 [info ] [Thread-1 (]: 1 of 92 START sql table model main.dim_instituicao ............................. [RUN]
[0m15:37:12.398317 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m15:37:12.399206 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m15:37:12.417304 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:37:12.420026 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m15:37:12.471577 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:37:12.473487 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:37:12.473487 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m15:37:12.474495 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:37:12.475495 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:12.476494 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:37:12.476494 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT DISTINCT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
    );
  
  
[0m15:37:12.662530 [debug] [Thread-1 (]: SQL status: OK in 0.185 seconds
[0m15:37:12.669156 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:37:12.669770 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m15:37:12.671332 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:12.687880 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:37:12.688881 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:37:12.688881 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:37:12.713014 [debug] [Thread-1 (]: SQL status: OK in 0.024 seconds
[0m15:37:12.719716 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:37:12.719716 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m15:37:12.720270 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:12.722296 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m15:37:12.723925 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025825556540>]}
[0m15:37:12.724923 [info ] [Thread-1 (]: 1 of 92 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.33s]
[0m15:37:12.724923 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:37:12.725923 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m15:37:12.725923 [info ] [Thread-1 (]: 2 of 92 START sql table model main.dim_localizacao ............................. [RUN]
[0m15:37:12.726922 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m15:37:12.726922 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m15:37:12.729514 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:37:12.729514 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m15:37:12.734242 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:37:12.734242 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:37:12.735803 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m15:37:12.735803 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:12.735803 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:12.736811 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:37:12.736811 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m15:37:12.782339 [debug] [Thread-1 (]: SQL status: OK in 0.045 seconds
[0m15:37:12.786982 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:37:12.786982 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m15:37:12.788257 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:12.790764 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m15:37:12.792060 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:37:12.792672 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m15:37:12.795666 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:37:12.797786 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m15:37:12.797786 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m15:37:12.799932 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:12.801447 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m15:37:12.802042 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025825F3A6F0>]}
[0m15:37:12.802042 [info ] [Thread-1 (]: 2 of 92 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.08s]
[0m15:37:12.803602 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m15:37:12.804169 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m15:37:12.804729 [info ] [Thread-1 (]: 3 of 92 START sql table model main.dim_tempo ................................... [RUN]
[0m15:37:12.804729 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m15:37:12.804729 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m15:37:12.810230 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m15:37:12.812822 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m15:37:12.816661 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m15:37:12.817668 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m15:37:12.817668 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m15:37:12.819247 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:12.820342 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:12.820342 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m15:37:12.820867 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m15:37:12.837085 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m15:37:12.840604 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m15:37:12.842201 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m15:37:12.843211 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:12.844862 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m15:37:12.845875 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m15:37:12.846504 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m15:37:12.848742 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:37:12.852871 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m15:37:12.854079 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m15:37:12.855167 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:12.856173 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m15:37:12.856678 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025825F207D0>]}
[0m15:37:12.857180 [info ] [Thread-1 (]: 3 of 92 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.05s]
[0m15:37:12.857773 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m15:37:12.857773 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:37:12.857773 [info ] [Thread-1 (]: 4 of 92 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m15:37:12.858777 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m15:37:12.858777 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:37:12.863538 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:37:12.865609 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:37:12.870826 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:37:12.871869 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:37:12.872395 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m15:37:12.872913 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:12.873427 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:12.873427 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:37:12.873950 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:37:13.332980 [debug] [Thread-1 (]: SQL status: OK in 0.459 seconds
[0m15:37:13.336066 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:37:13.336066 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m15:37:13.337100 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.338169 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m15:37:13.338169 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:37:13.338169 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m15:37:13.492115 [debug] [Thread-1 (]: SQL status: OK in 0.153 seconds
[0m15:37:13.495277 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:37:13.495803 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m15:37:13.496338 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.498911 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m15:37:13.499912 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000258242CFB30>]}
[0m15:37:13.499912 [info ] [Thread-1 (]: 4 of 92 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.64s]
[0m15:37:13.500915 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:37:13.500915 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m15:37:13.501912 [info ] [Thread-1 (]: 5 of 92 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m15:37:13.501912 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m15:37:13.503418 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m15:37:13.507428 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m15:37:13.508427 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m15:37:13.512441 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m15:37:13.513957 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m15:37:13.513957 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m15:37:13.513957 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.514963 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.515962 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m15:37:13.515962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m15:37:13.526478 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m15:37:13.527479 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.528478 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: ROLLBACK
[0m15:37:13.541998 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_capital_prudencial'
[0m15:37:13.542997 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m15:37:13.545501 [debug] [Thread-1 (]: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m15:37:13.546507 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025824291190>]}
[0m15:37:13.547508 [error] [Thread-1 (]: 5 of 92 ERROR creating sql table model main.fato_capital_prudencial ............ [[31mERROR[0m in 0.04s]
[0m15:37:13.547508 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m15:37:13.548507 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m15:37:13.548507 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_capital_prudencial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^.
[0m15:37:13.549508 [info ] [Thread-1 (]: 6 of 92 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m15:37:13.550507 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m15:37:13.551515 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m15:37:13.554507 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m15:37:13.556027 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m15:37:13.561036 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m15:37:13.562036 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m15:37:13.563043 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m15:37:13.564038 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.564038 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.565038 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m15:37:13.565038 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."prudential_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m15:37:13.568548 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."prudential_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m15:37:13.569548 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.569548 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: ROLLBACK
[0m15:37:13.572554 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador'
[0m15:37:13.572554 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m15:37:13.574550 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Catalog Error: Table with name prudential_conglomerates_portfolio_indexer does not exist!
  Did you mean "prudential_conglomerates_capital_information"?
  
  LINE 40: FROM "silver"."main"."prudential_conglomerates_portfolio_indexer...
                ^
[0m15:37:13.575552 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025836C8C170>]}
[0m15:37:13.575552 [error] [Thread-1 (]: 6 of 92 ERROR creating sql table model main.fato_carteira_credito_indexador .... [[31mERROR[0m in 0.03s]
[0m15:37:13.575552 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m15:37:13.575552 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m15:37:13.577062 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Catalog Error: Table with name prudential_conglomerates_portfolio_indexer does not exist!
  Did you mean "prudential_conglomerates_capital_information"?
  
  LINE 40: FROM "silver"."main"."prudential_conglomerates_portfolio_indexer...
                ^.
[0m15:37:13.578070 [info ] [Thread-1 (]: 7 of 92 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m15:37:13.579070 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m15:37:13.579070 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m15:37:13.585071 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m15:37:13.586071 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m15:37:13.588584 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m15:37:13.589584 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m15:37:13.590584 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m15:37:13.590584 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.591584 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.591584 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m15:37:13.592587 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m15:37:13.594584 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m15:37:13.594584 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.595584 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: ROLLBACK
[0m15:37:13.598093 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_totais'
[0m15:37:13.598093 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m15:37:13.602103 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m15:37:13.603101 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025825ED9970>]}
[0m15:37:13.604103 [error] [Thread-1 (]: 7 of 92 ERROR creating sql table model main.fato_carteira_credito_totais ....... [[31mERROR[0m in 0.02s]
[0m15:37:13.605103 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m15:37:13.605103 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m15:37:13.606103 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_totais' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^.
[0m15:37:13.606103 [info ] [Thread-1 (]: 8 of 92 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m15:37:13.607100 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m15:37:13.607100 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m15:37:13.612856 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m15:37:13.613863 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m15:37:13.616374 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m15:37:13.617383 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m15:37:13.617383 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m15:37:13.617897 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.618482 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.618482 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m15:37:13.618995 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m15:37:13.620111 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m15:37:13.621662 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.621662 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: ROLLBACK
[0m15:37:13.624189 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_demonstracao_resultado'
[0m15:37:13.625196 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m15:37:13.627196 [debug] [Thread-1 (]: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m15:37:13.627196 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025825F1AAE0>]}
[0m15:37:13.628196 [error] [Thread-1 (]: 8 of 92 ERROR creating sql table model main.fato_demonstracao_resultado ........ [[31mERROR[0m in 0.02s]
[0m15:37:13.628700 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m15:37:13.628700 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m15:37:13.629205 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_demonstracao_resultado' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT".
[0m15:37:13.629205 [info ] [Thread-1 (]: 9 of 92 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m15:37:13.629726 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m15:37:13.629726 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m15:37:13.632811 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:37:13.633834 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m15:37:13.635873 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:37:13.636883 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:37:13.636883 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m15:37:13.636883 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.637891 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.637891 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:37:13.637891 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m15:37:13.643932 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m15:37:13.647930 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:37:13.647930 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m15:37:13.648929 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.650984 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m15:37:13.650984 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:37:13.651508 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m15:37:13.656309 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m15:37:13.658369 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m15:37:13.658369 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m15:37:13.659878 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.661400 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m15:37:13.661400 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000258254DA270>]}
[0m15:37:13.663774 [info ] [Thread-1 (]: 9 of 92 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.03s]
[0m15:37:13.663774 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m15:37:13.664779 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:37:13.664779 [info ] [Thread-1 (]: 10 of 92 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m15:37:13.665779 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m15:37:13.665779 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:37:13.669345 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:37:13.670393 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:37:13.672785 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:37:13.673798 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:37:13.674797 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m15:37:13.674797 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.675809 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.675809 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:37:13.676800 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_credito_classificada as carteira_credito,
        passivo_circulante_exigivel_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        quantidade_agencias,
        quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_credito_classificada as carteira_credito,
        passivo_circulante_exigivel_longo_prazo as passivo_exigivel,
        captacoes_totais as captacoes,
        patrimonio_liquido,
        lucro_liquido,
        quantidade_agencias,
        quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(cast(d.codigo as bigint) as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido

FROM dados_brutos d
    );
  
  
[0m15:37:13.678123 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_credito_classificada as carteira_credito,
        passivo_circulante_exigivel_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        quantidade_agencias,
        quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_credito_classificada as carteira_credito,
        passivo_circulante_exigivel_longo_prazo as passivo_exigivel,
        captacoes_totais as captacoes,
        patrimonio_liquido,
        lucro_liquido,
        quantidade_agencias,
        quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(cast(d.codigo as bigint) as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido

FROM dados_brutos d
    );
  
  
[0m15:37:13.678627 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.679156 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: ROLLBACK
[0m15:37:13.681903 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_resumo_financeiro'
[0m15:37:13.681903 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m15:37:13.684026 [debug] [Thread-1 (]: Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Binder Error: Referenced column "carteira_credito_classificada" not found in FROM clause!
  Candidate bindings: "carteira_de_credito_classificada", "captacoes", "ativo_total", "tipo_de_consolidacao", "data_base"
  
  LINE 25:         carteira_credito_classificada as carteira_credito,
                   ^
[0m15:37:13.684547 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025836CC02F0>]}
[0m15:37:13.684547 [error] [Thread-1 (]: 10 of 92 ERROR creating sql table model main.fato_resumo_financeiro ............ [[31mERROR[0m in 0.02s]
[0m15:37:13.684547 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:37:13.684547 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:37:13.686055 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_resumo_financeiro' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Binder Error: Referenced column "carteira_credito_classificada" not found in FROM clause!
  Candidate bindings: "carteira_de_credito_classificada", "captacoes", "ativo_total", "tipo_de_consolidacao", "data_base"
  
  LINE 25:         carteira_credito_classificada as carteira_credito,
                   ^.
[0m15:37:13.686055 [info ] [Thread-1 (]: 11 of 92 START seed file main.seed_dim_atividade ............................... [RUN]
[0m15:37:13.686055 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m15:37:13.687083 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:37:13.687611 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:37:13.707225 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:37:13.707760 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m15:37:13.707760 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.708755 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.708755 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:37:13.708755 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m15:37:13.710259 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.718295 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m15:37:13.718295 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:37:13.720927 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m15:37:13.721451 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.721974 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: ROLLBACK
[0m15:37:13.752282 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_atividade'
[0m15:37:13.753333 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m15:37:13.757253 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_atividade (seeds\seed_dim_atividade.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv"
[0m15:37:13.757781 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000258259343B0>]}
[0m15:37:13.758311 [error] [Thread-1 (]: 11 of 92 ERROR loading seed file main.seed_dim_atividade ....................... [[31mERROR[0m in 0.07s]
[0m15:37:13.758841 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m15:37:13.759356 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:37:13.759862 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_atividade' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_atividade (seeds\seed_dim_atividade.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv".
[0m15:37:13.760385 [info ] [Thread-1 (]: 12 of 92 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m15:37:13.760904 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m15:37:13.761439 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:37:13.761439 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:37:13.764666 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m15:37:13.764666 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m15:37:13.765694 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.765694 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.765694 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m15:37:13.765694 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m15:37:13.766803 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.767390 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m15:37:13.767390 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:37:13.768945 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m15:37:13.768945 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.769535 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: ROLLBACK
[0m15:37:13.771723 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_classe_instituicao'
[0m15:37:13.772737 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m15:37:13.775862 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv"
[0m15:37:13.776825 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025825F27FE0>]}
[0m15:37:13.776825 [error] [Thread-1 (]: 12 of 92 ERROR loading seed file main.seed_dim_classe_instituicao .............. [[31mERROR[0m in 0.01s]
[0m15:37:13.777820 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m15:37:13.778325 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:37:13.778848 [info ] [Thread-1 (]: 13 of 92 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m15:37:13.779393 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m15:37:13.779923 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_classe_instituicao' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv".
[0m15:37:13.780442 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:37:13.780977 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:37:13.785834 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m15:37:13.786357 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m15:37:13.786357 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.787392 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.787392 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m15:37:13.787915 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m15:37:13.788921 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.789921 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m15:37:13.790976 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:37:13.791976 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m15:37:13.793017 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.794048 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: ROLLBACK
[0m15:37:13.798542 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_consolidado'
[0m15:37:13.799116 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m15:37:13.801221 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv"
[0m15:37:13.801879 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025825F27500>]}
[0m15:37:13.802504 [error] [Thread-1 (]: 13 of 92 ERROR loading seed file main.seed_dim_consolidado ..................... [[31mERROR[0m in 0.02s]
[0m15:37:13.802504 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m15:37:13.802504 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:37:13.803515 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_consolidado' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv".
[0m15:37:13.804086 [info ] [Thread-1 (]: 14 of 92 START seed file main.seed_dim_controle ................................ [RUN]
[0m15:37:13.804618 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m15:37:13.805184 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:37:13.805184 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:37:13.808257 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:37:13.808257 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m15:37:13.809262 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.809262 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.810160 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:37:13.810160 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m15:37:13.810698 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.812750 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m15:37:13.812750 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:37:13.813800 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m15:37:13.813800 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.814799 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: ROLLBACK
[0m15:37:13.817910 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_controle'
[0m15:37:13.818427 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m15:37:13.820512 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_controle (seeds\seed_dim_controle.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv"
[0m15:37:13.820512 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025825EFF680>]}
[0m15:37:13.821538 [error] [Thread-1 (]: 14 of 92 ERROR loading seed file main.seed_dim_controle ........................ [[31mERROR[0m in 0.02s]
[0m15:37:13.821538 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m15:37:13.821538 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:37:13.822627 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_controle' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_controle (seeds\seed_dim_controle.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv".
[0m15:37:13.822627 [info ] [Thread-1 (]: 15 of 92 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m15:37:13.823173 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m15:37:13.823173 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:37:13.824179 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:37:13.827782 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:37:13.827782 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m15:37:13.828321 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.828321 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.829327 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:37:13.829327 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m15:37:13.830332 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.831331 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m15:37:13.831331 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:37:13.832950 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m15:37:13.833492 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.834015 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: ROLLBACK
[0m15:37:13.837149 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento'
[0m15:37:13.837664 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m15:37:13.838737 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_faixa_vencimento (seeds\seed_dim_faixa_vencimento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv"
[0m15:37:13.840821 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025836CB23F0>]}
[0m15:37:13.840821 [error] [Thread-1 (]: 15 of 92 ERROR loading seed file main.seed_dim_faixa_vencimento ................ [[31mERROR[0m in 0.02s]
[0m15:37:13.840821 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m15:37:13.840821 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:37:13.842330 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_faixa_vencimento (seeds\seed_dim_faixa_vencimento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv".
[0m15:37:13.842900 [info ] [Thread-1 (]: 16 of 92 START seed file main.seed_dim_porte ................................... [RUN]
[0m15:37:13.844477 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m15:37:13.844477 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:37:13.845486 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:37:13.847610 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:37:13.849634 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m15:37:13.849634 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.850967 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.851477 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:37:13.851995 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m15:37:13.852523 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.853621 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m15:37:13.854136 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:37:13.855208 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m15:37:13.855208 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.855721 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: ROLLBACK
[0m15:37:13.857929 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_porte'
[0m15:37:13.858939 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m15:37:13.861453 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_porte (seeds\seed_dim_porte.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv"
[0m15:37:13.861958 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025836CC7B30>]}
[0m15:37:13.862465 [error] [Thread-1 (]: 16 of 92 ERROR loading seed file main.seed_dim_porte ........................... [[31mERROR[0m in 0.02s]
[0m15:37:13.863064 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m15:37:13.863064 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:37:13.863064 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_porte' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_porte (seeds\seed_dim_porte.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv".
[0m15:37:13.863064 [info ] [Thread-1 (]: 17 of 92 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m15:37:13.864599 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m15:37:13.865605 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:37:13.865605 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:37:13.871041 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:37:13.871041 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m15:37:13.871595 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.872120 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.872680 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:37:13.873195 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m15:37:13.873729 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.874248 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m15:37:13.875253 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:37:13.875253 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m15:37:13.875253 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.876253 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: ROLLBACK
[0m15:37:13.878760 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_produto_credito'
[0m15:37:13.878760 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m15:37:13.881270 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_produto_credito (seeds\seed_dim_produto_credito.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv"
[0m15:37:13.881270 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025836CD7C50>]}
[0m15:37:13.882850 [error] [Thread-1 (]: 17 of 92 ERROR loading seed file main.seed_dim_produto_credito ................. [[31mERROR[0m in 0.02s]
[0m15:37:13.883911 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m15:37:13.884448 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:37:13.884981 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_produto_credito' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_produto_credito (seeds\seed_dim_produto_credito.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv".
[0m15:37:13.885509 [info ] [Thread-1 (]: 18 of 92 START seed file main.seed_dim_regiao .................................. [RUN]
[0m15:37:13.886561 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m15:37:13.886561 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:37:13.887146 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:37:13.890691 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:37:13.890691 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m15:37:13.890691 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.892195 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.892769 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:37:13.892769 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m15:37:13.892769 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.894319 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m15:37:13.894949 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:37:13.895985 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m15:37:13.895985 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.896979 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: ROLLBACK
[0m15:37:13.900068 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_regiao'
[0m15:37:13.900068 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m15:37:13.904262 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_regiao (seeds\seed_dim_regiao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv"
[0m15:37:13.904812 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025836C70410>]}
[0m15:37:13.905365 [error] [Thread-1 (]: 18 of 92 ERROR loading seed file main.seed_dim_regiao .......................... [[31mERROR[0m in 0.02s]
[0m15:37:13.905887 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m15:37:13.906405 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:37:13.906921 [info ] [Thread-1 (]: 19 of 92 START seed file main.seed_dim_risco ................................... [RUN]
[0m15:37:13.907461 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_regiao' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_regiao (seeds\seed_dim_regiao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv".
[0m15:37:13.907461 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m15:37:13.908467 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:37:13.908467 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:37:13.911530 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:37:13.912032 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m15:37:13.912032 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.912535 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.912535 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:37:13.912535 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m15:37:13.913542 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:13.913542 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m15:37:13.915047 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:37:13.915616 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m15:37:13.916621 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.917125 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: ROLLBACK
[0m15:37:13.920835 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_risco'
[0m15:37:13.921359 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m15:37:13.925600 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_risco (seeds\seed_dim_risco.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv"
[0m15:37:13.926647 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025825F144A0>]}
[0m15:37:13.927168 [error] [Thread-1 (]: 19 of 92 ERROR loading seed file main.seed_dim_risco ........................... [[31mERROR[0m in 0.02s]
[0m15:37:13.928681 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m15:37:13.929185 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:37:13.929185 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_risco' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_risco (seeds\seed_dim_risco.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv".
[0m15:37:13.930190 [info ] [Thread-1 (]: 20 of 92 START seed file main.seed_dim_segmento ................................ [RUN]
[0m15:37:13.931190 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m15:37:13.931190 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:37:13.931190 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:37:13.936157 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m15:37:13.937166 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m15:37:13.937672 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.938679 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.938679 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m15:37:13.938679 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m15:37:13.940186 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.942717 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m15:37:13.943248 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m15:37:13.944328 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m15:37:13.944852 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:37:13.945373 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: ROLLBACK
[0m15:37:13.947981 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_segmento'
[0m15:37:13.947981 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m15:37:13.951071 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv"
[0m15:37:13.951575 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '03d77614-8c1c-47dc-b838-fa512980e8e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025825EEC6B0>]}
[0m15:37:13.952157 [error] [Thread-1 (]: 20 of 92 ERROR loading seed file main.seed_dim_segmento ........................ [[31mERROR[0m in 0.02s]
[0m15:37:13.952157 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m15:37:13.952157 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:37:13.952157 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_segmento' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv".
[0m15:37:13.952157 [info ] [Thread-1 (]: 21 of 92 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m15:37:13.953731 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m15:37:13.954292 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:37:13.966480 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:37:13.967589 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:37:13.981436 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:37:13.983015 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:37:13.984073 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m15:37:13.984073 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:13.985114 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:13.985114 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:37:13.985650 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:37:13.987319 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:37:13.988842 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m15:37:13.990349 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m15:37:13.990349 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m15:37:13.991915 [info ] [Thread-1 (]: 21 of 92 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.04s]
[0m15:37:13.991915 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:37:13.991915 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:37:13.992923 [info ] [Thread-1 (]: 22 of 92 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m15:37:13.992923 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m15:37:13.992923 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:37:13.997245 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:37:13.998251 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:37:14.001269 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:37:14.002874 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:37:14.003396 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m15:37:14.003396 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.004446 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.004446 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:37:14.004965 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m15:37:14.006000 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.007086 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m15:37:14.007653 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m15:37:14.008657 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m15:37:14.008657 [info ] [Thread-1 (]: 22 of 92 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m15:37:14.008657 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:37:14.008657 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:37:14.010162 [info ] [Thread-1 (]: 23 of 92 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m15:37:14.010162 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m15:37:14.010162 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:37:14.015544 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:37:14.017057 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:37:14.021122 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:37:14.022174 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:37:14.022707 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m15:37:14.023225 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.023746 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.023746 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:37:14.024261 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:37:14.027978 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m15:37:14.029530 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m15:37:14.031123 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m15:37:14.031123 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m15:37:14.031123 [error] [Thread-1 (]: 23 of 92 FAIL 3859 unique_dim_instituicao_id_instituicao ....................... [[31mFAIL 3859[0m in 0.02s]
[0m15:37:14.032709 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:37:14.032709 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m15:37:14.034289 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37' to be skipped because of status 'fail'.  Reason: Got 3859 results, configured to fail if != 0.
[0m15:37:14.034827 [info ] [Thread-1 (]: 24 of 92 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m15:37:14.035332 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m15:37:14.035844 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m15:37:14.039621 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m15:37:14.040754 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m15:37:14.042353 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m15:37:14.043563 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m15:37:14.043563 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m15:37:14.043563 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.044575 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.044575 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m15:37:14.045626 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m15:37:14.046625 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.048141 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m15:37:14.049643 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m15:37:14.049643 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m15:37:14.049643 [info ] [Thread-1 (]: 24 of 92 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.01s]
[0m15:37:14.051149 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m15:37:14.051714 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:37:14.052253 [info ] [Thread-1 (]: 25 of 92 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m15:37:14.052253 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m15:37:14.052253 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:37:14.061941 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:37:14.062979 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:37:14.065040 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:37:14.065545 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:37:14.066567 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m15:37:14.066567 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.066567 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.067613 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:37:14.067613 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:37:14.069727 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:37:14.071303 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m15:37:14.071303 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m15:37:14.072393 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m15:37:14.072985 [error] [Thread-1 (]: 25 of 92 FAIL 3 relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[31mFAIL 3[0m in 0.02s]
[0m15:37:14.072985 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:37:14.073991 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m15:37:14.074575 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42' to be skipped because of status 'fail'.  Reason: Got 3 results, configured to fail if != 0.
[0m15:37:14.074575 [info ] [Thread-1 (]: 26 of 92 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m15:37:14.075583 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m15:37:14.076582 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m15:37:14.080120 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m15:37:14.081160 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m15:37:14.082789 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m15:37:14.083310 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m15:37:14.084318 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m15:37:14.084825 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.084825 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.085830 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m15:37:14.085830 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:37:14.088344 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:37:14.089850 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m15:37:14.090462 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m15:37:14.090462 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m15:37:14.091984 [info ] [Thread-1 (]: 26 of 92 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.02s]
[0m15:37:14.091984 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m15:37:14.092989 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m15:37:14.092989 [info ] [Thread-1 (]: 27 of 92 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m15:37:14.093622 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m15:37:14.093622 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m15:37:14.097480 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m15:37:14.098544 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m15:37:14.100630 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m15:37:14.101695 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m15:37:14.101695 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m15:37:14.102234 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.102234 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:14.102234 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m15:37:14.103237 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:37:14.103740 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:14.105353 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m15:37:14.105897 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m15:37:14.105897 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m15:37:14.106908 [info ] [Thread-1 (]: 27 of 92 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.01s]
[0m15:37:14.107487 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m15:37:14.107487 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m15:37:14.108491 [info ] [Thread-1 (]: 28 of 92 START test unique_dim_tempo_id_data ................................... [RUN]
[0m15:37:14.108491 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m15:37:14.108491 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m15:37:14.114211 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m15:37:14.115249 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m15:37:14.117419 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m15:37:14.119600 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m15:37:14.120169 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m15:37:14.120169 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.121262 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.121262 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m15:37:14.121262 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:37:14.123778 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:37:14.124777 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m15:37:14.125776 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m15:37:14.125776 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m15:37:14.126776 [info ] [Thread-1 (]: 28 of 92 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.02s]
[0m15:37:14.128285 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m15:37:14.128285 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:37:14.128285 [info ] [Thread-1 (]: 29 of 92 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m15:37:14.129291 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m15:37:14.129291 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:37:14.133837 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:37:14.134882 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:37:14.137025 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:37:14.138030 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:37:14.138030 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m15:37:14.138030 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.139030 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:14.139030 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:37:14.139030 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:37:14.140029 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.141094 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m15:37:14.142641 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m15:37:14.142641 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m15:37:14.143168 [info ] [Thread-1 (]: 29 of 92 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.01s]
[0m15:37:14.143168 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:37:14.143168 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:37:14.143168 [info ] [Thread-1 (]: 30 of 92 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m15:37:14.143168 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m15:37:14.143168 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:37:14.148272 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:37:14.149433 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:37:14.151634 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:37:14.152149 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:37:14.152671 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m15:37:14.152671 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.153216 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:14.153748 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:37:14.153748 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:37:14.154280 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:14.155394 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m15:37:14.156429 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m15:37:14.156429 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m15:37:14.156956 [info ] [Thread-1 (]: 30 of 92 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.01s]
[0m15:37:14.157575 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:37:14.157575 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:37:14.157575 [info ] [Thread-1 (]: 31 of 92 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:37:14.158615 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m15:37:14.158615 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:37:14.162817 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:37:14.163875 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:37:14.167208 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:37:14.168256 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:37:14.168793 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m15:37:14.168793 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.169926 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.170468 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:37:14.170468 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:37:14.173152 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m15:37:14.175157 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m15:37:14.176158 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m15:37:14.176158 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m15:37:14.176158 [info ] [Thread-1 (]: 31 of 92 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m15:37:14.177157 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:37:14.177157 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:37:14.177157 [info ] [Thread-1 (]: 32 of 92 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:37:14.178157 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m15:37:14.178157 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:37:14.182788 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:37:14.183793 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:37:14.188800 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:37:14.190361 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:37:14.190881 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m15:37:14.190881 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.191435 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.191965 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:37:14.191965 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:37:14.214114 [debug] [Thread-1 (]: SQL status: OK in 0.022 seconds
[0m15:37:14.215729 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m15:37:14.216848 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m15:37:14.216848 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m15:37:14.217393 [info ] [Thread-1 (]: 32 of 92 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m15:37:14.217393 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:37:14.217393 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m15:37:14.217393 [info ] [Thread-1 (]: 33 of 92 SKIP test not_null_fato_capital_prudencial_id_data .................... [[33mSKIP[0m]
[0m15:37:14.218965 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m15:37:14.218965 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m15:37:14.219614 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3' to be skipped because of status 'skipped'. 
[0m15:37:14.219614 [info ] [Thread-1 (]: 34 of 92 SKIP test not_null_fato_capital_prudencial_id_instituicao ............. [[33mSKIP[0m]
[0m15:37:14.220233 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m15:37:14.220233 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m15:37:14.220233 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55' to be skipped because of status 'skipped'. 
[0m15:37:14.221248 [info ] [Thread-1 (]: 35 of 92 SKIP test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[33mSKIP[0m]
[0m15:37:14.221248 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m15:37:14.221248 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:37:14.221248 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391' to be skipped because of status 'skipped'. 
[0m15:37:14.221248 [info ] [Thread-1 (]: 36 of 92 SKIP test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[33mSKIP[0m]
[0m15:37:14.221248 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:37:14.223182 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m15:37:14.223182 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c' to be skipped because of status 'skipped'. 
[0m15:37:14.223182 [info ] [Thread-1 (]: 37 of 92 SKIP test not_null_fato_carteira_credito_indexador_id_data ............ [[33mSKIP[0m]
[0m15:37:14.224188 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m15:37:14.224188 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m15:37:14.224188 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f' to be skipped because of status 'skipped'. 
[0m15:37:14.224188 [info ] [Thread-1 (]: 38 of 92 SKIP test not_null_fato_carteira_credito_indexador_id_instituicao ..... [[33mSKIP[0m]
[0m15:37:14.225217 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m15:37:14.225217 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m15:37:14.225217 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22' to be skipped because of status 'skipped'. 
[0m15:37:14.226190 [info ] [Thread-1 (]: 39 of 92 SKIP test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[33mSKIP[0m]
[0m15:37:14.226190 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m15:37:14.227189 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:37:14.227189 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a' to be skipped because of status 'skipped'. 
[0m15:37:14.227189 [info ] [Thread-1 (]: 40 of 92 SKIP test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[33mSKIP[0m]
[0m15:37:14.228188 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:37:14.228188 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m15:37:14.228188 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29' to be skipped because of status 'skipped'. 
[0m15:37:14.229760 [info ] [Thread-1 (]: 41 of 92 SKIP test not_null_fato_carteira_credito_totais_id_data ............... [[33mSKIP[0m]
[0m15:37:14.229760 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m15:37:14.231279 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m15:37:14.231279 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6' to be skipped because of status 'skipped'. 
[0m15:37:14.231279 [info ] [Thread-1 (]: 42 of 92 SKIP test not_null_fato_carteira_credito_totais_id_instituicao ........ [[33mSKIP[0m]
[0m15:37:14.232877 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m15:37:14.232877 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m15:37:14.233887 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec' to be skipped because of status 'skipped'. 
[0m15:37:14.233887 [info ] [Thread-1 (]: 43 of 92 SKIP test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[33mSKIP[0m]
[0m15:37:14.233887 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m15:37:14.234918 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:37:14.234918 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510' to be skipped because of status 'skipped'. 
[0m15:37:14.234918 [info ] [Thread-1 (]: 44 of 92 SKIP test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[33mSKIP[0m]
[0m15:37:14.235918 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:37:14.235918 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m15:37:14.236423 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33' to be skipped because of status 'skipped'. 
[0m15:37:14.236929 [info ] [Thread-1 (]: 45 of 92 SKIP test not_null_fato_demonstracao_resultado_id_data ................ [[33mSKIP[0m]
[0m15:37:14.237999 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m15:37:14.238526 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m15:37:14.239044 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e' to be skipped because of status 'skipped'. 
[0m15:37:14.239573 [info ] [Thread-1 (]: 46 of 92 SKIP test not_null_fato_demonstracao_resultado_id_instituicao ......... [[33mSKIP[0m]
[0m15:37:14.240082 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m15:37:14.240615 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m15:37:14.240615 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6' to be skipped because of status 'skipped'. 
[0m15:37:14.241135 [info ] [Thread-1 (]: 47 of 92 SKIP test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[33mSKIP[0m]
[0m15:37:14.241658 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m15:37:14.242182 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:37:14.242705 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6' to be skipped because of status 'skipped'. 
[0m15:37:14.243238 [info ] [Thread-1 (]: 48 of 92 SKIP test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[33mSKIP[0m]
[0m15:37:14.243238 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:37:14.244243 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m15:37:14.244243 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71' to be skipped because of status 'skipped'. 
[0m15:37:14.244747 [info ] [Thread-1 (]: 49 of 92 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m15:37:14.245342 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m15:37:14.245342 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m15:37:14.249919 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m15:37:14.251502 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m15:37:14.253606 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m15:37:14.254654 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m15:37:14.255186 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m15:37:14.255186 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.255725 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:14.256272 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m15:37:14.256272 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:37:14.257318 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:14.257868 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m15:37:14.258874 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m15:37:14.258874 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m15:37:14.260381 [info ] [Thread-1 (]: 49 of 92 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.02s]
[0m15:37:14.260915 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m15:37:14.260915 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m15:37:14.261427 [info ] [Thread-1 (]: 50 of 92 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m15:37:14.261427 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m15:37:14.261427 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m15:37:14.265606 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m15:37:14.267668 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m15:37:14.270869 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m15:37:14.273045 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m15:37:14.273683 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m15:37:14.274215 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.274751 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.275282 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m15:37:14.275282 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:37:14.277101 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.278153 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m15:37:14.279159 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m15:37:14.279665 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m15:37:14.279665 [info ] [Thread-1 (]: 50 of 92 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m15:37:14.280674 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m15:37:14.280674 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m15:37:14.280674 [info ] [Thread-1 (]: 51 of 92 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:37:14.281674 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m15:37:14.282181 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m15:37:14.285898 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m15:37:14.287413 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m15:37:14.288421 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m15:37:14.290887 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m15:37:14.291393 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m15:37:14.291926 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.292980 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.293506 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m15:37:14.293506 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:37:14.295106 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:37:14.296157 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m15:37:14.297227 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m15:37:14.297227 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m15:37:14.297746 [info ] [Thread-1 (]: 51 of 92 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m15:37:14.297746 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m15:37:14.297746 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:37:14.298750 [info ] [Thread-1 (]: 52 of 92 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:37:14.298750 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m15:37:14.298750 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:37:14.302097 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:37:14.303651 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:37:14.305833 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:37:14.305833 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:37:14.307097 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m15:37:14.307097 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:37:14.307656 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:37:14.308175 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:37:14.308175 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:37:14.313436 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m15:37:14.314997 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m15:37:14.316033 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m15:37:14.316546 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m15:37:14.317059 [info ] [Thread-1 (]: 52 of 92 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m15:37:14.317059 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:37:14.317573 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:37:14.318090 [info ] [Thread-1 (]: 53 of 92 SKIP test not_null_fato_resumo_financeiro_id_data ..................... [[33mSKIP[0m]
[0m15:37:14.318090 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:37:14.318090 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:37:14.319096 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946' to be skipped because of status 'skipped'. 
[0m15:37:14.319096 [info ] [Thread-1 (]: 54 of 92 SKIP test not_null_fato_resumo_financeiro_id_instituicao .............. [[33mSKIP[0m]
[0m15:37:14.319600 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:37:14.320145 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:37:14.320145 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7' to be skipped because of status 'skipped'. 
[0m15:37:14.320145 [info ] [Thread-1 (]: 55 of 92 SKIP test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[33mSKIP[0m]
[0m15:37:14.320145 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:37:14.320145 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:37:14.321768 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff' to be skipped because of status 'skipped'. 
[0m15:37:14.321768 [info ] [Thread-1 (]: 56 of 92 SKIP test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[33mSKIP[0m]
[0m15:37:14.322341 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:37:14.322912 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m15:37:14.322912 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a' to be skipped because of status 'skipped'. 
[0m15:37:14.323437 [info ] [Thread-1 (]: 57 of 92 SKIP relation main.dim_atividade ...................................... [[33mSKIP[0m]
[0m15:37:14.323437 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m15:37:14.323437 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m15:37:14.324443 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_atividade' to be skipped because of status 'skipped'. 
[0m15:37:14.324443 [info ] [Thread-1 (]: 58 of 92 SKIP relation main.dim_classe_instituicao ............................. [[33mSKIP[0m]
[0m15:37:14.324443 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m15:37:14.325443 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m15:37:14.325443 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_classe_instituicao' to be skipped because of status 'skipped'. 
[0m15:37:14.325443 [info ] [Thread-1 (]: 59 of 92 SKIP relation main.dim_consolidado .................................... [[33mSKIP[0m]
[0m15:37:14.326443 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m15:37:14.326443 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m15:37:14.326443 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_consolidado' to be skipped because of status 'skipped'. 
[0m15:37:14.327951 [info ] [Thread-1 (]: 60 of 92 SKIP relation main.dim_controle ....................................... [[33mSKIP[0m]
[0m15:37:14.329026 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m15:37:14.329563 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m15:37:14.330092 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_controle' to be skipped because of status 'skipped'. 
[0m15:37:14.330092 [info ] [Thread-1 (]: 61 of 92 SKIP relation main.dim_faixa_vencimento ............................... [[33mSKIP[0m]
[0m15:37:14.331135 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m15:37:14.331659 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m15:37:14.331659 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_faixa_vencimento' to be skipped because of status 'skipped'. 
[0m15:37:14.332177 [info ] [Thread-1 (]: 62 of 92 SKIP relation main.dim_porte .......................................... [[33mSKIP[0m]
[0m15:37:14.332697 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m15:37:14.332697 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m15:37:14.333220 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_porte' to be skipped because of status 'skipped'. 
[0m15:37:14.333748 [info ] [Thread-1 (]: 63 of 92 SKIP relation main.dim_produto_credito ................................ [[33mSKIP[0m]
[0m15:37:14.334274 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m15:37:14.334274 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m15:37:14.334274 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_produto_credito' to be skipped because of status 'skipped'. 
[0m15:37:14.334274 [info ] [Thread-1 (]: 64 of 92 SKIP relation main.dim_regiao ......................................... [[33mSKIP[0m]
[0m15:37:14.334274 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m15:37:14.335809 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m15:37:14.335809 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_regiao' to be skipped because of status 'skipped'. 
[0m15:37:14.335809 [info ] [Thread-1 (]: 65 of 92 SKIP relation main.dim_risco .......................................... [[33mSKIP[0m]
[0m15:37:14.336825 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m15:37:14.337330 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m15:37:14.337892 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_risco' to be skipped because of status 'skipped'. 
[0m15:37:14.337892 [info ] [Thread-1 (]: 66 of 92 SKIP relation main.dim_segmento ....................................... [[33mSKIP[0m]
[0m15:37:14.338906 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m15:37:14.338906 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m15:37:14.338906 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_segmento' to be skipped because of status 'skipped'. 
[0m15:37:14.339906 [info ] [Thread-1 (]: 67 of 92 SKIP test not_null_dim_classe_instituicao_id_classe ................... [[33mSKIP[0m]
[0m15:37:14.339906 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m15:37:14.339906 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:37:14.340924 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267' to be skipped because of status 'skipped'. 
[0m15:37:14.340924 [info ] [Thread-1 (]: 68 of 92 SKIP test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[33mSKIP[0m]
[0m15:37:14.340924 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:37:14.341925 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m15:37:14.341925 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0' to be skipped because of status 'skipped'. 
[0m15:37:14.342431 [info ] [Thread-1 (]: 69 of 92 SKIP test unique_dim_classe_instituicao_id_classe ..................... [[33mSKIP[0m]
[0m15:37:14.342935 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m15:37:14.342935 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m15:37:14.342935 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19' to be skipped because of status 'skipped'. 
[0m15:37:14.344490 [info ] [Thread-1 (]: 70 of 92 SKIP test not_null_dim_consolidado_id_consolidado ..................... [[33mSKIP[0m]
[0m15:37:14.345206 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m15:37:14.345742 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:37:14.346280 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340' to be skipped because of status 'skipped'. 
[0m15:37:14.346798 [info ] [Thread-1 (]: 71 of 92 SKIP test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[33mSKIP[0m]
[0m15:37:14.347847 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:37:14.348370 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m15:37:14.348370 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e' to be skipped because of status 'skipped'. 
[0m15:37:14.348898 [info ] [Thread-1 (]: 72 of 92 SKIP test unique_dim_consolidado_id_consolidado ....................... [[33mSKIP[0m]
[0m15:37:14.349421 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m15:37:14.349421 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m15:37:14.349944 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862' to be skipped because of status 'skipped'. 
[0m15:37:14.349944 [info ] [Thread-1 (]: 73 of 92 SKIP test not_null_dim_controle_id_controle ........................... [[33mSKIP[0m]
[0m15:37:14.350467 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m15:37:14.350990 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:37:14.350990 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21' to be skipped because of status 'skipped'. 
[0m15:37:14.351515 [info ] [Thread-1 (]: 74 of 92 SKIP test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[33mSKIP[0m]
[0m15:37:14.352036 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:37:14.352627 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m15:37:14.352627 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f' to be skipped because of status 'skipped'. 
[0m15:37:14.352627 [info ] [Thread-1 (]: 75 of 92 SKIP test unique_dim_controle_id_controle ............................. [[33mSKIP[0m]
[0m15:37:14.352627 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m15:37:14.353634 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m15:37:14.353634 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c' to be skipped because of status 'skipped'. 
[0m15:37:14.354139 [info ] [Thread-1 (]: 76 of 92 SKIP relation main.fato_carteira_credito_atividade .................... [[33mSKIP[0m]
[0m15:37:14.354720 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m15:37:14.354720 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m15:37:14.354720 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_atividade' to be skipped because of status 'skipped'. 
[0m15:37:14.354720 [info ] [Thread-1 (]: 77 of 92 SKIP relation main.fato_carteira_credito_porte ........................ [[33mSKIP[0m]
[0m15:37:14.354720 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m15:37:14.356267 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m15:37:14.356267 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_porte' to be skipped because of status 'skipped'. 
[0m15:37:14.356267 [info ] [Thread-1 (]: 78 of 92 SKIP relation main.fato_carteira_credito_produto ...................... [[33mSKIP[0m]
[0m15:37:14.357272 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m15:37:14.357272 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m15:37:14.357272 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_produto' to be skipped because of status 'skipped'. 
[0m15:37:14.357272 [info ] [Thread-1 (]: 79 of 92 SKIP relation main.fato_regiao_credito ................................ [[33mSKIP[0m]
[0m15:37:14.358645 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m15:37:14.358645 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m15:37:14.358645 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_regiao_credito' to be skipped because of status 'skipped'. 
[0m15:37:14.358645 [info ] [Thread-1 (]: 80 of 92 SKIP relation main.fato_risco_credito ................................. [[33mSKIP[0m]
[0m15:37:14.358645 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m15:37:14.360151 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m15:37:14.360151 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_risco_credito' to be skipped because of status 'skipped'. 
[0m15:37:14.360151 [info ] [Thread-1 (]: 81 of 92 SKIP test not_null_dim_segmento_id_segmento ........................... [[33mSKIP[0m]
[0m15:37:14.360151 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m15:37:14.361766 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:37:14.361766 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e' to be skipped because of status 'skipped'. 
[0m15:37:14.362775 [info ] [Thread-1 (]: 82 of 92 SKIP test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[33mSKIP[0m]
[0m15:37:14.363289 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:37:14.363797 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m15:37:14.364332 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e' to be skipped because of status 'skipped'. 
[0m15:37:14.364854 [info ] [Thread-1 (]: 83 of 92 SKIP test unique_dim_segmento_id_segmento ............................. [[33mSKIP[0m]
[0m15:37:14.365385 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m15:37:14.365909 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m15:37:14.365909 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a' to be skipped because of status 'skipped'. 
[0m15:37:14.366429 [info ] [Thread-1 (]: 84 of 92 SKIP test not_null_fato_carteira_credito_atividade_id_instituicao ..... [[33mSKIP[0m]
[0m15:37:14.366946 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m15:37:14.366946 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m15:37:14.367461 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1' to be skipped because of status 'skipped'. 
[0m15:37:14.367461 [info ] [Thread-1 (]: 85 of 92 SKIP test not_null_fato_carteira_credito_porte_id_instituicao ......... [[33mSKIP[0m]
[0m15:37:14.367983 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m15:37:14.368548 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m15:37:14.368548 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74' to be skipped because of status 'skipped'. 
[0m15:37:14.368548 [info ] [Thread-1 (]: 86 of 92 SKIP test not_null_fato_carteira_credito_produto_id_data .............. [[33mSKIP[0m]
[0m15:37:14.368548 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m15:37:14.369553 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m15:37:14.370058 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5' to be skipped because of status 'skipped'. 
[0m15:37:14.370058 [info ] [Thread-1 (]: 87 of 92 SKIP test not_null_fato_carteira_credito_produto_id_instituicao ....... [[33mSKIP[0m]
[0m15:37:14.370058 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m15:37:14.370058 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m15:37:14.370058 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d' to be skipped because of status 'skipped'. 
[0m15:37:14.371622 [info ] [Thread-1 (]: 88 of 92 SKIP test not_null_fato_regiao_credito_id_instituicao ................. [[33mSKIP[0m]
[0m15:37:14.371622 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m15:37:14.371622 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m15:37:14.371622 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836' to be skipped because of status 'skipped'. 
[0m15:37:14.372630 [info ] [Thread-1 (]: 89 of 92 SKIP test not_null_fato_regiao_credito_id_regiao ...................... [[33mSKIP[0m]
[0m15:37:14.373135 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m15:37:14.373135 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m15:37:14.373135 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21' to be skipped because of status 'skipped'. 
[0m15:37:14.373135 [info ] [Thread-1 (]: 90 of 92 SKIP test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[33mSKIP[0m]
[0m15:37:14.374139 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m15:37:14.374139 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m15:37:14.374139 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5' to be skipped because of status 'skipped'. 
[0m15:37:14.374139 [info ] [Thread-1 (]: 91 of 92 SKIP test not_null_fato_risco_credito_id_instituicao .................. [[33mSKIP[0m]
[0m15:37:14.375141 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m15:37:14.375141 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m15:37:14.375141 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4' to be skipped because of status 'skipped'. 
[0m15:37:14.376140 [info ] [Thread-1 (]: 92 of 92 SKIP test not_null_fato_risco_credito_id_nivel_risco .................. [[33mSKIP[0m]
[0m15:37:14.376140 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m15:37:14.376140 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' to be skipped because of status 'skipped'. 
[0m15:37:14.378141 [debug] [MainThread]: Using duckdb connection "master"
[0m15:37:14.378141 [debug] [MainThread]: On master: BEGIN
[0m15:37:14.378647 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:37:14.378647 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:37:14.379654 [debug] [MainThread]: On master: COMMIT
[0m15:37:14.380316 [debug] [MainThread]: Using duckdb connection "master"
[0m15:37:14.380316 [debug] [MainThread]: On master: COMMIT
[0m15:37:14.381360 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:37:14.381890 [debug] [MainThread]: On master: Close
[0m15:37:14.382431 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:37:14.382962 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:37:14.382962 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:37:14.383485 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59' was properly closed.
[0m15:37:14.384046 [info ] [MainThread]: 
[0m15:37:14.384586 [info ] [MainThread]: Finished running 10 seeds, 25 table models, 57 data tests in 0 hours 0 minutes and 2.84 seconds (2.84s).
[0m15:37:14.389205 [debug] [MainThread]: Command end result
[0m15:37:14.425345 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:37:14.428306 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:37:14.434014 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:37:14.435020 [info ] [MainThread]: 
[0m15:37:14.435020 [info ] [MainThread]: [31mCompleted with 17 errors, 0 partial successes, and 0 warnings:[0m
[0m15:37:14.435020 [info ] [MainThread]: 
[0m15:37:14.435020 [error] [MainThread]: [31mFailure in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)[0m
[0m15:37:14.436020 [error] [MainThread]:   Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m15:37:14.436020 [info ] [MainThread]: 
[0m15:37:14.436524 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_capital_prudencial.sql
[0m15:37:14.436524 [info ] [MainThread]: 
[0m15:37:14.436524 [error] [MainThread]: [31mFailure in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)[0m
[0m15:37:14.437029 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Catalog Error: Table with name prudential_conglomerates_portfolio_indexer does not exist!
  Did you mean "prudential_conglomerates_capital_information"?
  
  LINE 40: FROM "silver"."main"."prudential_conglomerates_portfolio_indexer...
                ^
[0m15:37:14.437029 [info ] [MainThread]: 
[0m15:37:14.437029 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_indexador.sql
[0m15:37:14.437029 [info ] [MainThread]: 
[0m15:37:14.438036 [error] [MainThread]: [31mFailure in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)[0m
[0m15:37:14.438036 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m15:37:14.438036 [info ] [MainThread]: 
[0m15:37:14.438036 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_totais.sql
[0m15:37:14.439035 [info ] [MainThread]: 
[0m15:37:14.439035 [error] [MainThread]: [31mFailure in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)[0m
[0m15:37:14.439035 [error] [MainThread]:   Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m15:37:14.439035 [info ] [MainThread]: 
[0m15:37:14.440036 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_demonstracao_resultado.sql
[0m15:37:14.440036 [info ] [MainThread]: 
[0m15:37:14.440036 [error] [MainThread]: [31mFailure in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)[0m
[0m15:37:14.440541 [error] [MainThread]:   Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Binder Error: Referenced column "carteira_credito_classificada" not found in FROM clause!
  Candidate bindings: "carteira_de_credito_classificada", "captacoes", "ativo_total", "tipo_de_consolidacao", "data_base"
  
  LINE 25:         carteira_credito_classificada as carteira_credito,
                   ^
[0m15:37:14.440541 [info ] [MainThread]: 
[0m15:37:14.441064 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_resumo_financeiro.sql
[0m15:37:14.441064 [info ] [MainThread]: 
[0m15:37:14.441596 [error] [MainThread]: [31mFailure in seed seed_dim_atividade (seeds\seed_dim_atividade.csv)[0m
[0m15:37:14.441596 [error] [MainThread]:   Runtime Error in seed seed_dim_atividade (seeds\seed_dim_atividade.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv"
[0m15:37:14.442107 [info ] [MainThread]: 
[0m15:37:14.442107 [error] [MainThread]: [31mFailure in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)[0m
[0m15:37:14.442630 [error] [MainThread]:   Runtime Error in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv"
[0m15:37:14.442630 [info ] [MainThread]: 
[0m15:37:14.442630 [error] [MainThread]: [31mFailure in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)[0m
[0m15:37:14.443149 [error] [MainThread]:   Runtime Error in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv"
[0m15:37:14.443149 [info ] [MainThread]: 
[0m15:37:14.443668 [error] [MainThread]: [31mFailure in seed seed_dim_controle (seeds\seed_dim_controle.csv)[0m
[0m15:37:14.443668 [error] [MainThread]:   Runtime Error in seed seed_dim_controle (seeds\seed_dim_controle.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv"
[0m15:37:14.443668 [info ] [MainThread]: 
[0m15:37:14.444184 [error] [MainThread]: [31mFailure in seed seed_dim_faixa_vencimento (seeds\seed_dim_faixa_vencimento.csv)[0m
[0m15:37:14.444184 [error] [MainThread]:   Runtime Error in seed seed_dim_faixa_vencimento (seeds\seed_dim_faixa_vencimento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv"
[0m15:37:14.444700 [info ] [MainThread]: 
[0m15:37:14.444700 [error] [MainThread]: [31mFailure in seed seed_dim_porte (seeds\seed_dim_porte.csv)[0m
[0m15:37:14.445218 [error] [MainThread]:   Runtime Error in seed seed_dim_porte (seeds\seed_dim_porte.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv"
[0m15:37:14.445218 [info ] [MainThread]: 
[0m15:37:14.445218 [error] [MainThread]: [31mFailure in seed seed_dim_produto_credito (seeds\seed_dim_produto_credito.csv)[0m
[0m15:37:14.445735 [error] [MainThread]:   Runtime Error in seed seed_dim_produto_credito (seeds\seed_dim_produto_credito.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv"
[0m15:37:14.445735 [info ] [MainThread]: 
[0m15:37:14.446252 [error] [MainThread]: [31mFailure in seed seed_dim_regiao (seeds\seed_dim_regiao.csv)[0m
[0m15:37:14.446252 [error] [MainThread]:   Runtime Error in seed seed_dim_regiao (seeds\seed_dim_regiao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv"
[0m15:37:14.446809 [info ] [MainThread]: 
[0m15:37:14.446809 [error] [MainThread]: [31mFailure in seed seed_dim_risco (seeds\seed_dim_risco.csv)[0m
[0m15:37:14.446809 [error] [MainThread]:   Runtime Error in seed seed_dim_risco (seeds\seed_dim_risco.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv"
[0m15:37:14.447343 [info ] [MainThread]: 
[0m15:37:14.447343 [error] [MainThread]: [31mFailure in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)[0m
[0m15:37:14.447343 [error] [MainThread]:   Runtime Error in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv"
[0m15:37:14.447343 [info ] [MainThread]: 
[0m15:37:14.447343 [error] [MainThread]: [31mFailure in test unique_dim_instituicao_id_instituicao (models\gold\schema.yml)[0m
[0m15:37:14.448348 [error] [MainThread]:   Got 3859 results, configured to fail if != 0
[0m15:37:14.448348 [info ] [MainThread]: 
[0m15:37:14.448348 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\unique_dim_instituicao_id_instituicao.sql
[0m15:37:14.448348 [info ] [MainThread]: 
[0m15:37:14.448348 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)[0m
[0m15:37:14.449348 [error] [MainThread]:   Got 3 results, configured to fail if != 0
[0m15:37:14.449348 [info ] [MainThread]: 
[0m15:37:14.449852 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_446031b84e0fad1bdbfdd1cf73647908.sql
[0m15:37:14.449852 [info ] [MainThread]: 
[0m15:37:14.449852 [info ] [MainThread]: Done. PASS=19 WARN=0 ERROR=17 SKIP=56 NO-OP=0 TOTAL=92
[0m15:37:14.450857 [debug] [MainThread]: Command `dbt build` failed at 15:37:14.450857 after 4.28 seconds
[0m15:37:14.451399 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000025823357740>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000258233575C0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000258210A24E0>]}
[0m15:37:14.451399 [debug] [MainThread]: Flushing usage events
[0m15:37:15.234589 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:38:30.644547 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235BE2C86B0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235BE2CA270>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235BE2CB6B0>]}


============================== 15:38:30.662789 | 15a52be2-645a-4510-910b-6b5c509035b0 ==============================
[0m15:38:30.662789 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:38:30.663298 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'invocation_command': 'dbt run --select fato_resumo_financeiro --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:38:30.888259 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '15a52be2-645a-4510-910b-6b5c509035b0', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235BFBB1790>]}
[0m15:38:30.947421 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '15a52be2-645a-4510-910b-6b5c509035b0', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235BDBD5E20>]}
[0m15:38:30.951007 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:38:31.204683 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:38:31.384310 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m15:38:31.384310 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m15:38:31.384310 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m15:38:31.389837 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:38:31.434956 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '15a52be2-645a-4510-910b-6b5c509035b0', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235BFED77D0>]}
[0m15:38:31.525298 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:38:31.527812 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:38:31.570153 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '15a52be2-645a-4510-910b-6b5c509035b0', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235C03F6420>]}
[0m15:38:31.570668 [info ] [MainThread]: Found 25 models, 10 seeds, 57 data tests, 33 sources, 590 macros
[0m15:38:31.571184 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '15a52be2-645a-4510-910b-6b5c509035b0', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235BE3FA7E0>]}
[0m15:38:31.573279 [info ] [MainThread]: 
[0m15:38:31.573791 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:38:31.574335 [info ] [MainThread]: 
[0m15:38:31.574847 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:38:31.575902 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:38:31.750523 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:38:31.751364 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:38:31.752407 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:38:32.062135 [debug] [ThreadPool]: SQL status: OK in 0.310 seconds
[0m15:38:32.063933 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:38:32.064448 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:38:32.065459 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:38:32.073871 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:38:32.074879 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:38:32.075879 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:38:32.076880 [debug] [ThreadPool]: SQL status: OK in 0.002 seconds
[0m15:38:32.079389 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:38:32.079389 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:38:32.080400 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:38:32.081401 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:38:32.081401 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:38:32.082400 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:38:32.083399 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:38:32.084317 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:38:32.084826 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:38:32.085217 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:38:32.085831 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:38:32.096043 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:38:32.105041 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:38:32.105041 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:38:32.106048 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:38:32.106552 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:38:32.107057 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:38:32.107057 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:38:32.119332 [debug] [ThreadPool]: SQL status: OK in 0.012 seconds
[0m15:38:32.120398 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:38:32.121448 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:38:32.121448 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:38:32.123016 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '15a52be2-645a-4510-910b-6b5c509035b0', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235C0617470>]}
[0m15:38:32.123544 [debug] [MainThread]: Using duckdb connection "master"
[0m15:38:32.124077 [debug] [MainThread]: On master: BEGIN
[0m15:38:32.124808 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:38:32.125391 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:38:32.125947 [debug] [MainThread]: On master: COMMIT
[0m15:38:32.125947 [debug] [MainThread]: Using duckdb connection "master"
[0m15:38:32.125947 [debug] [MainThread]: On master: COMMIT
[0m15:38:32.126957 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:38:32.126957 [debug] [MainThread]: On master: Close
[0m15:38:32.130968 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:38:32.130968 [info ] [Thread-1 (]: 1 of 1 START sql table model main.fato_resumo_financeiro ....................... [RUN]
[0m15:38:32.130968 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.fato_resumo_financeiro'
[0m15:38:32.132648 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:38:32.137906 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:38:32.138907 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:38:32.164618 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:38:32.165629 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:38:32.165629 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m15:38:32.165629 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:38:32.166664 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:38:32.167169 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:38:32.167169 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_credito_classificada as carteira_credito,
        passivo_circulante_exigivel_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        quantidade_agencias,
        quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_credito_classificada as carteira_credito,
        passivo_circulante_exigivel_longo_prazo as passivo_exigivel,
        captacoes_totais as captacoes,
        patrimonio_liquido,
        lucro_liquido,
        quantidade_agencias,
        quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(cast(d.codigo as bigint) as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido

FROM dados_brutos d
    );
  
  
[0m15:38:32.168176 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    SELECT
        codigo, data_base, ativo_total, lucro_liquido, patrimonio_liquido
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_credito_classificada as carteira_credito,
        passivo_circulante_exigivel_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        quantidade_agencias,
        quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_credito_classificada as carteira_credito,
        passivo_circulante_exigivel_longo_prazo as passivo_exigivel,
        captacoes_totais as captacoes,
        patrimonio_liquido,
        lucro_liquido,
        quantidade_agencias,
        quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    md5(cast(cast(d.codigo as bigint) as varchar)) as id_instituicao, -- FK para dim_instituicao
    strftime(d.data_base, '%Y%m%d')::int as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.lucro_liquido,
    d.patrimonio_liquido

FROM dados_brutos d
    );
  
  
[0m15:38:32.168176 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:38:32.169181 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: ROLLBACK
[0m15:38:32.173915 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_resumo_financeiro'
[0m15:38:32.173915 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m15:38:32.175915 [debug] [Thread-1 (]: Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Binder Error: Referenced column "carteira_credito_classificada" not found in FROM clause!
  Candidate bindings: "carteira_de_credito_classificada", "captacoes", "ativo_total", "tipo_de_consolidacao", "data_base"
  
  LINE 25:         carteira_credito_classificada as carteira_credito,
                   ^
[0m15:38:32.178418 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '15a52be2-645a-4510-910b-6b5c509035b0', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235BDC20260>]}
[0m15:38:32.178418 [error] [Thread-1 (]: 1 of 1 ERROR creating sql table model main.fato_resumo_financeiro .............. [[31mERROR[0m in 0.05s]
[0m15:38:32.179422 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:38:32.179422 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_resumo_financeiro' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Binder Error: Referenced column "carteira_credito_classificada" not found in FROM clause!
  Candidate bindings: "carteira_de_credito_classificada", "captacoes", "ativo_total", "tipo_de_consolidacao", "data_base"
  
  LINE 25:         carteira_credito_classificada as carteira_credito,
                   ^.
[0m15:38:32.180975 [debug] [MainThread]: Using duckdb connection "master"
[0m15:38:32.180975 [debug] [MainThread]: On master: BEGIN
[0m15:38:32.182522 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:38:32.182522 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:38:32.182522 [debug] [MainThread]: On master: COMMIT
[0m15:38:32.182522 [debug] [MainThread]: Using duckdb connection "master"
[0m15:38:32.182522 [debug] [MainThread]: On master: COMMIT
[0m15:38:32.184079 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:38:32.184079 [debug] [MainThread]: On master: Close
[0m15:38:32.184079 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:38:32.184079 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:38:32.184079 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:38:32.184079 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_resumo_financeiro' was properly closed.
[0m15:38:32.184079 [info ] [MainThread]: 
[0m15:38:32.185621 [info ] [MainThread]: Finished running 1 table model in 0 hours 0 minutes and 0.61 seconds (0.61s).
[0m15:38:32.186259 [debug] [MainThread]: Command end result
[0m15:38:32.215410 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:38:32.217431 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:38:32.222986 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:38:32.222986 [info ] [MainThread]: 
[0m15:38:32.223992 [info ] [MainThread]: [31mCompleted with 1 error, 0 partial successes, and 0 warnings:[0m
[0m15:38:32.223992 [info ] [MainThread]: 
[0m15:38:32.224991 [error] [MainThread]: [31mFailure in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)[0m
[0m15:38:32.224991 [error] [MainThread]:   Runtime Error in model fato_resumo_financeiro (models\gold\fato_resumo_financeiro.sql)
  Binder Error: Referenced column "carteira_credito_classificada" not found in FROM clause!
  Candidate bindings: "carteira_de_credito_classificada", "captacoes", "ativo_total", "tipo_de_consolidacao", "data_base"
  
  LINE 25:         carteira_credito_classificada as carteira_credito,
                   ^
[0m15:38:32.227996 [info ] [MainThread]: 
[0m15:38:32.227996 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_resumo_financeiro.sql
[0m15:38:32.227996 [info ] [MainThread]: 
[0m15:38:32.227996 [info ] [MainThread]: Done. PASS=0 WARN=0 ERROR=1 SKIP=0 NO-OP=0 TOTAL=1
[0m15:38:32.230994 [debug] [MainThread]: Command `dbt run` failed at 15:38:32.229987 after 1.86 seconds
[0m15:38:32.230994 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235BEB679E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235C044ED80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000235BD6FC6E0>]}
[0m15:38:32.231499 [debug] [MainThread]: Flushing usage events
[0m15:38:32.860326 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:42:25.628097 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945D089D30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945D08A480>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945A9C2FC0>]}


============================== 15:42:25.632812 | 598dcef5-6101-463c-8811-7628213c7a0c ==============================
[0m15:42:25.632812 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:42:25.633826 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt run --select dim_instituicao fato_resumo_financeiro fato_balanco_patrimonial --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:42:25.836994 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '598dcef5-6101-463c-8811-7628213c7a0c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945A42F200>]}
[0m15:42:25.893829 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '598dcef5-6101-463c-8811-7628213c7a0c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945A51A8A0>]}
[0m15:42:25.895384 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:42:26.161962 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:42:26.309754 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 2 files changed.
[0m15:42:26.310321 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_resumo_financeiro.sql
[0m15:42:26.310869 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_balanco_patrimonial.sql
[0m15:42:26.311415 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_capital_prudencial.sql
[0m15:42:26.311946 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_carteira_credito_indexador.sql
[0m15:42:26.311946 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_carteira_credito_totais.sql
[0m15:42:26.311946 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_demonstracao_resultado.sql
[0m15:42:26.313468 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_movimentacao_cambio.sql
[0m15:42:26.314742 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\dim_instituicao.sql
[0m15:42:26.717938 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on
'fato_resumo_financeiro' in package 'bacen_ifdata_analytics'
(models\gold\schema.yml). Arguments to generic tests should be nested under the
`arguments` property.
[0m15:42:26.718963 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '598dcef5-6101-463c-8811-7628213c7a0c', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945EC24230>]}
[0m15:42:26.932848 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:42:26.946815 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '598dcef5-6101-463c-8811-7628213c7a0c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945F18B350>]}
[0m15:42:27.037119 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:42:27.038689 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:42:27.073244 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '598dcef5-6101-463c-8811-7628213c7a0c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945F072C60>]}
[0m15:42:27.073244 [info ] [MainThread]: Found 25 models, 10 seeds, 57 data tests, 33 sources, 590 macros
[0m15:42:27.074259 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '598dcef5-6101-463c-8811-7628213c7a0c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945F0046B0>]}
[0m15:42:27.076273 [info ] [MainThread]: 
[0m15:42:27.076273 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:42:27.076273 [info ] [MainThread]: 
[0m15:42:27.077784 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:42:27.081044 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:42:27.156439 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:42:27.156978 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:42:27.157510 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:42:27.249209 [debug] [ThreadPool]: SQL status: OK in 0.092 seconds
[0m15:42:27.249718 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:42:27.251242 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:42:27.251242 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:42:27.256154 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:42:27.256684 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:42:27.256684 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:42:27.257731 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:42:27.258791 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:42:27.258791 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:42:27.259338 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:42:27.259338 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:42:27.259871 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:42:27.259871 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:42:27.260384 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:42:27.260937 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:42:27.260937 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:42:27.261490 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:42:27.261490 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:42:27.263036 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:42:27.267214 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:42:27.267214 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:42:27.268238 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:42:27.268238 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:42:27.268238 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:42:27.268238 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:42:27.277989 [debug] [ThreadPool]: SQL status: OK in 0.010 seconds
[0m15:42:27.279585 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:42:27.279585 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:42:27.281197 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:42:27.281197 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '598dcef5-6101-463c-8811-7628213c7a0c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945D9FBD10>]}
[0m15:42:27.281197 [debug] [MainThread]: Using duckdb connection "master"
[0m15:42:27.282793 [debug] [MainThread]: On master: BEGIN
[0m15:42:27.282793 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:42:27.282793 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:42:27.282793 [debug] [MainThread]: On master: COMMIT
[0m15:42:27.283801 [debug] [MainThread]: Using duckdb connection "master"
[0m15:42:27.283801 [debug] [MainThread]: On master: COMMIT
[0m15:42:27.284342 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:42:27.284342 [debug] [MainThread]: On master: Close
[0m15:42:27.286983 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:42:27.289036 [info ] [Thread-1 (]: 1 of 3 START sql table model main.dim_instituicao .............................. [RUN]
[0m15:42:27.290042 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m15:42:27.290042 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m15:42:27.297367 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:42:27.297896 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m15:42:27.337786 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:42:27.338823 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:42:27.338823 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m15:42:27.338823 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:42:27.340434 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:27.340434 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:42:27.340434 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m15:42:27.535830 [debug] [Thread-1 (]: SQL status: OK in 0.195 seconds
[0m15:42:27.540889 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:42:27.541416 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m15:42:27.542472 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:27.544088 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:42:27.544668 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m15:42:27.547204 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m15:42:27.552415 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:42:27.553423 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m15:42:27.555043 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:27.557745 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:42:27.557745 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m15:42:27.558755 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:42:27.569190 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:42:27.569797 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:42:27.569797 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m15:42:27.586405 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m15:42:27.592028 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m15:42:27.593060 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m15:42:27.598461 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m15:42:27.601032 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m15:42:27.603237 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '598dcef5-6101-463c-8811-7628213c7a0c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945A42E4B0>]}
[0m15:42:27.603743 [info ] [Thread-1 (]: 1 of 3 OK created sql table model main.dim_instituicao ......................... [[32mOK[0m in 0.31s]
[0m15:42:27.604339 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m15:42:27.604973 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:42:27.604973 [info ] [Thread-1 (]: 2 of 3 START sql table model main.fato_balanco_patrimonial ..................... [RUN]
[0m15:42:27.605984 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m15:42:27.606491 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:42:27.610181 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:42:27.610716 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:42:27.613303 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:42:27.614859 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:42:27.614859 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m15:42:27.615457 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:27.615457 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:42:27.615457 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:42:27.616479 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m15:42:28.159041 [debug] [Thread-1 (]: SQL status: OK in 0.542 seconds
[0m15:42:28.163143 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:42:28.163143 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m15:42:28.165141 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:28.166944 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:42:28.167945 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m15:42:28.169464 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:28.173987 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:42:28.175218 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m15:42:28.176305 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:28.181252 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:42:28.182264 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m15:42:28.183307 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:28.185986 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m15:42:28.185986 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:42:28.186998 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m15:42:28.375429 [debug] [Thread-1 (]: SQL status: OK in 0.188 seconds
[0m15:42:28.379701 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m15:42:28.379701 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m15:42:28.385005 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m15:42:28.387758 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m15:42:28.388768 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '598dcef5-6101-463c-8811-7628213c7a0c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945C4A6ED0>]}
[0m15:42:28.389768 [info ] [Thread-1 (]: 2 of 3 OK created sql table model main.fato_balanco_patrimonial ................ [[32mOK[0m in 0.78s]
[0m15:42:28.390769 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m15:42:28.392280 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:42:28.392833 [info ] [Thread-1 (]: 3 of 3 START sql table model main.fato_resumo_financeiro ....................... [RUN]
[0m15:42:28.393342 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m15:42:28.393342 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:42:28.399901 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:42:28.401928 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:42:28.405313 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:42:28.407832 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:42:28.407832 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m15:42:28.408938 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:28.408938 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:28.410453 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:42:28.410961 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(d.data_base, '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m15:42:28.745618 [debug] [Thread-1 (]: SQL status: OK in 0.334 seconds
[0m15:42:28.749130 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:42:28.749130 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m15:42:28.750296 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:42:28.750801 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m15:42:28.750801 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:42:28.751812 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m15:42:28.922404 [debug] [Thread-1 (]: SQL status: OK in 0.170 seconds
[0m15:42:28.924533 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m15:42:28.924533 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m15:42:28.925627 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:42:28.926626 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m15:42:28.926626 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '598dcef5-6101-463c-8811-7628213c7a0c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945F71F110>]}
[0m15:42:28.928136 [info ] [Thread-1 (]: 3 of 3 OK created sql table model main.fato_resumo_financeiro .................. [[32mOK[0m in 0.53s]
[0m15:42:28.928136 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m15:42:28.929705 [debug] [MainThread]: Using duckdb connection "master"
[0m15:42:28.931258 [debug] [MainThread]: On master: BEGIN
[0m15:42:28.931258 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:42:28.931258 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:42:28.932841 [debug] [MainThread]: On master: COMMIT
[0m15:42:28.933854 [debug] [MainThread]: Using duckdb connection "master"
[0m15:42:28.934364 [debug] [MainThread]: On master: COMMIT
[0m15:42:28.934364 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:42:28.934364 [debug] [MainThread]: On master: Close
[0m15:42:28.935875 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:42:28.935875 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:42:28.935875 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:42:28.935875 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_resumo_financeiro' was properly closed.
[0m15:42:28.936885 [info ] [MainThread]: 
[0m15:42:28.937700 [info ] [MainThread]: Finished running 3 table models in 0 hours 0 minutes and 1.86 seconds (1.86s).
[0m15:42:28.938753 [debug] [MainThread]: Command end result
[0m15:42:28.974789 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:42:28.976784 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:42:28.980925 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:42:28.980925 [info ] [MainThread]: 
[0m15:42:28.982502 [info ] [MainThread]: [32mCompleted successfully[0m
[0m15:42:28.982502 [info ] [MainThread]: 
[0m15:42:28.982502 [info ] [MainThread]: Done. PASS=3 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=3
[0m15:42:28.982502 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 19 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m15:42:28.984698 [debug] [MainThread]: Command `dbt run` succeeded at 15:42:28.984698 after 3.60 seconds
[0m15:42:28.984698 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945D59A540>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945D2E4CE0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001945F2E57F0>]}
[0m15:42:28.984698 [debug] [MainThread]: Flushing usage events
[0m15:42:29.647870 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:42:43.175756 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028E1C1B7EC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028E1FDA10D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028E1F6B8680>]}


============================== 15:42:43.179271 | 71238a9e-4b0b-4258-8cd0-f256bdac3641 ==============================
[0m15:42:43.179271 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:42:43.180309 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'invocation_command': 'dbt test --select dim_instituicao fato_resumo_financeiro fato_balanco_patrimonial --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:42:43.398548 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '71238a9e-4b0b-4258-8cd0-f256bdac3641', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028E214181D0>]}
[0m15:42:43.449649 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '71238a9e-4b0b-4258-8cd0-f256bdac3641', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028E1FF04F50>]}
[0m15:42:43.453386 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:42:43.711936 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:42:43.902550 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m15:42:43.903562 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m15:42:43.904070 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m15:42:43.912953 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:42:44.003256 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '71238a9e-4b0b-4258-8cd0-f256bdac3641', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028E214976B0>]}
[0m15:42:44.232547 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:42:44.237122 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:42:44.367733 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '71238a9e-4b0b-4258-8cd0-f256bdac3641', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028E218AA8D0>]}
[0m15:42:44.368265 [info ] [MainThread]: Found 25 models, 10 seeds, 57 data tests, 33 sources, 590 macros
[0m15:42:44.369315 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '71238a9e-4b0b-4258-8cd0-f256bdac3641', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028E21729D60>]}
[0m15:42:44.374317 [info ] [MainThread]: 
[0m15:42:44.375315 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:42:44.376315 [info ] [MainThread]: 
[0m15:42:44.377315 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:42:44.385101 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:42:44.489828 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:42:44.490344 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:42:44.490941 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:42:44.612809 [debug] [ThreadPool]: SQL status: OK in 0.122 seconds
[0m15:42:44.612809 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:42:44.612809 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:42:44.625631 [debug] [ThreadPool]: SQL status: OK in 0.012 seconds
[0m15:42:44.627218 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:42:44.628268 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:42:44.628800 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:42:44.630843 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '71238a9e-4b0b-4258-8cd0-f256bdac3641', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028E21728F80>]}
[0m15:42:44.630843 [debug] [MainThread]: Using duckdb connection "master"
[0m15:42:44.631379 [debug] [MainThread]: On master: BEGIN
[0m15:42:44.631379 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:42:44.632387 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:42:44.632387 [debug] [MainThread]: On master: COMMIT
[0m15:42:44.632387 [debug] [MainThread]: Using duckdb connection "master"
[0m15:42:44.632387 [debug] [MainThread]: On master: COMMIT
[0m15:42:44.632387 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:42:44.632387 [debug] [MainThread]: On master: Close
[0m15:42:44.637037 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:42:44.637037 [info ] [Thread-1 (]: 1 of 21 START test not_null_dim_instituicao_id_instituicao ..................... [RUN]
[0m15:42:44.638043 [debug] [Thread-1 (]: Acquiring new duckdb connection 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m15:42:44.638043 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:42:44.654749 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:42:44.654749 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:42:44.670865 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:42:44.671926 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:42:44.672458 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m15:42:44.672458 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:42:44.673000 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.673520 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:42:44.673520 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.675609 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.678121 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m15:42:44.679701 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m15:42:44.679701 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m15:42:44.679701 [info ] [Thread-1 (]: 1 of 21 PASS not_null_dim_instituicao_id_instituicao ........................... [[32mPASS[0m in 0.04s]
[0m15:42:44.681282 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:42:44.681282 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:42:44.681282 [info ] [Thread-1 (]: 2 of 21 START test not_null_dim_instituicao_id_localizacao ..................... [RUN]
[0m15:42:44.682857 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m15:42:44.682857 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:42:44.685732 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:42:44.686738 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:42:44.688770 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:42:44.689771 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:42:44.689771 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m15:42:44.689771 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.691169 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.691169 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:42:44.691169 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.693199 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.694832 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m15:42:44.695843 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m15:42:44.695843 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m15:42:44.695843 [info ] [Thread-1 (]: 2 of 21 PASS not_null_dim_instituicao_id_localizacao ........................... [[32mPASS[0m in 0.01s]
[0m15:42:44.697346 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:42:44.697879 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:42:44.698415 [info ] [Thread-1 (]: 3 of 21 START test not_null_fato_balanco_patrimonial_id_data ................... [RUN]
[0m15:42:44.698944 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m15:42:44.699487 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:42:44.702686 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:42:44.703730 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:42:44.706421 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:42:44.708681 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:42:44.709281 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m15:42:44.709974 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.711195 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.711762 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m15:42:44.711762 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.713538 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.715305 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m15:42:44.716444 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m15:42:44.717007 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m15:42:44.717586 [info ] [Thread-1 (]: 3 of 21 PASS not_null_fato_balanco_patrimonial_id_data ......................... [[32mPASS[0m in 0.02s]
[0m15:42:44.718741 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m15:42:44.719305 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:42:44.719878 [info ] [Thread-1 (]: 4 of 21 START test not_null_fato_balanco_patrimonial_id_instituicao ............ [RUN]
[0m15:42:44.720438 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m15:42:44.721060 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:42:44.725323 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:42:44.727079 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:42:44.728089 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:42:44.729725 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:42:44.730736 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m15:42:44.730736 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.731732 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.731732 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m15:42:44.731732 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.732734 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.734807 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m15:42:44.736810 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m15:42:44.736810 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m15:42:44.736810 [info ] [Thread-1 (]: 4 of 21 PASS not_null_fato_balanco_patrimonial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m15:42:44.738317 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m15:42:44.739328 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:42:44.739328 [info ] [Thread-1 (]: 5 of 21 START test not_null_fato_resumo_financeiro_id_data ..................... [RUN]
[0m15:42:44.740328 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m15:42:44.740328 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:42:44.744325 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:42:44.745325 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:42:44.747328 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:42:44.748838 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:42:44.749849 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m15:42:44.750848 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.751849 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.751849 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:42:44.751849 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.752848 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.754884 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m15:42:44.755895 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m15:42:44.756892 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m15:42:44.756892 [info ] [Thread-1 (]: 5 of 21 PASS not_null_fato_resumo_financeiro_id_data ........................... [[32mPASS[0m in 0.02s]
[0m15:42:44.757894 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:42:44.757894 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:42:44.757894 [info ] [Thread-1 (]: 6 of 21 START test not_null_fato_resumo_financeiro_id_instituicao .............. [RUN]
[0m15:42:44.759401 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m15:42:44.759401 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:42:44.762410 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:42:44.764409 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:42:44.766410 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:42:44.767411 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:42:44.767411 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m15:42:44.767411 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.768411 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.768411 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:42:44.769921 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.770931 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.772933 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m15:42:44.774934 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m15:42:44.774934 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m15:42:44.775936 [info ] [Thread-1 (]: 6 of 21 PASS not_null_fato_resumo_financeiro_id_instituicao .................... [[32mPASS[0m in 0.02s]
[0m15:42:44.776935 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:42:44.777934 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:42:44.777934 [info ] [Thread-1 (]: 7 of 21 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m15:42:44.778935 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m15:42:44.779934 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:42:44.789001 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:42:44.790002 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:42:44.792521 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:42:44.793520 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:42:44.794525 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m15:42:44.794525 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.795522 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.795522 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:42:44.796526 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.807045 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.808046 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:42:44.809047 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m15:42:44.818946 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m15:42:44.819498 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m15:42:44.821588 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_classe_instituicao"
                    ^
[0m15:42:44.822597 [error] [Thread-1 (]: 7 of 21 ERROR relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[31mERROR[0m in 0.04s]
[0m15:42:44.823656 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:42:44.823656 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:42:44.824664 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_classe_instituicao"
                    ^.
[0m15:42:44.824664 [info ] [Thread-1 (]: 8 of 21 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m15:42:44.826667 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m15:42:44.827113 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:42:44.831260 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:42:44.832824 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:42:44.833835 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:42:44.835089 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:42:44.836089 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m15:42:44.836597 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.837103 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.837103 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:42:44.838129 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.839114 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.840111 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:42:44.840111 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m15:42:44.842673 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m15:42:44.842673 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m15:42:44.844767 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_consolidado"
                    ^
[0m15:42:44.845819 [error] [Thread-1 (]: 8 of 21 ERROR relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[31mERROR[0m in 0.02s]
[0m15:42:44.845819 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:42:44.846776 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:42:44.846776 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_consolidado"
                    ^.
[0m15:42:44.847379 [info ] [Thread-1 (]: 9 of 21 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m15:42:44.847379 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m15:42:44.847379 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:42:44.852306 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:42:44.853858 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:42:44.855006 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:42:44.856545 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:42:44.857059 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m15:42:44.857059 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.857664 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:42:44.857664 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:42:44.857664 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.858674 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.858674 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:42:44.858674 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m15:42:44.862376 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m15:42:44.862376 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m15:42:44.864492 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_controle"
                    ^
[0m15:42:44.864492 [error] [Thread-1 (]: 9 of 21 ERROR relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[31mERROR[0m in 0.02s]
[0m15:42:44.865504 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:42:44.866506 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:42:44.866506 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_controle"
                    ^.
[0m15:42:44.867503 [info ] [Thread-1 (]: 10 of 21 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m15:42:44.867503 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m15:42:44.868502 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:42:44.873622 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:42:44.874619 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:42:44.875715 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:42:44.877221 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:42:44.877821 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m15:42:44.877821 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.877821 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:42:44.878835 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:42:44.878835 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.882862 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m15:42:44.884430 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m15:42:44.884980 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m15:42:44.884980 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m15:42:44.885994 [error] [Thread-1 (]: 10 of 21 FAIL 1 relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[31mFAIL 1[0m in 0.02s]
[0m15:42:44.886501 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:42:44.887008 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:42:44.887008 [info ] [Thread-1 (]: 11 of 21 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m15:42:44.887008 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m15:42:44.888017 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:42:44.892071 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:42:44.893564 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:42:44.895735 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:42:44.897247 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:42:44.897247 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m15:42:44.897247 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.898257 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:44.898257 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:42:44.898257 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.899257 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.900379 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:42:44.900379 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m15:42:44.903007 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m15:42:44.904015 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m15:42:44.906200 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "dim_tempo"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_segmento"
                    ^
[0m15:42:44.906200 [error] [Thread-1 (]: 11 of 21 ERROR relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[31mERROR[0m in 0.02s]
[0m15:42:44.906200 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:42:44.907465 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:42:44.907465 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "dim_tempo"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_segmento"
                    ^.
[0m15:42:44.907465 [info ] [Thread-1 (]: 12 of 21 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:42:44.908472 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m15:42:44.908472 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:42:44.914013 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:42:44.915528 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:42:44.916554 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:42:44.918049 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:42:44.919064 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m15:42:44.919064 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.919682 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:42:44.920270 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m15:42:44.920270 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.923943 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m15:42:44.924975 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m15:42:44.925943 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m15:42:44.925943 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m15:42:44.927453 [info ] [Thread-1 (]: 12 of 21 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m15:42:44.927961 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m15:42:44.927961 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:42:44.927961 [info ] [Thread-1 (]: 13 of 21 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:42:44.927961 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m15:42:44.929525 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:42:44.934132 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:42:44.935135 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:42:44.937210 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:42:44.937210 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:42:44.938228 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m15:42:44.938228 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.938228 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:42:44.938228 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:42:44.939774 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.946969 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m15:42:44.948498 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m15:42:44.948498 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m15:42:44.949516 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m15:42:44.950060 [info ] [Thread-1 (]: 13 of 21 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m15:42:44.950060 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:42:44.950060 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:42:44.951070 [info ] [Thread-1 (]: 14 of 21 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:42:44.951632 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m15:42:44.952176 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:42:44.955906 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:42:44.957131 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:42:44.961479 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:42:44.961479 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:42:44.961479 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m15:42:44.963394 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.963820 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:42:44.963820 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:42:44.964405 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.964405 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.965407 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:42:44.965407 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m15:42:44.967603 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m15:42:44.968149 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m15:42:44.970268 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "fato_balanco_patrimonial"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^
[0m15:42:44.970268 [error] [Thread-1 (]: 14 of 21 ERROR relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:42:44.971276 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:42:44.971276 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:42:44.972346 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "fato_balanco_patrimonial"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^.
[0m15:42:44.972346 [info ] [Thread-1 (]: 15 of 21 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:42:44.972948 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m15:42:44.972948 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:42:44.977220 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:42:44.978225 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:42:44.979283 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:42:44.980851 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:42:44.980851 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m15:42:44.980851 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:44.980851 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:42:44.980851 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:42:44.982444 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.982444 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:44.983424 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:42:44.983424 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m15:42:44.985039 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m15:42:44.986000 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m15:42:44.987064 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^
[0m15:42:44.988103 [error] [Thread-1 (]: 15 of 21 ERROR relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:42:44.989086 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:42:44.989086 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:42:44.990082 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^.
[0m15:42:44.990082 [info ] [Thread-1 (]: 16 of 21 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:42:44.991170 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m15:42:44.991170 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:42:44.995323 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:42:44.996379 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:42:44.998524 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:42:44.998524 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:42:44.998524 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m15:42:45.000073 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:45.000073 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:42:45.000073 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:42:45.001124 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:45.001657 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:45.002213 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:42:45.002213 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m15:42:45.005966 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m15:42:45.006475 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m15:42:45.008132 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^
[0m15:42:45.008132 [error] [Thread-1 (]: 16 of 21 ERROR relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:42:45.009141 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:42:45.010140 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:42:45.010140 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^.
[0m15:42:45.010140 [info ] [Thread-1 (]: 17 of 21 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:42:45.011744 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m15:42:45.011744 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:42:45.015388 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:42:45.016399 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:42:45.017456 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:42:45.019105 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:42:45.019712 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m15:42:45.019712 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:45.020976 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:45.021494 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:42:45.021494 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:45.022504 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:45.022504 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:42:45.023012 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m15:42:45.025537 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m15:42:45.025537 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m15:42:45.027667 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^
[0m15:42:45.028189 [error] [Thread-1 (]: 17 of 21 ERROR relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:42:45.029264 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:42:45.029790 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:42:45.029790 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^.
[0m15:42:45.029790 [info ] [Thread-1 (]: 18 of 21 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:42:45.031311 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m15:42:45.031311 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:42:45.036281 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:42:45.036800 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:42:45.038376 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:42:45.039961 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:42:45.040969 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m15:42:45.040969 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:45.041972 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:45.041972 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:42:45.042485 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:45.044545 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:42:45.046553 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m15:42:45.046553 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m15:42:45.047955 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m15:42:45.047955 [info ] [Thread-1 (]: 18 of 21 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m15:42:45.047955 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:42:45.049532 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:42:45.049532 [info ] [Thread-1 (]: 19 of 21 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:42:45.049532 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m15:42:45.049532 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:42:45.055957 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:42:45.056997 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:42:45.058537 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:42:45.060045 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:42:45.060045 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m15:42:45.060045 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:45.060045 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:42:45.061593 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:42:45.061593 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:45.065549 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m15:42:45.067621 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m15:42:45.068750 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m15:42:45.068750 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m15:42:45.069805 [info ] [Thread-1 (]: 19 of 21 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m15:42:45.070328 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:42:45.070858 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:42:45.071389 [info ] [Thread-1 (]: 20 of 21 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:42:45.071929 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m15:42:45.072467 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:42:45.077150 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:42:45.077150 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:42:45.079677 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:42:45.079677 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:42:45.081610 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m15:42:45.081610 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:45.082619 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:45.083128 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:42:45.083128 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:42:45.090239 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m15:42:45.090799 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m15:42:45.092312 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m15:42:45.092312 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m15:42:45.092817 [info ] [Thread-1 (]: 20 of 21 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m15:42:45.092817 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:42:45.094525 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:42:45.094525 [info ] [Thread-1 (]: 21 of 21 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m15:42:45.095533 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m15:42:45.095533 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:42:45.102058 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:42:45.102579 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:42:45.104699 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:42:45.106298 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:42:45.106298 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m15:42:45.107315 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:42:45.107315 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:42:45.107315 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:42:45.107315 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:42:45.112642 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m15:42:45.113682 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m15:42:45.114789 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m15:42:45.115380 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m15:42:45.115380 [info ] [Thread-1 (]: 21 of 21 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.02s]
[0m15:42:45.116390 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:42:45.117552 [debug] [MainThread]: Using duckdb connection "master"
[0m15:42:45.117552 [debug] [MainThread]: On master: BEGIN
[0m15:42:45.119101 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:42:45.119698 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:42:45.120257 [debug] [MainThread]: On master: COMMIT
[0m15:42:45.120257 [debug] [MainThread]: Using duckdb connection "master"
[0m15:42:45.120257 [debug] [MainThread]: On master: COMMIT
[0m15:42:45.121263 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:42:45.121263 [debug] [MainThread]: On master: Close
[0m15:42:45.121771 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:42:45.121771 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:42:45.121771 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37' was properly closed.
[0m15:42:45.122278 [info ] [MainThread]: 
[0m15:42:45.122850 [info ] [MainThread]: Finished running 21 data tests in 0 hours 0 minutes and 0.75 seconds (0.75s).
[0m15:42:45.124859 [debug] [MainThread]: Command end result
[0m15:42:45.165506 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:42:45.167699 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:42:45.173001 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:42:45.173001 [info ] [MainThread]: 
[0m15:42:45.174018 [info ] [MainThread]: [31mCompleted with 9 errors, 0 partial successes, and 0 warnings:[0m
[0m15:42:45.174018 [info ] [MainThread]: 
[0m15:42:45.175010 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)[0m
[0m15:42:45.175010 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_classe_instituicao"
                    ^
[0m15:42:45.176011 [info ] [MainThread]: 
[0m15:42:45.176669 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_b5bf1250f8e22e22ed6029d8a9776333.sql
[0m15:42:45.176669 [info ] [MainThread]: 
[0m15:42:45.176669 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)[0m
[0m15:42:45.178191 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_consolidado"
                    ^
[0m15:42:45.178191 [info ] [MainThread]: 
[0m15:42:45.179203 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_0eacdd127a052df6ef946b12273a2332.sql
[0m15:42:45.179203 [info ] [MainThread]: 
[0m15:42:45.179203 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)[0m
[0m15:42:45.180272 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_controle"
                    ^
[0m15:42:45.180272 [info ] [MainThread]: 
[0m15:42:45.181275 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_9713fcede76412e01759a305783eeec2.sql
[0m15:42:45.181783 [info ] [MainThread]: 
[0m15:42:45.181783 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)[0m
[0m15:42:45.182320 [error] [MainThread]:   Got 1 result, configured to fail if != 0
[0m15:42:45.182847 [info ] [MainThread]: 
[0m15:42:45.183380 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_446031b84e0fad1bdbfdd1cf73647908.sql
[0m15:42:45.183919 [info ] [MainThread]: 
[0m15:42:45.185010 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)[0m
[0m15:42:45.185545 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "dim_tempo"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_segmento"
                    ^
[0m15:42:45.186062 [info ] [MainThread]: 
[0m15:42:45.186590 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_cf3f8176c8c99f31e0910db0802babb1.sql
[0m15:42:45.186590 [info ] [MainThread]: 
[0m15:42:45.187108 [error] [MainThread]: [31mFailure in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:42:45.187643 [error] [MainThread]:   Runtime Error in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "fato_balanco_patrimonial"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^
[0m15:42:45.187643 [info ] [MainThread]: 
[0m15:42:45.188650 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_capital_pru_dc7c09807e22eeacb03b88bc50c11898.sql
[0m15:42:45.188650 [info ] [MainThread]: 
[0m15:42:45.188650 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:42:45.188650 [error] [MainThread]:   Runtime Error in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^
[0m15:42:45.190157 [info ] [MainThread]: 
[0m15:42:45.190157 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_d80151d1e76d6c8de6ceccc7adebe863.sql
[0m15:42:45.191165 [info ] [MainThread]: 
[0m15:42:45.191165 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:42:45.191772 [error] [MainThread]:   Runtime Error in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^
[0m15:42:45.192300 [info ] [MainThread]: 
[0m15:42:45.192851 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_b00506d5726bd2130bedc66dca5f83d0.sql
[0m15:42:45.192851 [info ] [MainThread]: 
[0m15:42:45.193392 [error] [MainThread]: [31mFailure in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:42:45.193392 [error] [MainThread]:   Runtime Error in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^
[0m15:42:45.193392 [info ] [MainThread]: 
[0m15:42:45.194405 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_demonstraca_db359e0c9415ad5a3f4bbc17154e2e4a.sql
[0m15:42:45.194405 [info ] [MainThread]: 
[0m15:42:45.195521 [info ] [MainThread]: Done. PASS=12 WARN=0 ERROR=9 SKIP=0 NO-OP=0 TOTAL=21
[0m15:42:45.196522 [debug] [MainThread]: Command `dbt test` failed at 15:42:45.196522 after 2.17 seconds
[0m15:42:45.197030 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028E1F6B8680>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028E2022B500>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000028E1FE68D70>]}
[0m15:42:45.197030 [debug] [MainThread]: Flushing usage events
[0m15:42:45.803327 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:43:12.970451 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002445F25C950>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002445B3B31D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002445F67F920>]}


============================== 15:43:12.978205 | 602229d4-4d79-4bdb-b45b-26fa45b6f07c ==============================
[0m15:43:12.978205 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:43:12.981235 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'None', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt test --select dim_instituicao fato_resumo_financeiro --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:43:13.326624 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '602229d4-4d79-4bdb-b45b-26fa45b6f07c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024460AC24B0>]}
[0m15:43:13.390445 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '602229d4-4d79-4bdb-b45b-26fa45b6f07c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002445EC29550>]}
[0m15:43:13.392960 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:43:13.675162 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:43:13.867383 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m15:43:13.867383 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m15:43:13.867383 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m15:43:13.874053 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:43:13.913596 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '602229d4-4d79-4bdb-b45b-26fa45b6f07c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002445FA591F0>]}
[0m15:43:13.997249 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:43:13.999262 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:43:14.115070 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '602229d4-4d79-4bdb-b45b-26fa45b6f07c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002446116A990>]}
[0m15:43:14.115659 [info ] [MainThread]: Found 25 models, 10 seeds, 57 data tests, 33 sources, 590 macros
[0m15:43:14.116670 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '602229d4-4d79-4bdb-b45b-26fa45b6f07c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000244612A6B70>]}
[0m15:43:14.119831 [info ] [MainThread]: 
[0m15:43:14.120396 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:43:14.120914 [info ] [MainThread]: 
[0m15:43:14.121429 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:43:14.127073 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:43:14.211488 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:43:14.211488 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:43:14.212568 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:43:15.028015 [debug] [ThreadPool]: SQL status: OK in 0.816 seconds
[0m15:43:15.029888 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:43:15.030668 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:43:15.062230 [debug] [ThreadPool]: SQL status: OK in 0.031 seconds
[0m15:43:15.064377 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:43:15.065978 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:43:15.066541 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:43:15.067598 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '602229d4-4d79-4bdb-b45b-26fa45b6f07c', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002446116A780>]}
[0m15:43:15.067598 [debug] [MainThread]: Using duckdb connection "master"
[0m15:43:15.067598 [debug] [MainThread]: On master: BEGIN
[0m15:43:15.067598 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:43:15.069117 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:43:15.069117 [debug] [MainThread]: On master: COMMIT
[0m15:43:15.069677 [debug] [MainThread]: Using duckdb connection "master"
[0m15:43:15.069677 [debug] [MainThread]: On master: COMMIT
[0m15:43:15.070212 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:43:15.070212 [debug] [MainThread]: On master: Close
[0m15:43:15.074792 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:43:15.075787 [info ] [Thread-1 (]: 1 of 18 START test not_null_dim_instituicao_id_instituicao ..................... [RUN]
[0m15:43:15.075787 [debug] [Thread-1 (]: Acquiring new duckdb connection 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m15:43:15.076790 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:43:15.089953 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:43:15.091005 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:43:15.105974 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:43:15.107050 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:43:15.107656 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m15:43:15.108190 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:43:15.108190 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.109199 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m15:43:15.109199 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.110197 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.115515 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m15:43:15.116523 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m15:43:15.116523 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m15:43:15.117583 [info ] [Thread-1 (]: 1 of 18 PASS not_null_dim_instituicao_id_instituicao ........................... [[32mPASS[0m in 0.04s]
[0m15:43:15.117583 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m15:43:15.117583 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:43:15.119122 [info ] [Thread-1 (]: 2 of 18 START test not_null_dim_instituicao_id_localizacao ..................... [RUN]
[0m15:43:15.119679 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m15:43:15.120235 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:43:15.123411 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:43:15.124454 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:43:15.126435 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:43:15.127947 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:43:15.127947 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m15:43:15.127947 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.129547 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.129547 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m15:43:15.129547 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.129547 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.131107 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m15:43:15.133801 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m15:43:15.134336 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m15:43:15.134882 [info ] [Thread-1 (]: 2 of 18 PASS not_null_dim_instituicao_id_localizacao ........................... [[32mPASS[0m in 0.02s]
[0m15:43:15.135961 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m15:43:15.136503 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:43:15.137039 [info ] [Thread-1 (]: 3 of 18 START test not_null_fato_resumo_financeiro_id_data ..................... [RUN]
[0m15:43:15.137564 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m15:43:15.137564 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:43:15.141093 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:43:15.142090 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:43:15.143144 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:43:15.144630 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:43:15.144630 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m15:43:15.145647 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.145647 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.146641 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m15:43:15.147148 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.147148 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.149157 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m15:43:15.150202 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m15:43:15.150202 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m15:43:15.150202 [info ] [Thread-1 (]: 3 of 18 PASS not_null_fato_resumo_financeiro_id_data ........................... [[32mPASS[0m in 0.01s]
[0m15:43:15.151765 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m15:43:15.152334 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:43:15.152334 [info ] [Thread-1 (]: 4 of 18 START test not_null_fato_resumo_financeiro_id_instituicao .............. [RUN]
[0m15:43:15.153133 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m15:43:15.153655 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:43:15.157672 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:43:15.159276 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:43:15.160967 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:43:15.162579 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:43:15.163112 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m15:43:15.163112 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.164311 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.164883 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m15:43:15.165422 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.165965 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.167777 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m15:43:15.169462 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m15:43:15.170160 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m15:43:15.170732 [info ] [Thread-1 (]: 4 of 18 PASS not_null_fato_resumo_financeiro_id_instituicao .................... [[32mPASS[0m in 0.02s]
[0m15:43:15.172644 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m15:43:15.173221 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:43:15.173801 [info ] [Thread-1 (]: 5 of 18 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m15:43:15.174998 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m15:43:15.174998 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:43:15.183810 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:43:15.184818 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:43:15.188080 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:43:15.189591 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:43:15.190601 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m15:43:15.190601 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.191602 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.191602 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m15:43:15.192602 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.201121 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.201121 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:43:15.202117 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m15:43:15.212317 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m15:43:15.212317 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m15:43:15.215328 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_classe_instituicao"
                    ^
[0m15:43:15.216325 [error] [Thread-1 (]: 5 of 18 ERROR relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[31mERROR[0m in 0.04s]
[0m15:43:15.217659 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m15:43:15.217659 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:43:15.218655 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_classe_instituicao"
                    ^.
[0m15:43:15.218655 [info ] [Thread-1 (]: 6 of 18 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m15:43:15.220658 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m15:43:15.221658 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:43:15.230170 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:43:15.231167 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:43:15.234259 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:43:15.236251 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:43:15.237251 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m15:43:15.237251 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.238311 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.238311 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m15:43:15.238311 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.239313 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.240310 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:43:15.240310 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m15:43:15.242312 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m15:43:15.243312 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m15:43:15.246312 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_consolidado"
                    ^
[0m15:43:15.247822 [error] [Thread-1 (]: 6 of 18 ERROR relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[31mERROR[0m in 0.03s]
[0m15:43:15.248834 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m15:43:15.249833 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:43:15.250833 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_consolidado"
                    ^.
[0m15:43:15.250833 [info ] [Thread-1 (]: 7 of 18 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m15:43:15.251831 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m15:43:15.252834 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:43:15.258340 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:43:15.260954 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:43:15.263965 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:43:15.265965 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:43:15.266965 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m15:43:15.266965 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.266965 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.268476 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m15:43:15.268476 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.269488 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.269488 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:43:15.269488 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m15:43:15.273487 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m15:43:15.273487 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m15:43:15.276488 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_controle"
                    ^
[0m15:43:15.276488 [error] [Thread-1 (]: 7 of 18 ERROR relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[31mERROR[0m in 0.02s]
[0m15:43:15.278032 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m15:43:15.278032 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:43:15.279044 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_controle"
                    ^.
[0m15:43:15.279551 [info ] [Thread-1 (]: 8 of 18 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m15:43:15.279551 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m15:43:15.279551 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:43:15.284276 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:43:15.285843 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:43:15.287367 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:43:15.288385 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:43:15.289380 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m15:43:15.289380 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.289888 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.289888 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m15:43:15.289888 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.297813 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m15:43:15.299339 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m15:43:15.299860 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m15:43:15.300869 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m15:43:15.300869 [error] [Thread-1 (]: 8 of 18 FAIL 1 relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[31mFAIL 1[0m in 0.02s]
[0m15:43:15.301935 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m15:43:15.302500 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:43:15.302500 [info ] [Thread-1 (]: 9 of 18 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m15:43:15.302500 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m15:43:15.303508 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:43:15.307752 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:43:15.308761 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:43:15.311619 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:43:15.312643 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:43:15.312643 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m15:43:15.312643 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.313739 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.313739 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m15:43:15.314749 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.315359 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.315359 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:43:15.316373 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m15:43:15.317479 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m15:43:15.319158 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m15:43:15.321310 [debug] [Thread-1 (]: Runtime Error in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "dim_tempo"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_segmento"
                    ^
[0m15:43:15.322340 [error] [Thread-1 (]: 9 of 18 ERROR relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[31mERROR[0m in 0.02s]
[0m15:43:15.323331 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m15:43:15.323331 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:43:15.323331 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "dim_tempo"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_segmento"
                    ^.
[0m15:43:15.324331 [info ] [Thread-1 (]: 10 of 18 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:43:15.324331 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m15:43:15.325334 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:43:15.329811 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:43:15.330851 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:43:15.334146 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:43:15.335159 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:43:15.335672 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m15:43:15.335672 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.336684 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.336684 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m15:43:15.336684 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.345517 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m15:43:15.347079 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m15:43:15.348100 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m15:43:15.348100 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m15:43:15.348100 [info ] [Thread-1 (]: 10 of 18 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m15:43:15.349608 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m15:43:15.351163 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:43:15.351766 [info ] [Thread-1 (]: 11 of 18 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:43:15.351766 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m15:43:15.352330 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:43:15.356153 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:43:15.357160 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:43:15.358682 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:43:15.358682 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:43:15.360193 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m15:43:15.360193 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.360193 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.360193 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m15:43:15.361780 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.362796 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.362796 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:43:15.364015 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m15:43:15.366684 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m15:43:15.367212 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m15:43:15.369340 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "fato_balanco_patrimonial"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^
[0m15:43:15.369953 [error] [Thread-1 (]: 11 of 18 ERROR relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:43:15.370469 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m15:43:15.371011 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:43:15.371537 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "fato_balanco_patrimonial"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^.
[0m15:43:15.371011 [info ] [Thread-1 (]: 12 of 18 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:43:15.372548 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m15:43:15.373090 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:43:15.377097 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:43:15.377097 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:43:15.379876 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:43:15.381406 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:43:15.381406 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m15:43:15.381406 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.382414 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:43:15.382414 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m15:43:15.382414 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.382414 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.382414 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:43:15.384134 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m15:43:15.386893 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m15:43:15.386893 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m15:43:15.388917 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^
[0m15:43:15.388917 [error] [Thread-1 (]: 12 of 18 ERROR relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:43:15.389900 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m15:43:15.389900 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:43:15.389900 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^.
[0m15:43:15.391283 [info ] [Thread-1 (]: 13 of 18 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:43:15.391283 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m15:43:15.391283 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:43:15.395424 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:43:15.395424 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:43:15.398529 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:43:15.399530 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:43:15.399530 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m15:43:15.399530 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.401100 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.401723 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m15:43:15.401723 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.402768 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.402768 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:43:15.403297 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m15:43:15.406520 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m15:43:15.407049 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m15:43:15.408678 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^
[0m15:43:15.408678 [error] [Thread-1 (]: 13 of 18 ERROR relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:43:15.408678 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m15:43:15.410212 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:43:15.410212 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^.
[0m15:43:15.411780 [info ] [Thread-1 (]: 14 of 18 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:43:15.412336 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m15:43:15.412336 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:43:15.415472 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:43:15.417519 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:43:15.420314 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:43:15.421323 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:43:15.421323 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m15:43:15.421323 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.422347 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.422856 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m15:43:15.422856 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.423865 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.424415 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:43:15.424927 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m15:43:15.427046 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m15:43:15.427575 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m15:43:15.429726 [debug] [Thread-1 (]: Runtime Error in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^
[0m15:43:15.430289 [error] [Thread-1 (]: 14 of 18 ERROR relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mERROR[0m in 0.02s]
[0m15:43:15.430289 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m15:43:15.431315 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:43:15.431315 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71' to be skipped because of status 'error'.  Reason: Runtime Error in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^.
[0m15:43:15.432362 [info ] [Thread-1 (]: 15 of 18 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:43:15.432869 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m15:43:15.432869 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:43:15.438905 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:43:15.439915 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:43:15.441190 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:43:15.442816 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:43:15.442816 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m15:43:15.442816 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.442816 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:43:15.442816 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m15:43:15.444486 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.445502 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m15:43:15.448018 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m15:43:15.449192 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m15:43:15.449192 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m15:43:15.450216 [info ] [Thread-1 (]: 15 of 18 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m15:43:15.450216 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m15:43:15.451206 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:43:15.451712 [info ] [Thread-1 (]: 16 of 18 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m15:43:15.452773 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m15:43:15.453411 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:43:15.457860 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:43:15.458880 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:43:15.460388 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:43:15.461966 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:43:15.462591 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m15:43:15.462591 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.462591 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:43:15.463631 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m15:43:15.464222 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.469321 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m15:43:15.470327 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m15:43:15.471367 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m15:43:15.471367 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m15:43:15.471367 [info ] [Thread-1 (]: 16 of 18 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m15:43:15.472909 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m15:43:15.472909 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:43:15.473919 [info ] [Thread-1 (]: 17 of 18 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m15:43:15.473919 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m15:43:15.474919 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:43:15.479636 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:43:15.480721 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:43:15.482855 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:43:15.482855 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:43:15.482855 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m15:43:15.484375 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.484375 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m15:43:15.484375 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m15:43:15.484375 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m15:43:15.492066 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m15:43:15.494112 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m15:43:15.495196 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m15:43:15.495196 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m15:43:15.495196 [info ] [Thread-1 (]: 17 of 18 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m15:43:15.495196 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m15:43:15.496709 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:43:15.496709 [info ] [Thread-1 (]: 18 of 18 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m15:43:15.497287 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m15:43:15.497287 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:43:15.504221 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:43:15.504729 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:43:15.509547 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:43:15.511153 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:43:15.511693 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m15:43:15.512222 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m15:43:15.513306 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:43:15.514007 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m15:43:15.514553 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m15:43:15.520351 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m15:43:15.521860 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m15:43:15.522447 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m15:43:15.523016 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m15:43:15.523016 [info ] [Thread-1 (]: 18 of 18 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.03s]
[0m15:43:15.524025 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m15:43:15.525136 [debug] [MainThread]: Using duckdb connection "master"
[0m15:43:15.526145 [debug] [MainThread]: On master: BEGIN
[0m15:43:15.526145 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:43:15.527144 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:43:15.527144 [debug] [MainThread]: On master: COMMIT
[0m15:43:15.527144 [debug] [MainThread]: Using duckdb connection "master"
[0m15:43:15.527144 [debug] [MainThread]: On master: COMMIT
[0m15:43:15.528187 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:43:15.528187 [debug] [MainThread]: On master: Close
[0m15:43:15.528187 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:43:15.528187 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:43:15.528187 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37' was properly closed.
[0m15:43:15.528187 [info ] [MainThread]: 
[0m15:43:15.529469 [info ] [MainThread]: Finished running 18 data tests in 0 hours 0 minutes and 1.41 seconds (1.41s).
[0m15:43:15.531086 [debug] [MainThread]: Command end result
[0m15:43:15.561713 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:43:15.564672 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:43:15.571121 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:43:15.571729 [info ] [MainThread]: 
[0m15:43:15.572264 [info ] [MainThread]: [31mCompleted with 9 errors, 0 partial successes, and 0 warnings:[0m
[0m15:43:15.572264 [info ] [MainThread]: 
[0m15:43:15.572791 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)[0m
[0m15:43:15.573317 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_classe_instituicao"
                    ^
[0m15:43:15.573842 [info ] [MainThread]: 
[0m15:43:15.573842 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_b5bf1250f8e22e22ed6029d8a9776333.sql
[0m15:43:15.574850 [info ] [MainThread]: 
[0m15:43:15.574850 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)[0m
[0m15:43:15.574850 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_consolidado does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_consolidado"
                    ^
[0m15:43:15.575869 [info ] [MainThread]: 
[0m15:43:15.575869 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_0eacdd127a052df6ef946b12273a2332.sql
[0m15:43:15.575869 [info ] [MainThread]: 
[0m15:43:15.576849 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)[0m
[0m15:43:15.576849 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_controle does not exist!
  Did you mean "dim_localizacao"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_controle"
                    ^
[0m15:43:15.577851 [info ] [MainThread]: 
[0m15:43:15.577851 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_9713fcede76412e01759a305783eeec2.sql
[0m15:43:15.578850 [info ] [MainThread]: 
[0m15:43:15.578850 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)[0m
[0m15:43:15.579441 [error] [MainThread]:   Got 1 result, configured to fail if != 0
[0m15:43:15.579441 [info ] [MainThread]: 
[0m15:43:15.579441 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_446031b84e0fad1bdbfdd1cf73647908.sql
[0m15:43:15.579441 [info ] [MainThread]: 
[0m15:43:15.580990 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)[0m
[0m15:43:15.580990 [error] [MainThread]:   Runtime Error in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)
  Catalog Error: Table with name dim_segmento does not exist!
  Did you mean "dim_tempo"?
  
  LINE 22:     from "gold_warehouse"."main"."dim_segmento"
                    ^
[0m15:43:15.580990 [info ] [MainThread]: 
[0m15:43:15.580990 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_cf3f8176c8c99f31e0910db0802babb1.sql
[0m15:43:15.582537 [info ] [MainThread]: 
[0m15:43:15.582537 [error] [MainThread]: [31mFailure in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:43:15.582537 [error] [MainThread]:   Runtime Error in test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_capital_prudencial does not exist!
  Did you mean "fato_balanco_patrimonial"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_capital_prudencial"
                    ^
[0m15:43:15.582537 [info ] [MainThread]: 
[0m15:43:15.584112 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_capital_pru_dc7c09807e22eeacb03b88bc50c11898.sql
[0m15:43:15.584112 [info ] [MainThread]: 
[0m15:43:15.584112 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:43:15.585677 [error] [MainThread]:   Runtime Error in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_indexador does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_indexador"
                    ^
[0m15:43:15.586685 [info ] [MainThread]: 
[0m15:43:15.587193 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_d80151d1e76d6c8de6ceccc7adebe863.sql
[0m15:43:15.587731 [info ] [MainThread]: 
[0m15:43:15.588262 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:43:15.588797 [error] [MainThread]:   Runtime Error in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_carteira_credito_totais does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_carteira_credito_totais"
                    ^
[0m15:43:15.589334 [info ] [MainThread]: 
[0m15:43:15.589334 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_b00506d5726bd2130bedc66dca5f83d0.sql
[0m15:43:15.589854 [info ] [MainThread]: 
[0m15:43:15.590397 [error] [MainThread]: [31mFailure in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m15:43:15.590991 [error] [MainThread]:   Runtime Error in test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)
  Catalog Error: Table with name fato_demonstracao_resultado does not exist!
  Did you mean "fato_movimentacao_cambio"?
  
  LINE 16:     from "gold_warehouse"."main"."fato_demonstracao_resultado"
                    ^
[0m15:43:15.591568 [info ] [MainThread]: 
[0m15:43:15.592100 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_demonstraca_db359e0c9415ad5a3f4bbc17154e2e4a.sql
[0m15:43:15.592634 [info ] [MainThread]: 
[0m15:43:15.593152 [info ] [MainThread]: Done. PASS=9 WARN=0 ERROR=9 SKIP=0 NO-OP=0 TOTAL=18
[0m15:43:15.594210 [debug] [MainThread]: Command `dbt test` failed at 15:43:15.594210 after 2.90 seconds
[0m15:43:15.594785 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002445EE148C0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002445EE14B30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002445D0A2210>]}
[0m15:43:15.594785 [debug] [MainThread]: Flushing usage events
[0m15:43:16.198183 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:55:48.432414 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C6730B020>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C6730B560>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C6730A300>]}


============================== 15:55:48.440020 | 3797d116-91ff-479c-876c-5e8bbafb5bd6 ==============================
[0m15:55:48.440020 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:55:48.440547 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt run --select fato_operacoes_clientes --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:55:48.712328 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '3797d116-91ff-479c-876c-5e8bbafb5bd6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C68BD1970>]}
[0m15:55:48.778249 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '3797d116-91ff-479c-876c-5e8bbafb5bd6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C6475A870>]}
[0m15:55:48.781311 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:55:49.102054 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:55:49.394758 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 1 files changed.
[0m15:55:49.397291 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_operacoes_clientes.sql
[0m15:55:49.851027 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on
'fato_operacoes_clientes' in package 'bacen_ifdata_analytics'
(models\gold\schema.yml). Arguments to generic tests should be nested under the
`arguments` property.
[0m15:55:49.852097 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '3797d116-91ff-479c-876c-5e8bbafb5bd6', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C694A48C0>]}
[0m15:55:50.017353 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:55:50.034243 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '3797d116-91ff-479c-876c-5e8bbafb5bd6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C692A74D0>]}
[0m15:55:50.162677 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:55:50.167647 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:55:50.231242 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '3797d116-91ff-479c-876c-5e8bbafb5bd6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C693C1250>]}
[0m15:55:50.231242 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 33 sources, 590 macros
[0m15:55:50.231242 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '3797d116-91ff-479c-876c-5e8bbafb5bd6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C68DA89E0>]}
[0m15:55:50.234346 [info ] [MainThread]: 
[0m15:55:50.234346 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:55:50.234346 [info ] [MainThread]: 
[0m15:55:50.236865 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:55:50.238040 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:55:50.473839 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:55:50.473839 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:55:50.473839 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:55:51.290369 [debug] [ThreadPool]: SQL status: OK in 0.816 seconds
[0m15:55:51.292944 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:55:51.293943 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:55:51.294953 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:55:51.303732 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:55:51.303732 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:55:51.305262 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:55:51.307272 [debug] [ThreadPool]: SQL status: OK in 0.002 seconds
[0m15:55:51.309273 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:55:51.309273 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:55:51.310778 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:55:51.311284 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:55:51.311284 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:55:51.314302 [debug] [ThreadPool]: SQL status: OK in 0.002 seconds
[0m15:55:51.315302 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:55:51.316305 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:55:51.317306 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:55:51.318305 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:55:51.318305 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:55:51.327968 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:55:51.339569 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:55:51.340579 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:55:51.341593 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:55:51.342603 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:55:51.343606 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:55:51.343606 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:55:51.367343 [debug] [ThreadPool]: SQL status: OK in 0.023 seconds
[0m15:55:51.370390 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:55:51.375923 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:55:51.376935 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:55:51.378443 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '3797d116-91ff-479c-876c-5e8bbafb5bd6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C68DAB6E0>]}
[0m15:55:51.380012 [debug] [MainThread]: Using duckdb connection "master"
[0m15:55:51.380535 [debug] [MainThread]: On master: BEGIN
[0m15:55:51.380535 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:55:51.382240 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:55:51.382240 [debug] [MainThread]: On master: COMMIT
[0m15:55:51.383781 [debug] [MainThread]: Using duckdb connection "master"
[0m15:55:51.384290 [debug] [MainThread]: On master: COMMIT
[0m15:55:51.385350 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:55:51.385874 [debug] [MainThread]: On master: Close
[0m15:55:51.407654 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:55:51.408164 [info ] [Thread-1 (]: 1 of 1 START sql table model main.fato_operacoes_clientes ...................... [RUN]
[0m15:55:51.410187 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.fato_operacoes_clientes'
[0m15:55:51.410187 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:55:51.431666 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:55:51.434684 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:55:51.492771 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:55:51.495489 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:55:51.495489 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m15:55:51.497590 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:55:51.498283 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:55:51.499795 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:55:51.500327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."prudential_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m15:55:51.513965 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."prudential_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(data_base, '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m15:55:51.515476 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m15:55:51.516489 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: ROLLBACK
[0m15:55:51.531620 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_operacoes_clientes'
[0m15:55:51.532633 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m15:55:51.537564 [debug] [Thread-1 (]: Runtime Error in model fato_operacoes_clientes (models\gold\fato_operacoes_clientes.sql)
  Binder Error: Could not choose a best candidate function for the function call "strftime(VARCHAR, STRING_LITERAL)". In order to select one, please add explicit type casts.
  	Candidate functions:
  	strftime(VARCHAR, TIMESTAMP) -> VARCHAR
  	strftime(VARCHAR, TIMESTAMP_NS) -> VARCHAR
  	strftime(VARCHAR, DATE) -> VARCHAR
  
  
  LINE 45:     strftime(data_base, '%Y%m%d')::int
               ^
[0m15:55:51.542742 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '3797d116-91ff-479c-876c-5e8bbafb5bd6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C695625A0>]}
[0m15:55:51.543251 [error] [Thread-1 (]: 1 of 1 ERROR creating sql table model main.fato_operacoes_clientes ............. [[31mERROR[0m in 0.13s]
[0m15:55:51.544769 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:55:51.545780 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_operacoes_clientes' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_operacoes_clientes (models\gold\fato_operacoes_clientes.sql)
  Binder Error: Could not choose a best candidate function for the function call "strftime(VARCHAR, STRING_LITERAL)". In order to select one, please add explicit type casts.
  	Candidate functions:
  	strftime(VARCHAR, TIMESTAMP) -> VARCHAR
  	strftime(VARCHAR, TIMESTAMP_NS) -> VARCHAR
  	strftime(VARCHAR, DATE) -> VARCHAR
  
  
  LINE 45:     strftime(data_base, '%Y%m%d')::int
               ^.
[0m15:55:51.548317 [debug] [MainThread]: Using duckdb connection "master"
[0m15:55:51.549315 [debug] [MainThread]: On master: BEGIN
[0m15:55:51.549824 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:55:51.550739 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:55:51.551246 [debug] [MainThread]: On master: COMMIT
[0m15:55:51.552264 [debug] [MainThread]: Using duckdb connection "master"
[0m15:55:51.552264 [debug] [MainThread]: On master: COMMIT
[0m15:55:51.553266 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:55:51.554284 [debug] [MainThread]: On master: Close
[0m15:55:51.555284 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:55:51.555618 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:55:51.556127 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:55:51.556127 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_operacoes_clientes' was properly closed.
[0m15:55:51.557147 [info ] [MainThread]: 
[0m15:55:51.558398 [info ] [MainThread]: Finished running 1 table model in 0 hours 0 minutes and 1.32 seconds (1.32s).
[0m15:55:51.559412 [debug] [MainThread]: Command end result
[0m15:55:51.604727 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:55:51.607303 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:55:51.612544 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:55:51.613562 [info ] [MainThread]: 
[0m15:55:51.613562 [info ] [MainThread]: [31mCompleted with 1 error, 0 partial successes, and 0 warnings:[0m
[0m15:55:51.613562 [info ] [MainThread]: 
[0m15:55:51.615075 [error] [MainThread]: [31mFailure in model fato_operacoes_clientes (models\gold\fato_operacoes_clientes.sql)[0m
[0m15:55:51.615658 [error] [MainThread]:   Runtime Error in model fato_operacoes_clientes (models\gold\fato_operacoes_clientes.sql)
  Binder Error: Could not choose a best candidate function for the function call "strftime(VARCHAR, STRING_LITERAL)". In order to select one, please add explicit type casts.
  	Candidate functions:
  	strftime(VARCHAR, TIMESTAMP) -> VARCHAR
  	strftime(VARCHAR, TIMESTAMP_NS) -> VARCHAR
  	strftime(VARCHAR, DATE) -> VARCHAR
  
  
  LINE 45:     strftime(data_base, '%Y%m%d')::int
               ^
[0m15:55:51.616787 [info ] [MainThread]: 
[0m15:55:51.618317 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_operacoes_clientes.sql
[0m15:55:51.618827 [info ] [MainThread]: 
[0m15:55:51.619379 [info ] [MainThread]: Done. PASS=0 WARN=0 ERROR=1 SKIP=0 NO-OP=0 TOTAL=1
[0m15:55:51.620388 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 2 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m15:55:51.621895 [debug] [MainThread]: Command `dbt run` failed at 15:55:51.620388 after 3.34 seconds
[0m15:55:51.621895 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C66DCF5C0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C66CFDDC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023C66CD75C0>]}
[0m15:55:51.622447 [debug] [MainThread]: Flushing usage events
[0m15:55:52.417366 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m15:56:26.192955 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022CFDFD0EC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022CF8A81A90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022CFE9DF920>]}


============================== 15:56:26.200960 | ef95b2df-ad09-4662-9277-62c81c0822ce ==============================
[0m15:56:26.200960 [info ] [MainThread]: Running with dbt=1.11.5
[0m15:56:26.200960 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'invocation_command': 'dbt run --select fato_operacoes_clientes --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m15:56:26.465667 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'ef95b2df-ad09-4662-9277-62c81c0822ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022CFDFD1520>]}
[0m15:56:26.545476 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'ef95b2df-ad09-4662-9277-62c81c0822ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022CFEB5A570>]}
[0m15:56:26.549167 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m15:56:26.954579 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m15:56:27.172964 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 1 files changed.
[0m15:56:27.173971 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_balanco_patrimonial.sql
[0m15:56:27.174971 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_capital_prudencial.sql
[0m15:56:27.174971 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_carteira_credito_indexador.sql
[0m15:56:27.174971 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_carteira_credito_totais.sql
[0m15:56:27.175970 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_demonstracao_resultado.sql
[0m15:56:27.176522 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_movimentacao_cambio.sql
[0m15:56:27.176522 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_operacoes_clientes.sql
[0m15:56:27.176522 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_resumo_financeiro.sql
[0m15:56:27.176522 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://macros\utils.sql
[0m15:56:27.666497 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on
'fato_balanco_patrimonial' in package 'bacen_ifdata_analytics'
(models\gold\schema.yml). Arguments to generic tests should be nested under the
`arguments` property.
[0m15:56:27.666497 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': 'ef95b2df-ad09-4662-9277-62c81c0822ce', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022C807C6F30>]}
[0m15:56:27.932664 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m15:56:27.951567 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'ef95b2df-ad09-4662-9277-62c81c0822ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022C807B6F60>]}
[0m15:56:28.084110 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:56:28.089609 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:56:28.138136 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'ef95b2df-ad09-4662-9277-62c81c0822ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022C804440B0>]}
[0m15:56:28.139136 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 33 sources, 590 macros
[0m15:56:28.140137 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'ef95b2df-ad09-4662-9277-62c81c0822ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022C801A90A0>]}
[0m15:56:28.143442 [info ] [MainThread]: 
[0m15:56:28.144452 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m15:56:28.145580 [info ] [MainThread]: 
[0m15:56:28.146577 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m15:56:28.147783 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m15:56:28.283358 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m15:56:28.283358 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m15:56:28.284370 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:56:28.403588 [debug] [ThreadPool]: SQL status: OK in 0.119 seconds
[0m15:56:28.405239 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m15:56:28.406354 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m15:56:28.407403 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m15:56:28.412627 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:56:28.412627 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m15:56:28.413675 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m15:56:28.414638 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m15:56:28.415872 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:56:28.415872 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m15:56:28.416480 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:56:28.416480 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:56:28.416480 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m15:56:28.417524 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:56:28.418074 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:56:28.418074 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m15:56:28.418074 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m15:56:28.419081 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:56:28.419081 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m15:56:28.424636 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m15:56:28.431374 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:56:28.431890 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m15:56:28.431890 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m15:56:28.432400 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m15:56:28.432400 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m15:56:28.432400 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m15:56:28.449390 [debug] [ThreadPool]: SQL status: OK in 0.016 seconds
[0m15:56:28.450911 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m15:56:28.452068 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m15:56:28.452068 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m15:56:28.453695 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'ef95b2df-ad09-4662-9277-62c81c0822ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022C80737290>]}
[0m15:56:28.454301 [debug] [MainThread]: Using duckdb connection "master"
[0m15:56:28.454860 [debug] [MainThread]: On master: BEGIN
[0m15:56:28.454860 [debug] [MainThread]: Opening a new connection, currently in state init
[0m15:56:28.455439 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:56:28.455439 [debug] [MainThread]: On master: COMMIT
[0m15:56:28.455977 [debug] [MainThread]: Using duckdb connection "master"
[0m15:56:28.455977 [debug] [MainThread]: On master: COMMIT
[0m15:56:28.456987 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:56:28.456987 [debug] [MainThread]: On master: Close
[0m15:56:28.462050 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:56:28.463143 [info ] [Thread-1 (]: 1 of 1 START sql table model main.fato_operacoes_clientes ...................... [RUN]
[0m15:56:28.464729 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.fato_operacoes_clientes'
[0m15:56:28.465238 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:56:28.474016 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:56:28.475025 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:56:28.506024 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:56:28.507622 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:56:28.508633 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m15:56:28.508633 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m15:56:28.508633 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:56:28.508633 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:56:28.510140 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."prudential_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m15:56:28.557378 [debug] [Thread-1 (]: SQL status: OK in 0.047 seconds
[0m15:56:28.563586 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:56:28.564594 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m15:56:28.565648 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:56:28.578061 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m15:56:28.578061 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:56:28.578061 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m15:56:28.587040 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m15:56:28.594271 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m15:56:28.594848 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m15:56:28.596205 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m15:56:28.598315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m15:56:28.600942 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ef95b2df-ad09-4662-9277-62c81c0822ce', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022C808067B0>]}
[0m15:56:28.601508 [info ] [Thread-1 (]: 1 of 1 OK created sql table model main.fato_operacoes_clientes ................. [[32mOK[0m in 0.14s]
[0m15:56:28.602084 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m15:56:28.603679 [debug] [MainThread]: Using duckdb connection "master"
[0m15:56:28.604297 [debug] [MainThread]: On master: BEGIN
[0m15:56:28.604297 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m15:56:28.604888 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m15:56:28.604888 [debug] [MainThread]: On master: COMMIT
[0m15:56:28.605898 [debug] [MainThread]: Using duckdb connection "master"
[0m15:56:28.605898 [debug] [MainThread]: On master: COMMIT
[0m15:56:28.605898 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m15:56:28.606941 [debug] [MainThread]: On master: Close
[0m15:56:28.606941 [debug] [MainThread]: Connection 'master' was properly closed.
[0m15:56:28.607446 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m15:56:28.607446 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m15:56:28.608044 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_operacoes_clientes' was properly closed.
[0m15:56:28.608044 [info ] [MainThread]: 
[0m15:56:28.609057 [info ] [MainThread]: Finished running 1 table model in 0 hours 0 minutes and 0.46 seconds (0.46s).
[0m15:56:28.609057 [debug] [MainThread]: Command end result
[0m15:56:28.648182 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m15:56:28.651233 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m15:56:28.661004 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m15:56:28.662139 [info ] [MainThread]: 
[0m15:56:28.662707 [info ] [MainThread]: [32mCompleted successfully[0m
[0m15:56:28.663269 [info ] [MainThread]: 
[0m15:56:28.664986 [info ] [MainThread]: Done. PASS=1 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=1
[0m15:56:28.666074 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 21 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m15:56:28.667718 [debug] [MainThread]: Command `dbt run` succeeded at 15:56:28.667181 after 2.66 seconds
[0m15:56:28.668256 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022CFEEF7890>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022CFBAE4E00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022C80188EC0>]}
[0m15:56:28.669181 [debug] [MainThread]: Flushing usage events
[0m15:56:29.290542 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:17:23.913103 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D9F9AE2D50>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D9F7841DF0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D9FAA89340>]}


============================== 16:17:23.923501 | 544b7435-8372-4988-8569-a965453694f9 ==============================
[0m16:17:23.923501 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:17:23.925422 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt run --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:17:24.558598 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '544b7435-8372-4988-8569-a965453694f9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D9FC078470>]}
[0m16:17:24.667999 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '544b7435-8372-4988-8569-a965453694f9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D9FADBEF60>]}
[0m16:17:24.674254 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:17:25.105045 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:17:25.692137 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 2 files changed.
[0m16:17:25.694748 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_balanco_patrimonial.sql
[0m16:17:25.695758 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_capital_prudencial.sql
[0m16:17:25.695758 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_carteira_credito_indexador.sql
[0m16:17:25.696759 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_carteira_credito_totais.sql
[0m16:17:25.697265 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_demonstracao_resultado.sql
[0m16:17:25.697800 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_movimentacao_cambio.sql
[0m16:17:25.698358 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_operacoes_clientes.sql
[0m16:17:25.698963 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_resumo_financeiro.sql
[0m16:17:25.701122 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\silver\sources.yml
[0m16:17:25.701664 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_operacoes_clientes.sql
[0m16:17:26.492137 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on
'fato_balanco_patrimonial' in package 'bacen_ifdata_analytics'
(models\gold\schema.yml). Arguments to generic tests should be nested under the
`arguments` property.
[0m16:17:26.493768 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '544b7435-8372-4988-8569-a965453694f9', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D9FC881580>]}
[0m16:17:27.006254 [error] [MainThread]: Encountered an error:
Compilation Error
  Model 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador' (models\gold\fato_carteira_credito_indexador.sql) depends on a source named 'silver.prudential_conglomerates_portfolio_indexer' which was not found
[0m16:17:27.006863 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:17:27.010020 [debug] [MainThread]: Command `dbt run` failed at 16:17:27.009018 after 3.28 seconds
[0m16:17:27.011189 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D9F6F2E960>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D9FC7BB590>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D9FC4C0FB0>]}
[0m16:17:27.011709 [debug] [MainThread]: Flushing usage events
[0m16:17:27.930418 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:18:02.840626 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FD75C11A90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FD7B277800>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FD7B277770>]}


============================== 16:18:02.847491 | f518d95c-5652-4f73-b398-c79ede2b4d17 ==============================
[0m16:18:02.847491 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:18:02.848508 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'False', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'invocation_command': 'dbt run --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:18:03.216519 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'f518d95c-5652-4f73-b398-c79ede2b4d17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FD7D552ED0>]}
[0m16:18:03.300416 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'f518d95c-5652-4f73-b398-c79ede2b4d17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FD7B277DD0>]}
[0m16:18:03.306003 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:18:03.684501 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:18:03.685697 [debug] [MainThread]: Partial parsing not enabled
[0m16:18:06.133784 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:18:06.134818 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': 'f518d95c-5652-4f73-b398-c79ede2b4d17', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FD7D909100>]}
[0m16:18:06.566711 [error] [MainThread]: Encountered an error:
Compilation Error
  Model 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador' (models\gold\fato_carteira_credito_indexador.sql) depends on a source named 'silver.prudential_conglomerates_portfolio_indexer' which was not found
[0m16:18:06.568457 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:18:06.571304 [debug] [MainThread]: Command `dbt run` failed at 16:18:06.570735 after 4.11 seconds
[0m16:18:06.572380 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FD7C137AA0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FD7D8B3740>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FD7DC57860>]}
[0m16:18:06.574228 [debug] [MainThread]: Flushing usage events
[0m16:18:07.240628 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:19:00.808207 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A98D8230E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A98E22F860>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A98E34F1A0>]}


============================== 16:19:00.815070 | 4ef94a54-838d-4bb8-8f50-6a3071a870ac ==============================
[0m16:19:00.815070 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:19:00.815616 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'False', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt run --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:19:01.211779 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A98F9812E0>]}
[0m16:19:01.296562 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A98F739D00>]}
[0m16:19:01.302304 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:19:01.836052 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:19:01.837094 [debug] [MainThread]: Partial parsing not enabled
[0m16:19:04.689505 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:19:04.690550 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A98FE011F0>]}
[0m16:19:05.407759 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:19:05.424834 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A990230110>]}
[0m16:19:05.594388 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:19:05.599506 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:19:05.671762 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A990054260>]}
[0m16:19:05.673290 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:19:05.673797 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A98FEF77A0>]}
[0m16:19:05.681030 [info ] [MainThread]: 
[0m16:19:05.682611 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:19:05.682611 [info ] [MainThread]: 
[0m16:19:05.684191 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:19:05.699382 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:19:06.075085 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:19:06.075085 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:19:06.075085 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:19:07.040581 [debug] [ThreadPool]: SQL status: OK in 0.965 seconds
[0m16:19:07.042708 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:19:07.043769 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:19:07.044860 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:19:07.056130 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:19:07.056671 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:19:07.057183 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:19:07.058328 [debug] [ThreadPool]: SQL status: OK in 0.002 seconds
[0m16:19:07.060845 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:19:07.061850 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:19:07.062357 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:19:07.062357 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:19:07.062976 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:19:07.063982 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:19:07.064982 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:19:07.065487 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:19:07.065487 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:19:07.066494 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:19:07.066494 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:19:07.071459 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:19:07.079019 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:19:07.079019 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:19:07.079019 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:19:07.080530 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:19:07.081044 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:19:07.081044 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:19:07.114059 [debug] [ThreadPool]: SQL status: OK in 0.032 seconds
[0m16:19:07.118912 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:19:07.121495 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:19:07.122001 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:19:07.125248 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A990140890>]}
[0m16:19:07.126388 [debug] [MainThread]: Using duckdb connection "master"
[0m16:19:07.126925 [debug] [MainThread]: On master: BEGIN
[0m16:19:07.127486 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:19:07.128552 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:19:07.129635 [debug] [MainThread]: On master: COMMIT
[0m16:19:07.130707 [debug] [MainThread]: Using duckdb connection "master"
[0m16:19:07.131229 [debug] [MainThread]: On master: COMMIT
[0m16:19:07.132843 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:19:07.133378 [debug] [MainThread]: On master: Close
[0m16:19:07.143135 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:19:07.144375 [info ] [Thread-1 (]: 1 of 26 START sql table model main.dim_atividade ............................... [RUN]
[0m16:19:07.145382 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_atividade'
[0m16:19:07.145382 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:19:07.157001 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:19:07.160010 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:19:07.202056 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:19:07.203660 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:19:07.204261 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:19:07.204261 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:19:07.205828 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.206335 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:19:07.207341 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:19:07.216340 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:19:07.217854 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:07.217854 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: ROLLBACK
[0m16:19:07.234228 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_atividade'
[0m16:19:07.235547 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:19:07.243882 [debug] [Thread-1 (]: Runtime Error in model dim_atividade (models\gold\dim_atividade.sql)
  Catalog Error: Table with name seed_dim_atividade does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_atividade"
                ^
[0m16:19:07.303258 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A9902F0A10>]}
[0m16:19:07.304826 [error] [Thread-1 (]: 1 of 26 ERROR creating sql table model main.dim_atividade ...................... [[31mERROR[0m in 0.10s]
[0m16:19:07.305368 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:19:07.306885 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:19:07.307419 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_atividade' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_atividade (models\gold\dim_atividade.sql)
  Catalog Error: Table with name seed_dim_atividade does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_atividade"
                ^.
[0m16:19:07.307419 [info ] [Thread-1 (]: 2 of 26 START sql table model main.dim_classe_instituicao ...................... [RUN]
[0m16:19:07.308424 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:19:07.310451 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:19:07.315617 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:19:07.319284 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:19:07.326154 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:19:07.328375 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:19:07.328914 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:19:07.329457 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:07.331126 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.332228 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:19:07.332762 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:19:07.337001 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:19:07.337510 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:07.338521 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: ROLLBACK
[0m16:19:07.345677 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_classe_instituicao'
[0m16:19:07.347188 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:19:07.353698 [debug] [Thread-1 (]: Runtime Error in model dim_classe_instituicao (models\gold\dim_classe_instituicao.sql)
  Catalog Error: Table with name seed_dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
                ^
[0m16:19:07.354775 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A9925E7B60>]}
[0m16:19:07.354775 [error] [Thread-1 (]: 2 of 26 ERROR creating sql table model main.dim_classe_instituicao ............. [[31mERROR[0m in 0.05s]
[0m16:19:07.356996 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:19:07.356996 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:19:07.357581 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_classe_instituicao' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_classe_instituicao (models\gold\dim_classe_instituicao.sql)
  Catalog Error: Table with name seed_dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
                ^.
[0m16:19:07.358598 [info ] [Thread-1 (]: 3 of 26 START sql table model main.dim_consolidado ............................. [RUN]
[0m16:19:07.360111 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:19:07.360636 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:19:07.364729 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:19:07.366979 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:19:07.371310 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:19:07.373963 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:19:07.373963 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:19:07.373963 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:07.375492 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.376501 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:19:07.376501 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:19:07.378018 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:19:07.379647 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:07.381167 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: ROLLBACK
[0m16:19:07.384925 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_consolidado'
[0m16:19:07.385922 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:19:07.390651 [debug] [Thread-1 (]: Runtime Error in model dim_consolidado (models\gold\dim_consolidado.sql)
  Catalog Error: Table with name seed_dim_consolidado does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_consolidado"
                ^
[0m16:19:07.390651 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A99052C170>]}
[0m16:19:07.392761 [error] [Thread-1 (]: 3 of 26 ERROR creating sql table model main.dim_consolidado .................... [[31mERROR[0m in 0.03s]
[0m16:19:07.394320 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:19:07.394934 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:19:07.395969 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_consolidado' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_consolidado (models\gold\dim_consolidado.sql)
  Catalog Error: Table with name seed_dim_consolidado does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_consolidado"
                ^.
[0m16:19:07.395969 [info ] [Thread-1 (]: 4 of 26 START sql table model main.dim_controle ................................ [RUN]
[0m16:19:07.396710 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:19:07.397242 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:19:07.400866 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:19:07.406576 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:19:07.410858 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:19:07.412898 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:19:07.413440 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:19:07.413440 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:07.414966 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.415554 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:19:07.416109 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:19:07.416653 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:19:07.417241 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:07.417803 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: ROLLBACK
[0m16:19:07.421588 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_controle'
[0m16:19:07.422673 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:19:07.426187 [debug] [Thread-1 (]: Runtime Error in model dim_controle (models\gold\dim_controle.sql)
  Catalog Error: Table with name seed_dim_controle does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_controle"
                ^
[0m16:19:07.427202 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A99047D1C0>]}
[0m16:19:07.428596 [error] [Thread-1 (]: 4 of 26 ERROR creating sql table model main.dim_controle ....................... [[31mERROR[0m in 0.03s]
[0m16:19:07.429606 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:19:07.429606 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:19:07.430710 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_controle' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_controle (models\gold\dim_controle.sql)
  Catalog Error: Table with name seed_dim_controle does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_controle"
                ^.
[0m16:19:07.431256 [info ] [Thread-1 (]: 5 of 26 START sql table model main.dim_faixa_vencimento ........................ [RUN]
[0m16:19:07.431256 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:19:07.432848 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:19:07.436969 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:19:07.438481 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:19:07.442026 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:19:07.444561 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:19:07.444561 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:19:07.445578 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:07.446579 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.446579 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:19:07.447135 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:19:07.447135 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:19:07.448167 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:07.449147 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: ROLLBACK
[0m16:19:07.451942 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_faixa_vencimento'
[0m16:19:07.452512 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:19:07.454570 [debug] [Thread-1 (]: Runtime Error in model dim_faixa_vencimento (models\gold\dim_faixa_vencimento.sql)
  Catalog Error: Table with name seed_dim_faixa_vencimento does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
                ^
[0m16:19:07.455181 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A9902385C0>]}
[0m16:19:07.455181 [error] [Thread-1 (]: 5 of 26 ERROR creating sql table model main.dim_faixa_vencimento ............... [[31mERROR[0m in 0.02s]
[0m16:19:07.456190 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:19:07.456190 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:19:07.457421 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_faixa_vencimento' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_faixa_vencimento (models\gold\dim_faixa_vencimento.sql)
  Catalog Error: Table with name seed_dim_faixa_vencimento does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
                ^.
[0m16:19:07.457421 [info ] [Thread-1 (]: 6 of 26 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:19:07.459089 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_instituicao)
[0m16:19:07.460102 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:19:07.465239 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:07.467485 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:19:07.471370 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:07.472927 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:07.473958 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:19:07.474598 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:07.474598 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.475631 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:07.475631 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:19:07.749569 [debug] [Thread-1 (]: SQL status: OK in 0.272 seconds
[0m16:19:07.758146 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:07.759156 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:19:07.760658 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.762680 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:07.763687 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:19:07.766726 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:19:07.775432 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:07.776445 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:19:07.777956 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.782662 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:07.782662 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:19:07.784265 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:07.806177 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:19:07.807670 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:07.808683 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:19:07.819520 [debug] [Thread-1 (]: SQL status: OK in 0.010 seconds
[0m16:19:07.826145 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:07.827145 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:19:07.828148 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:19:07.831260 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:19:07.833480 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A98B20E150>]}
[0m16:19:07.833997 [info ] [Thread-1 (]: 6 of 26 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.37s]
[0m16:19:07.835001 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:19:07.836003 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:19:07.836509 [info ] [Thread-1 (]: 7 of 26 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:19:07.837016 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:19:07.838026 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:19:07.843063 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:07.844825 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:19:07.849518 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:07.851575 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:07.852136 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:19:07.852136 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:07.853761 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.853761 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:07.854327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m16:19:07.907534 [debug] [Thread-1 (]: SQL status: OK in 0.052 seconds
[0m16:19:07.908550 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:07.910058 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:19:07.910584 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.913811 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:07.914913 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:19:07.916526 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.920821 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:07.921327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:19:07.922849 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:07.925861 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:07.925861 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:19:07.926862 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:07.929628 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:19:07.929628 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:07.930637 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:19:07.935039 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:19:07.938391 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:07.938959 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:19:07.941680 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.944694 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:19:07.945479 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A99059E0F0>]}
[0m16:19:07.946006 [info ] [Thread-1 (]: 7 of 26 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.11s]
[0m16:19:07.947022 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:19:07.947022 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:19:07.948222 [info ] [Thread-1 (]: 8 of 26 START sql table model main.dim_porte ................................... [RUN]
[0m16:19:07.949224 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_porte)
[0m16:19:07.949738 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:19:07.953750 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:19:07.954394 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:19:07.958399 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:19:07.960441 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:19:07.961453 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:19:07.961962 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:07.963136 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.963136 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:19:07.963136 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:19:07.965863 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:19:07.966910 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:07.967446 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: ROLLBACK
[0m16:19:07.972251 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_porte'
[0m16:19:07.972769 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:19:07.975989 [debug] [Thread-1 (]: Runtime Error in model dim_porte (models\gold\dim_porte.sql)
  Catalog Error: Table with name seed_dim_porte does not exist!
  Did you mean "dim_tempo"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_porte"
                ^
[0m16:19:07.977000 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A9905C8E00>]}
[0m16:19:07.978501 [error] [Thread-1 (]: 8 of 26 ERROR creating sql table model main.dim_porte .......................... [[31mERROR[0m in 0.03s]
[0m16:19:07.979508 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:19:07.980519 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:19:07.981027 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_porte' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_porte (models\gold\dim_porte.sql)
  Catalog Error: Table with name seed_dim_porte does not exist!
  Did you mean "dim_tempo"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_porte"
                ^.
[0m16:19:07.982611 [info ] [Thread-1 (]: 9 of 26 START sql table model main.dim_produto_credito ......................... [RUN]
[0m16:19:07.984201 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:19:07.984201 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:19:07.988537 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:19:07.990604 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:19:07.994885 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:19:07.997394 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:19:07.997394 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:19:07.998403 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:07.998403 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:07.999401 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:19:08.000460 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:19:08.001668 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:19:08.002287 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:08.002287 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: ROLLBACK
[0m16:19:08.007989 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_produto_credito'
[0m16:19:08.009001 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:19:08.012068 [debug] [Thread-1 (]: Runtime Error in model dim_produto_credito (models\gold\dim_produto_credito.sql)
  Catalog Error: Table with name seed_dim_produto_credito does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_produto_credito"
                ^
[0m16:19:08.012574 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A99047D760>]}
[0m16:19:08.013605 [error] [Thread-1 (]: 9 of 26 ERROR creating sql table model main.dim_produto_credito ................ [[31mERROR[0m in 0.03s]
[0m16:19:08.013605 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:19:08.015138 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:19:08.015138 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_produto_credito' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_produto_credito (models\gold\dim_produto_credito.sql)
  Catalog Error: Table with name seed_dim_produto_credito does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_produto_credito"
                ^.
[0m16:19:08.015138 [info ] [Thread-1 (]: 10 of 26 START sql table model main.dim_regiao ................................. [RUN]
[0m16:19:08.016718 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:19:08.017305 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:19:08.020840 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:19:08.021351 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:19:08.025913 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:19:08.026914 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:19:08.027913 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:19:08.027913 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:08.027913 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:08.029798 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:19:08.029798 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:19:08.032322 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:19:08.032322 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:08.034026 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: ROLLBACK
[0m16:19:08.040355 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_regiao'
[0m16:19:08.040862 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:19:08.048298 [debug] [Thread-1 (]: Runtime Error in model dim_regiao (models\gold\dim_regiao.sql)
  Catalog Error: Table with name seed_dim_regiao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_regiao"
                ^
[0m16:19:08.049297 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A992619340>]}
[0m16:19:08.052322 [error] [Thread-1 (]: 10 of 26 ERROR creating sql table model main.dim_regiao ........................ [[31mERROR[0m in 0.03s]
[0m16:19:08.054914 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:19:08.055924 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:19:08.056937 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_regiao' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_regiao (models\gold\dim_regiao.sql)
  Catalog Error: Table with name seed_dim_regiao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_regiao"
                ^.
[0m16:19:08.057512 [info ] [Thread-1 (]: 11 of 26 START sql table model main.dim_risco .................................. [RUN]
[0m16:19:08.058519 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:19:08.058519 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:19:08.064672 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:19:08.065180 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:19:08.072090 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:19:08.074240 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:19:08.074240 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:19:08.075749 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:08.076760 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:08.077760 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:19:08.078270 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:19:08.079275 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:19:08.081045 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:08.081045 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: ROLLBACK
[0m16:19:08.089178 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_risco'
[0m16:19:08.090684 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:19:08.097533 [debug] [Thread-1 (]: Runtime Error in model dim_risco (models\gold\dim_risco.sql)
  Catalog Error: Table with name seed_dim_risco does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_risco"
                ^
[0m16:19:08.098544 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A9925FF7D0>]}
[0m16:19:08.099646 [error] [Thread-1 (]: 11 of 26 ERROR creating sql table model main.dim_risco ......................... [[31mERROR[0m in 0.04s]
[0m16:19:08.101223 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:19:08.102468 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:19:08.102468 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_risco' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_risco (models\gold\dim_risco.sql)
  Catalog Error: Table with name seed_dim_risco does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_risco"
                ^.
[0m16:19:08.103983 [info ] [Thread-1 (]: 12 of 26 START sql table model main.dim_segmento ............................... [RUN]
[0m16:19:08.105176 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:19:08.106183 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:19:08.114553 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:19:08.116748 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:19:08.120425 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:19:08.122449 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:19:08.123122 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:19:08.124131 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:08.125132 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:08.126133 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:19:08.126133 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:19:08.127131 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:19:08.128131 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:08.128131 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: ROLLBACK
[0m16:19:08.132421 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_segmento'
[0m16:19:08.132927 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:19:08.135937 [debug] [Thread-1 (]: Runtime Error in model dim_segmento (models\gold\dim_segmento.sql)
  Catalog Error: Table with name seed_dim_segmento does not exist!
  Did you mean "fato_operacoes_clientes"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_segmento"
                ^
[0m16:19:08.135937 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A99260E030>]}
[0m16:19:08.137235 [error] [Thread-1 (]: 12 of 26 ERROR creating sql table model main.dim_segmento ...................... [[31mERROR[0m in 0.03s]
[0m16:19:08.138241 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:19:08.138241 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:19:08.138241 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_segmento' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_segmento (models\gold\dim_segmento.sql)
  Catalog Error: Table with name seed_dim_segmento does not exist!
  Did you mean "fato_operacoes_clientes"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_segmento"
                ^.
[0m16:19:08.139747 [info ] [Thread-1 (]: 13 of 26 START sql table model main.dim_tempo .................................. [RUN]
[0m16:19:08.139747 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:19:08.140753 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:19:08.145400 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:08.146547 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:19:08.151642 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:08.153797 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:08.153797 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:19:08.154888 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:08.155432 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:08.155963 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:08.156495 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:19:08.171418 [debug] [Thread-1 (]: SQL status: OK in 0.015 seconds
[0m16:19:08.173945 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:08.173945 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:19:08.175940 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:08.177729 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:08.177729 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:19:08.179411 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:08.182534 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:08.182534 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:19:08.184120 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:08.187184 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:08.187184 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:19:08.188187 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:08.189693 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:19:08.189693 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:08.190700 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:19:08.192716 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:19:08.196893 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:08.197397 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:19:08.198403 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:08.200415 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:19:08.200931 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A99047D1F0>]}
[0m16:19:08.201496 [info ] [Thread-1 (]: 13 of 26 OK created sql table model main.dim_tempo ............................. [[32mOK[0m in 0.06s]
[0m16:19:08.202034 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:19:08.202034 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:19:08.202034 [info ] [Thread-1 (]: 14 of 26 START sql table model main.fato_balanco_patrimonial ................... [RUN]
[0m16:19:08.203659 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:19:08.204235 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:19:08.209772 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:08.210782 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:19:08.215394 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:08.217414 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:08.217414 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:19:08.217414 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:08.218929 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:08.218929 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:08.220516 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:19:09.045403 [debug] [Thread-1 (]: SQL status: OK in 0.823 seconds
[0m16:19:09.048025 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:09.049609 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:19:09.051131 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.055977 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:09.055977 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:19:09.057540 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.062141 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:09.062646 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:19:09.063650 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:09.067269 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:09.068304 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:19:09.069300 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:09.070383 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:19:09.071424 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:09.071424 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:19:09.417621 [debug] [Thread-1 (]: SQL status: OK in 0.345 seconds
[0m16:19:09.421571 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:09.422587 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:19:09.426233 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:19:09.429754 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:19:09.430779 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A992687290>]}
[0m16:19:09.431297 [info ] [Thread-1 (]: 14 of 26 OK created sql table model main.fato_balanco_patrimonial .............. [[32mOK[0m in 1.23s]
[0m16:19:09.432922 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:19:09.433525 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:19:09.434290 [info ] [Thread-1 (]: 15 of 26 START sql table model main.fato_capital_prudencial .................... [RUN]
[0m16:19:09.435296 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:19:09.436546 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:19:09.440802 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:19:09.443812 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:19:09.450328 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:19:09.452442 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:19:09.453509 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:19:09.454046 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:09.455659 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.455659 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:19:09.457178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:19:09.461224 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:19:09.462234 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:09.463240 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: ROLLBACK
[0m16:19:09.470007 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_capital_prudencial'
[0m16:19:09.470528 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:19:09.475133 [debug] [Thread-1 (]: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:19:09.476183 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A9926083B0>]}
[0m16:19:09.476713 [error] [Thread-1 (]: 15 of 26 ERROR creating sql table model main.fato_capital_prudencial ........... [[31mERROR[0m in 0.04s]
[0m16:19:09.478228 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:19:09.479237 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:19:09.480747 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_capital_prudencial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^.
[0m16:19:09.481483 [info ] [Thread-1 (]: 16 of 26 START sql table model main.fato_carteira_credito_indexador ............ [RUN]
[0m16:19:09.486112 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:19:09.486941 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:19:09.492123 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:19:09.494816 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:19:09.499139 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:19:09.501752 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:19:09.502314 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:19:09.502314 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:09.503332 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.504395 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:19:09.505282 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:19:09.508630 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:19:09.508630 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:09.510670 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: ROLLBACK
[0m16:19:09.515913 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador'
[0m16:19:09.515913 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:19:09.520503 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^
[0m16:19:09.522024 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A992640590>]}
[0m16:19:09.522529 [error] [Thread-1 (]: 16 of 26 ERROR creating sql table model main.fato_carteira_credito_indexador ... [[31mERROR[0m in 0.04s]
[0m16:19:09.523451 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:19:09.524108 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:19:09.525104 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^.
[0m16:19:09.524108 [info ] [Thread-1 (]: 17 of 26 START sql table model main.fato_carteira_credito_totais ............... [RUN]
[0m16:19:09.526107 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:19:09.527105 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:19:09.532720 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:19:09.534369 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:19:09.540599 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:19:09.543164 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:19:09.543671 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:19:09.543671 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:09.544733 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.545798 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:19:09.545798 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:19:09.550433 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:19:09.551520 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:09.552066 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: ROLLBACK
[0m16:19:09.557310 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_totais'
[0m16:19:09.557819 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:19:09.561449 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m16:19:09.562544 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A992642600>]}
[0m16:19:09.563086 [error] [Thread-1 (]: 17 of 26 ERROR creating sql table model main.fato_carteira_credito_totais ...... [[31mERROR[0m in 0.04s]
[0m16:19:09.564596 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:19:09.564596 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:19:09.564596 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_totais' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^.
[0m16:19:09.565617 [info ] [Thread-1 (]: 18 of 26 START sql table model main.fato_demonstracao_resultado ................ [RUN]
[0m16:19:09.566152 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:19:09.566677 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:19:09.573130 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:19:09.576204 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:19:09.580436 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:19:09.583228 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:19:09.583769 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:19:09.583769 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:09.584283 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.584283 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:19:09.585875 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:19:09.588447 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:19:09.589956 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:09.590623 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: ROLLBACK
[0m16:19:09.594240 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_demonstracao_resultado'
[0m16:19:09.594832 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:19:09.599360 [debug] [Thread-1 (]: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m16:19:09.601071 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A99260A7E0>]}
[0m16:19:09.601640 [error] [Thread-1 (]: 18 of 26 ERROR creating sql table model main.fato_demonstracao_resultado ....... [[31mERROR[0m in 0.03s]
[0m16:19:09.602201 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:19:09.603785 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:19:09.604382 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_demonstracao_resultado' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT".
[0m16:19:09.605624 [info ] [Thread-1 (]: 19 of 26 START sql table model main.fato_movimentacao_cambio ................... [RUN]
[0m16:19:09.606136 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:19:09.607142 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:19:09.611733 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:09.612794 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:19:09.618982 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:09.620660 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:09.621366 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:19:09.621885 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:09.622990 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.623556 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:09.624578 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:19:09.634041 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:19:09.634584 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:09.634584 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:19:09.637250 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.639258 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:09.639258 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:19:09.640762 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.645469 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:09.645469 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:19:09.647573 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:09.653431 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:09.654025 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:19:09.655685 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.658421 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:19:09.659510 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:09.659510 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:19:09.665458 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:19:09.669304 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:09.670322 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:19:09.672381 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.674414 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:19:09.674414 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A99047EC60>]}
[0m16:19:09.675422 [info ] [Thread-1 (]: 19 of 26 OK created sql table model main.fato_movimentacao_cambio .............. [[32mOK[0m in 0.07s]
[0m16:19:09.676421 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:19:09.676421 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:19:09.676421 [info ] [Thread-1 (]: 20 of 26 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:19:09.677998 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:19:09.677998 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:19:09.683273 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:09.684792 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:19:09.690385 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:09.692911 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:09.693420 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:19:09.693420 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:09.694464 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.695496 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:09.695496 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:19:09.738573 [debug] [Thread-1 (]: SQL status: OK in 0.043 seconds
[0m16:19:09.740608 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:09.742131 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:19:09.743139 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.744763 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:09.745382 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:19:09.745382 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.750507 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:09.751023 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:19:09.751584 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:09.754852 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:09.754852 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:19:09.757089 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:09.758682 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:19:09.758682 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:09.758682 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:19:09.769605 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:19:09.773312 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:09.773835 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:19:09.774893 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.777002 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:19:09.778011 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A99F43FD70>]}
[0m16:19:09.778011 [info ] [Thread-1 (]: 20 of 26 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.10s]
[0m16:19:09.779571 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:19:09.779571 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:19:09.780577 [info ] [Thread-1 (]: 21 of 26 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:19:09.781081 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:19:09.781081 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:19:09.787314 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:09.788322 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:19:09.792868 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:09.794459 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:09.795466 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:19:09.795466 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:09.797694 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:09.797694 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:09.799264 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:19:10.195599 [debug] [Thread-1 (]: SQL status: OK in 0.396 seconds
[0m16:19:10.198118 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:10.199116 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:19:10.200625 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:10.202641 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:10.203635 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:19:10.204632 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:10.208982 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:10.210492 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:19:10.211502 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:10.216505 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:10.218018 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:19:10.219031 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:10.221549 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:19:10.222552 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:10.223551 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:19:10.607473 [debug] [Thread-1 (]: SQL status: OK in 0.383 seconds
[0m16:19:10.611617 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:10.612781 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:19:10.622716 [debug] [Thread-1 (]: SQL status: OK in 0.010 seconds
[0m16:19:10.625730 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:19:10.627174 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '4ef94a54-838d-4bb8-8f50-6a3071a870ac', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A99059EF60>]}
[0m16:19:10.628210 [info ] [Thread-1 (]: 21 of 26 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.85s]
[0m16:19:10.629276 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:19:10.630338 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:19:10.630856 [info ] [Thread-1 (]: 22 of 26 SKIP relation main.fato_carteira_credito_atividade .................... [[33mSKIP[0m]
[0m16:19:10.631943 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:19:10.632470 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:19:10.632988 [info ] [Thread-1 (]: 23 of 26 SKIP relation main.fato_carteira_credito_porte ........................ [[33mSKIP[0m]
[0m16:19:10.634045 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:19:10.634559 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:19:10.635092 [info ] [Thread-1 (]: 24 of 26 SKIP relation main.fato_carteira_credito_produto ...................... [[33mSKIP[0m]
[0m16:19:10.635608 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:19:10.637171 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:19:10.638184 [info ] [Thread-1 (]: 25 of 26 SKIP relation main.fato_regiao_credito ................................ [[33mSKIP[0m]
[0m16:19:10.638184 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:19:10.639181 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:19:10.639181 [info ] [Thread-1 (]: 26 of 26 SKIP relation main.fato_risco_credito ................................. [[33mSKIP[0m]
[0m16:19:10.640689 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:19:10.642216 [debug] [MainThread]: Using duckdb connection "master"
[0m16:19:10.642929 [debug] [MainThread]: On master: BEGIN
[0m16:19:10.643442 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:19:10.644526 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:19:10.645058 [debug] [MainThread]: On master: COMMIT
[0m16:19:10.645058 [debug] [MainThread]: Using duckdb connection "master"
[0m16:19:10.645058 [debug] [MainThread]: On master: COMMIT
[0m16:19:10.646578 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:19:10.646578 [debug] [MainThread]: On master: Close
[0m16:19:10.646578 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:19:10.647590 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:19:10.648098 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:19:10.648098 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_resumo_financeiro' was properly closed.
[0m16:19:10.648098 [info ] [MainThread]: 
[0m16:19:10.649609 [info ] [MainThread]: Finished running 26 table models in 0 hours 0 minutes and 4.97 seconds (4.97s).
[0m16:19:10.655706 [debug] [MainThread]: Command end result
[0m16:19:10.711427 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:19:10.719267 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:19:10.731011 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:19:10.731011 [info ] [MainThread]: 
[0m16:19:10.732626 [info ] [MainThread]: [31mCompleted with 14 errors, 0 partial successes, and 0 warnings:[0m
[0m16:19:10.734228 [info ] [MainThread]: 
[0m16:19:10.734845 [error] [MainThread]: [31mFailure in model dim_atividade (models\gold\dim_atividade.sql)[0m
[0m16:19:10.735857 [error] [MainThread]:   Runtime Error in model dim_atividade (models\gold\dim_atividade.sql)
  Catalog Error: Table with name seed_dim_atividade does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_atividade"
                ^
[0m16:19:10.736958 [info ] [MainThread]: 
[0m16:19:10.737985 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_atividade.sql
[0m16:19:10.739973 [info ] [MainThread]: 
[0m16:19:10.742014 [error] [MainThread]: [31mFailure in model dim_classe_instituicao (models\gold\dim_classe_instituicao.sql)[0m
[0m16:19:10.744343 [error] [MainThread]:   Runtime Error in model dim_classe_instituicao (models\gold\dim_classe_instituicao.sql)
  Catalog Error: Table with name seed_dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
                ^
[0m16:19:10.745064 [info ] [MainThread]: 
[0m16:19:10.746150 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_classe_instituicao.sql
[0m16:19:10.747198 [info ] [MainThread]: 
[0m16:19:10.748275 [error] [MainThread]: [31mFailure in model dim_consolidado (models\gold\dim_consolidado.sql)[0m
[0m16:19:10.749452 [error] [MainThread]:   Runtime Error in model dim_consolidado (models\gold\dim_consolidado.sql)
  Catalog Error: Table with name seed_dim_consolidado does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_consolidado"
                ^
[0m16:19:10.750686 [info ] [MainThread]: 
[0m16:19:10.751236 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_consolidado.sql
[0m16:19:10.751928 [info ] [MainThread]: 
[0m16:19:10.752457 [error] [MainThread]: [31mFailure in model dim_controle (models\gold\dim_controle.sql)[0m
[0m16:19:10.752986 [error] [MainThread]:   Runtime Error in model dim_controle (models\gold\dim_controle.sql)
  Catalog Error: Table with name seed_dim_controle does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_controle"
                ^
[0m16:19:10.753501 [info ] [MainThread]: 
[0m16:19:10.754017 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_controle.sql
[0m16:19:10.754568 [info ] [MainThread]: 
[0m16:19:10.755194 [error] [MainThread]: [31mFailure in model dim_faixa_vencimento (models\gold\dim_faixa_vencimento.sql)[0m
[0m16:19:10.756204 [error] [MainThread]:   Runtime Error in model dim_faixa_vencimento (models\gold\dim_faixa_vencimento.sql)
  Catalog Error: Table with name seed_dim_faixa_vencimento does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
                ^
[0m16:19:10.757439 [info ] [MainThread]: 
[0m16:19:10.758471 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_faixa_vencimento.sql
[0m16:19:10.760517 [info ] [MainThread]: 
[0m16:19:10.761562 [error] [MainThread]: [31mFailure in model dim_porte (models\gold\dim_porte.sql)[0m
[0m16:19:10.762579 [error] [MainThread]:   Runtime Error in model dim_porte (models\gold\dim_porte.sql)
  Catalog Error: Table with name seed_dim_porte does not exist!
  Did you mean "dim_tempo"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_porte"
                ^
[0m16:19:10.763590 [info ] [MainThread]: 
[0m16:19:10.763590 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_porte.sql
[0m16:19:10.765097 [info ] [MainThread]: 
[0m16:19:10.765714 [error] [MainThread]: [31mFailure in model dim_produto_credito (models\gold\dim_produto_credito.sql)[0m
[0m16:19:10.766248 [error] [MainThread]:   Runtime Error in model dim_produto_credito (models\gold\dim_produto_credito.sql)
  Catalog Error: Table with name seed_dim_produto_credito does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_produto_credito"
                ^
[0m16:19:10.767313 [info ] [MainThread]: 
[0m16:19:10.768337 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_produto_credito.sql
[0m16:19:10.768849 [info ] [MainThread]: 
[0m16:19:10.769417 [error] [MainThread]: [31mFailure in model dim_regiao (models\gold\dim_regiao.sql)[0m
[0m16:19:10.770493 [error] [MainThread]:   Runtime Error in model dim_regiao (models\gold\dim_regiao.sql)
  Catalog Error: Table with name seed_dim_regiao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_regiao"
                ^
[0m16:19:10.770493 [info ] [MainThread]: 
[0m16:19:10.771515 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_regiao.sql
[0m16:19:10.771515 [info ] [MainThread]: 
[0m16:19:10.771515 [error] [MainThread]: [31mFailure in model dim_risco (models\gold\dim_risco.sql)[0m
[0m16:19:10.772718 [error] [MainThread]:   Runtime Error in model dim_risco (models\gold\dim_risco.sql)
  Catalog Error: Table with name seed_dim_risco does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_risco"
                ^
[0m16:19:10.773725 [info ] [MainThread]: 
[0m16:19:10.773725 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_risco.sql
[0m16:19:10.773725 [info ] [MainThread]: 
[0m16:19:10.774725 [error] [MainThread]: [31mFailure in model dim_segmento (models\gold\dim_segmento.sql)[0m
[0m16:19:10.774725 [error] [MainThread]:   Runtime Error in model dim_segmento (models\gold\dim_segmento.sql)
  Catalog Error: Table with name seed_dim_segmento does not exist!
  Did you mean "fato_operacoes_clientes"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_segmento"
                ^
[0m16:19:10.775726 [info ] [MainThread]: 
[0m16:19:10.776726 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_segmento.sql
[0m16:19:10.777262 [info ] [MainThread]: 
[0m16:19:10.777770 [error] [MainThread]: [31mFailure in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)[0m
[0m16:19:10.777770 [error] [MainThread]:   Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:19:10.777770 [info ] [MainThread]: 
[0m16:19:10.779335 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_capital_prudencial.sql
[0m16:19:10.779335 [info ] [MainThread]: 
[0m16:19:10.779335 [error] [MainThread]: [31mFailure in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)[0m
[0m16:19:10.780851 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^
[0m16:19:10.781447 [info ] [MainThread]: 
[0m16:19:10.781447 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_indexador.sql
[0m16:19:10.782465 [info ] [MainThread]: 
[0m16:19:10.782465 [error] [MainThread]: [31mFailure in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)[0m
[0m16:19:10.784364 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m16:19:10.785954 [info ] [MainThread]: 
[0m16:19:10.785954 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_totais.sql
[0m16:19:10.786962 [info ] [MainThread]: 
[0m16:19:10.786962 [error] [MainThread]: [31mFailure in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)[0m
[0m16:19:10.787998 [error] [MainThread]:   Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m16:19:10.787998 [info ] [MainThread]: 
[0m16:19:10.788996 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_demonstracao_resultado.sql
[0m16:19:10.790511 [info ] [MainThread]: 
[0m16:19:10.792039 [info ] [MainThread]: Done. PASS=7 WARN=0 ERROR=14 SKIP=5 NO-OP=0 TOTAL=26
[0m16:19:10.793560 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:19:10.795668 [debug] [MainThread]: Command `dbt run` failed at 16:19:10.794655 after 10.30 seconds
[0m16:19:10.797408 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A98E22F860>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A98E290E60>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002A98DDE2CC0>]}
[0m16:19:11.778315 [debug] [MainThread]: An error was encountered while trying to send an event
[0m16:19:11.784040 [debug] [MainThread]: Flushing usage events
[0m16:19:48.346749 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F7E48710>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F47CEA20>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F7837260>]}


============================== 16:19:48.359359 | 65281022-862a-4b3c-ab83-910fe3a8ee96 ==============================
[0m16:19:48.359359 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:19:48.359359 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'False', 'invocation_command': 'dbt run --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:19:48.653981 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F7837BF0>]}
[0m16:19:48.717435 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F8694B60>]}
[0m16:19:48.724846 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:19:49.379554 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:19:49.381027 [debug] [MainThread]: Partial parsing not enabled
[0m16:19:51.261869 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:19:51.262961 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FA1465D0>]}
[0m16:19:51.742907 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:19:51.751721 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F9FE82C0>]}
[0m16:19:51.852330 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:19:51.856046 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:19:51.902719 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F9E7E390>]}
[0m16:19:51.902719 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:19:51.903728 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F9F1F2F0>]}
[0m16:19:51.909267 [info ] [MainThread]: 
[0m16:19:51.909816 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:19:51.909816 [info ] [MainThread]: 
[0m16:19:51.910339 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:19:51.916528 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:19:52.318730 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:19:52.318730 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:19:52.319730 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:19:53.386728 [debug] [ThreadPool]: SQL status: OK in 1.067 seconds
[0m16:19:53.388563 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:19:53.391662 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:19:53.392732 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:19:53.401202 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:19:53.401841 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:19:53.402475 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:19:53.404073 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:19:53.405174 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:19:53.406185 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:19:53.407203 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:19:53.408216 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:19:53.408216 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:19:53.410214 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:19:53.410723 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:19:53.410723 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:19:53.411731 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:19:53.411731 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:19:53.411731 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:19:53.416440 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:19:53.423383 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:19:53.423928 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:19:53.424471 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:19:53.425568 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:19:53.426952 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:19:53.428123 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:19:53.453246 [debug] [ThreadPool]: SQL status: OK in 0.024 seconds
[0m16:19:53.454852 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:19:53.457446 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:19:53.458456 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:19:53.459965 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FA26A660>]}
[0m16:19:53.460488 [debug] [MainThread]: Using duckdb connection "master"
[0m16:19:53.460488 [debug] [MainThread]: On master: BEGIN
[0m16:19:53.460488 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:19:53.461497 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:19:53.462760 [debug] [MainThread]: On master: COMMIT
[0m16:19:53.462760 [debug] [MainThread]: Using duckdb connection "master"
[0m16:19:53.462760 [debug] [MainThread]: On master: COMMIT
[0m16:19:53.463771 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:19:53.463771 [debug] [MainThread]: On master: Close
[0m16:19:53.473093 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:19:53.473093 [info ] [Thread-1 (]: 1 of 26 START sql table model main.dim_atividade ............................... [RUN]
[0m16:19:53.474104 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_atividade'
[0m16:19:53.474104 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:19:53.481761 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:19:53.484737 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:19:53.515157 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:19:53.517628 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:19:53.520889 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:19:53.521426 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:19:53.523049 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:19:53.524324 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:19:53.524324 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:19:53.538130 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:19:53.539129 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:53.539129 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: ROLLBACK
[0m16:19:53.552439 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_atividade'
[0m16:19:53.552439 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:19:53.556097 [debug] [Thread-1 (]: Runtime Error in model dim_atividade (models\gold\dim_atividade.sql)
  Catalog Error: Table with name seed_dim_atividade does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_atividade"
                ^
[0m16:19:53.561225 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F9FEB2F0>]}
[0m16:19:53.562317 [error] [Thread-1 (]: 1 of 26 ERROR creating sql table model main.dim_atividade ...................... [[31mERROR[0m in 0.08s]
[0m16:19:53.564495 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:19:53.565599 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:19:53.566672 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_atividade' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_atividade (models\gold\dim_atividade.sql)
  Catalog Error: Table with name seed_dim_atividade does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_atividade"
                ^.
[0m16:19:53.567755 [info ] [Thread-1 (]: 2 of 26 START sql table model main.dim_classe_instituicao ...................... [RUN]
[0m16:19:53.569272 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:19:53.570547 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:19:53.575420 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:19:53.576428 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:19:53.579523 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:19:53.581046 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:19:53.581046 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:19:53.581046 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:53.582662 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:53.582662 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:19:53.582662 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:19:53.586928 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:19:53.588168 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:53.588168 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: ROLLBACK
[0m16:19:53.591683 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_classe_instituicao'
[0m16:19:53.591683 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:19:53.599393 [debug] [Thread-1 (]: Runtime Error in model dim_classe_instituicao (models\gold\dim_classe_instituicao.sql)
  Catalog Error: Table with name seed_dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
                ^
[0m16:19:53.601057 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FC59BF80>]}
[0m16:19:53.603669 [error] [Thread-1 (]: 2 of 26 ERROR creating sql table model main.dim_classe_instituicao ............. [[31mERROR[0m in 0.03s]
[0m16:19:53.605974 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:19:53.607489 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:19:53.609586 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_classe_instituicao' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_classe_instituicao (models\gold\dim_classe_instituicao.sql)
  Catalog Error: Table with name seed_dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
                ^.
[0m16:19:53.610610 [info ] [Thread-1 (]: 3 of 26 START sql table model main.dim_consolidado ............................. [RUN]
[0m16:19:53.613046 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:19:53.613573 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:19:53.617847 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:19:53.618930 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:19:53.627317 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:19:53.630029 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:19:53.630550 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:19:53.631537 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:53.632612 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:53.633151 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:19:53.633687 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:19:53.634781 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:19:53.635867 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:53.637164 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: ROLLBACK
[0m16:19:53.640784 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_consolidado'
[0m16:19:53.640784 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:19:53.646202 [debug] [Thread-1 (]: Runtime Error in model dim_consolidado (models\gold\dim_consolidado.sql)
  Catalog Error: Table with name seed_dim_consolidado does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_consolidado"
                ^
[0m16:19:53.646728 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FA4E01D0>]}
[0m16:19:53.647867 [error] [Thread-1 (]: 3 of 26 ERROR creating sql table model main.dim_consolidado .................... [[31mERROR[0m in 0.03s]
[0m16:19:53.648404 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:19:53.649491 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:19:53.651090 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_consolidado' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_consolidado (models\gold\dim_consolidado.sql)
  Catalog Error: Table with name seed_dim_consolidado does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_consolidado"
                ^.
[0m16:19:53.652296 [info ] [Thread-1 (]: 4 of 26 START sql table model main.dim_controle ................................ [RUN]
[0m16:19:53.653367 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:19:53.653930 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:19:53.656033 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:19:53.657553 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:19:53.660598 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:19:53.662666 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:19:53.663778 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:19:53.663778 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:53.665283 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:53.666294 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:19:53.671750 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:19:53.681300 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:19:53.682474 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:53.683486 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: ROLLBACK
[0m16:19:53.694289 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_controle'
[0m16:19:53.694799 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:19:53.702362 [debug] [Thread-1 (]: Runtime Error in model dim_controle (models\gold\dim_controle.sql)
  Catalog Error: Table with name seed_dim_controle does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_controle"
                ^
[0m16:19:53.703375 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FA064AA0>]}
[0m16:19:53.703375 [error] [Thread-1 (]: 4 of 26 ERROR creating sql table model main.dim_controle ....................... [[31mERROR[0m in 0.05s]
[0m16:19:53.705898 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:19:53.705898 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:19:53.707319 [info ] [Thread-1 (]: 5 of 26 START sql table model main.dim_faixa_vencimento ........................ [RUN]
[0m16:19:53.709336 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:19:53.711778 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_controle' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_controle (models\gold\dim_controle.sql)
  Catalog Error: Table with name seed_dim_controle does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_controle"
                ^.
[0m16:19:53.712791 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:19:53.718142 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:19:53.725613 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:19:53.740306 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:19:53.743456 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:19:53.744564 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:19:53.745146 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:53.746234 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:53.746755 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:19:53.747300 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:19:53.749543 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:19:53.750105 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:53.751152 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: ROLLBACK
[0m16:19:53.755036 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_faixa_vencimento'
[0m16:19:53.755036 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:19:53.759109 [debug] [Thread-1 (]: Runtime Error in model dim_faixa_vencimento (models\gold\dim_faixa_vencimento.sql)
  Catalog Error: Table with name seed_dim_faixa_vencimento does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
                ^
[0m16:19:53.760617 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FA4C5790>]}
[0m16:19:53.761158 [error] [Thread-1 (]: 5 of 26 ERROR creating sql table model main.dim_faixa_vencimento ............... [[31mERROR[0m in 0.05s]
[0m16:19:53.762687 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:19:53.762687 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:19:53.763705 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_faixa_vencimento' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_faixa_vencimento (models\gold\dim_faixa_vencimento.sql)
  Catalog Error: Table with name seed_dim_faixa_vencimento does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
                ^.
[0m16:19:53.763705 [info ] [Thread-1 (]: 6 of 26 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:19:53.765684 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_instituicao)
[0m16:19:53.766696 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:19:53.776786 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:53.778839 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:19:53.784094 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:53.786108 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:53.787127 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:19:53.787127 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:53.788139 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:53.789138 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:53.790138 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:19:54.169707 [debug] [Thread-1 (]: SQL status: OK in 0.379 seconds
[0m16:19:54.181224 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:54.182294 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:19:54.184471 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.186656 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:54.187207 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:19:54.189724 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:19:54.201152 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:54.201756 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:19:54.204464 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:19:54.209925 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:54.210450 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:19:54.211970 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.236914 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:19:54.238110 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:54.239111 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:19:54.348726 [debug] [Thread-1 (]: SQL status: OK in 0.107 seconds
[0m16:19:54.358652 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:19:54.358652 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:19:54.362723 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:19:54.366626 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:19:54.367715 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F51BE210>]}
[0m16:19:54.367715 [info ] [Thread-1 (]: 6 of 26 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.60s]
[0m16:19:54.369316 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:19:54.370112 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:19:54.371649 [info ] [Thread-1 (]: 7 of 26 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:19:54.373171 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:19:54.374213 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:19:54.381163 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:54.382773 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:19:54.387376 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:54.390645 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:54.390645 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:19:54.390645 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:54.392994 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:19:54.393654 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:54.394200 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m16:19:54.459282 [debug] [Thread-1 (]: SQL status: OK in 0.064 seconds
[0m16:19:54.460788 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:54.461799 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:19:54.463182 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.465384 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:54.466408 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:19:54.467429 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.472892 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:54.473909 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:19:54.474906 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.480772 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:54.481291 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:19:54.482891 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.485131 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:19:54.486190 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:54.486190 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:19:54.494522 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:19:54.497625 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:19:54.497625 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:19:54.504593 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:19:54.505686 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:19:54.506218 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FC5EBC20>]}
[0m16:19:54.506768 [info ] [Thread-1 (]: 7 of 26 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.13s]
[0m16:19:54.507302 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:19:54.507302 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:19:54.508312 [info ] [Thread-1 (]: 8 of 26 START sql table model main.dim_porte ................................... [RUN]
[0m16:19:54.508312 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_porte)
[0m16:19:54.508312 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:19:54.514810 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:19:54.517219 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:19:54.522442 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:19:54.524962 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:19:54.525653 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:19:54.526163 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:54.527174 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.528196 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:19:54.528196 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:19:54.529207 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:19:54.529207 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:54.529207 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: ROLLBACK
[0m16:19:54.534799 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_porte'
[0m16:19:54.535819 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:19:54.539969 [debug] [Thread-1 (]: Runtime Error in model dim_porte (models\gold\dim_porte.sql)
  Catalog Error: Table with name seed_dim_porte does not exist!
  Did you mean "dim_tempo"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_porte"
                ^
[0m16:19:54.540476 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FA568290>]}
[0m16:19:54.541998 [error] [Thread-1 (]: 8 of 26 ERROR creating sql table model main.dim_porte .......................... [[31mERROR[0m in 0.03s]
[0m16:19:54.543009 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:19:54.544586 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:19:54.545600 [info ] [Thread-1 (]: 9 of 26 START sql table model main.dim_produto_credito ......................... [RUN]
[0m16:19:54.547633 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_porte' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_porte (models\gold\dim_porte.sql)
  Catalog Error: Table with name seed_dim_porte does not exist!
  Did you mean "dim_tempo"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_porte"
                ^.
[0m16:19:54.548181 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:19:54.549194 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:19:54.554403 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:19:54.556522 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:19:54.560692 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:19:54.561715 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:19:54.562822 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:19:54.563331 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:54.563331 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.563331 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:19:54.564890 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:19:54.565530 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:19:54.566542 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:54.566542 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: ROLLBACK
[0m16:19:54.569806 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_produto_credito'
[0m16:19:54.570657 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:19:54.572916 [debug] [Thread-1 (]: Runtime Error in model dim_produto_credito (models\gold\dim_produto_credito.sql)
  Catalog Error: Table with name seed_dim_produto_credito does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_produto_credito"
                ^
[0m16:19:54.573931 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FA4E1BB0>]}
[0m16:19:54.574927 [error] [Thread-1 (]: 9 of 26 ERROR creating sql table model main.dim_produto_credito ................ [[31mERROR[0m in 0.03s]
[0m16:19:54.574927 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:19:54.575925 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:19:54.575925 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_produto_credito' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_produto_credito (models\gold\dim_produto_credito.sql)
  Catalog Error: Table with name seed_dim_produto_credito does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_produto_credito"
                ^.
[0m16:19:54.576926 [info ] [Thread-1 (]: 10 of 26 START sql table model main.dim_regiao ................................. [RUN]
[0m16:19:54.578435 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:19:54.578990 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:19:54.583944 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:19:54.585959 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:19:54.590623 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:19:54.593166 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:19:54.593683 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:19:54.594191 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:54.595280 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.595280 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:19:54.595280 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:19:54.597450 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:19:54.597450 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:54.598460 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: ROLLBACK
[0m16:19:54.603874 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_regiao'
[0m16:19:54.604456 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:19:54.606073 [debug] [Thread-1 (]: Runtime Error in model dim_regiao (models\gold\dim_regiao.sql)
  Catalog Error: Table with name seed_dim_regiao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_regiao"
                ^
[0m16:19:54.607164 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FC5BC8F0>]}
[0m16:19:54.608691 [error] [Thread-1 (]: 10 of 26 ERROR creating sql table model main.dim_regiao ........................ [[31mERROR[0m in 0.03s]
[0m16:19:54.610818 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:19:54.611832 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:19:54.612956 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_regiao' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_regiao (models\gold\dim_regiao.sql)
  Catalog Error: Table with name seed_dim_regiao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_regiao"
                ^.
[0m16:19:54.612956 [info ] [Thread-1 (]: 11 of 26 START sql table model main.dim_risco .................................. [RUN]
[0m16:19:54.615058 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:19:54.615570 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:19:54.619223 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:19:54.620747 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:19:54.624940 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:19:54.626580 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:19:54.628117 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:19:54.628117 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:54.630488 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.631640 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:19:54.632654 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:19:54.632654 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:19:54.634305 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:54.634305 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: ROLLBACK
[0m16:19:54.638057 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_risco'
[0m16:19:54.639066 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:19:54.641239 [debug] [Thread-1 (]: Runtime Error in model dim_risco (models\gold\dim_risco.sql)
  Catalog Error: Table with name seed_dim_risco does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_risco"
                ^
[0m16:19:54.642777 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FC5CB530>]}
[0m16:19:54.644410 [error] [Thread-1 (]: 11 of 26 ERROR creating sql table model main.dim_risco ......................... [[31mERROR[0m in 0.03s]
[0m16:19:54.644410 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:19:54.645429 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:19:54.645429 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_risco' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_risco (models\gold\dim_risco.sql)
  Catalog Error: Table with name seed_dim_risco does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_risco"
                ^.
[0m16:19:54.645429 [info ] [Thread-1 (]: 12 of 26 START sql table model main.dim_segmento ............................... [RUN]
[0m16:19:54.647308 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:19:54.647821 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:19:54.653355 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:19:54.655168 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:19:54.660492 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:19:54.663138 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:19:54.663665 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:19:54.664855 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:54.665460 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.666472 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:19:54.666472 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:19:54.667884 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:19:54.667884 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:54.667884 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: ROLLBACK
[0m16:19:54.672604 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.dim_segmento'
[0m16:19:54.673229 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:19:54.676245 [debug] [Thread-1 (]: Runtime Error in model dim_segmento (models\gold\dim_segmento.sql)
  Catalog Error: Table with name seed_dim_segmento does not exist!
  Did you mean "fato_operacoes_clientes"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_segmento"
                ^
[0m16:19:54.676245 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FA4C5520>]}
[0m16:19:54.677756 [error] [Thread-1 (]: 12 of 26 ERROR creating sql table model main.dim_segmento ...................... [[31mERROR[0m in 0.03s]
[0m16:19:54.677756 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:19:54.679369 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:19:54.679369 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_segmento' to be skipped because of status 'error'.  Reason: Runtime Error in model dim_segmento (models\gold\dim_segmento.sql)
  Catalog Error: Table with name seed_dim_segmento does not exist!
  Did you mean "fato_operacoes_clientes"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_segmento"
                ^.
[0m16:19:54.680915 [info ] [Thread-1 (]: 13 of 26 START sql table model main.dim_tempo .................................. [RUN]
[0m16:19:54.680915 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:19:54.680915 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:19:54.685731 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:54.687258 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:19:54.689791 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:54.691315 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:54.691315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:19:54.692328 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:54.692923 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.692923 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:54.692923 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:19:54.724943 [debug] [Thread-1 (]: SQL status: OK in 0.031 seconds
[0m16:19:54.726961 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:54.727952 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:19:54.728461 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.730482 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:54.730990 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:19:54.730990 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.734222 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:54.735823 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:19:54.735823 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:54.738385 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:54.738385 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:19:54.739896 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:54.740419 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:19:54.741942 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:54.741942 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:19:54.749574 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:19:54.751702 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:19:54.752303 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:19:54.771153 [debug] [Thread-1 (]: SQL status: OK in 0.018 seconds
[0m16:19:54.771153 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:19:54.772735 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FA54F050>]}
[0m16:19:54.772735 [info ] [Thread-1 (]: 13 of 26 OK created sql table model main.dim_tempo ............................. [[32mOK[0m in 0.09s]
[0m16:19:54.773745 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:19:54.773745 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:19:54.774754 [info ] [Thread-1 (]: 14 of 26 START sql table model main.fato_balanco_patrimonial ................... [RUN]
[0m16:19:54.774754 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:19:54.775745 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:19:54.780823 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:54.781331 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:19:54.783988 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:54.785000 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:54.786004 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:19:54.786004 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:54.786004 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:54.786004 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:54.787347 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:19:55.492830 [debug] [Thread-1 (]: SQL status: OK in 0.705 seconds
[0m16:19:55.494479 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:55.494479 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:19:55.496118 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:55.499398 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:55.499398 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:19:55.501122 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:55.504170 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:55.504170 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:19:55.504796 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:55.507737 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:55.507737 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:19:55.508779 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:55.510253 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:19:55.510931 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:55.511948 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:19:55.858500 [debug] [Thread-1 (]: SQL status: OK in 0.346 seconds
[0m16:19:55.863599 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:19:55.864106 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:19:55.880486 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:19:55.880992 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:19:55.880992 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FC62F050>]}
[0m16:19:55.882548 [info ] [Thread-1 (]: 14 of 26 OK created sql table model main.fato_balanco_patrimonial .............. [[32mOK[0m in 1.11s]
[0m16:19:55.882548 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:19:55.882548 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:19:55.882548 [info ] [Thread-1 (]: 15 of 26 START sql table model main.fato_capital_prudencial .................... [RUN]
[0m16:19:55.884102 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:19:55.884102 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:19:55.887876 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:19:55.888876 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:19:55.891920 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:19:55.892933 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:19:55.892933 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:19:55.892933 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:55.894567 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:55.894567 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:19:55.894567 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:19:55.921375 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:19:55.921375 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:55.922385 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: ROLLBACK
[0m16:19:55.924898 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_capital_prudencial'
[0m16:19:55.924898 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:19:55.926898 [debug] [Thread-1 (]: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:19:55.927899 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FA56F0B0>]}
[0m16:19:55.927899 [error] [Thread-1 (]: 15 of 26 ERROR creating sql table model main.fato_capital_prudencial ........... [[31mERROR[0m in 0.04s]
[0m16:19:55.927899 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:19:55.927899 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:19:55.929605 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_capital_prudencial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^.
[0m16:19:55.930617 [info ] [Thread-1 (]: 16 of 26 START sql table model main.fato_carteira_credito_indexador ............ [RUN]
[0m16:19:55.932185 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:19:55.932713 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:19:55.937003 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:19:55.938136 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:19:55.940641 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:19:55.942750 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:19:55.942750 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:19:55.942750 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:55.942750 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:55.942750 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:19:55.944315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:19:55.944964 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:19:55.945996 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:55.945996 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: ROLLBACK
[0m16:19:55.947830 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador'
[0m16:19:55.949362 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:19:55.950919 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^
[0m16:19:55.951491 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FC5EEC00>]}
[0m16:19:55.952076 [error] [Thread-1 (]: 16 of 26 ERROR creating sql table model main.fato_carteira_credito_indexador ... [[31mERROR[0m in 0.02s]
[0m16:19:55.952076 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:19:55.952076 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:19:55.952076 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^.
[0m16:19:55.953657 [info ] [Thread-1 (]: 17 of 26 START sql table model main.fato_carteira_credito_totais ............... [RUN]
[0m16:19:55.954227 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:19:55.954227 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:19:55.958384 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:19:55.958384 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:19:55.965164 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:19:55.966805 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:19:55.966805 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:19:55.967480 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:55.967480 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:55.967480 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:19:55.969146 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:19:56.009094 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:19:56.010623 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:56.011635 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: ROLLBACK
[0m16:19:56.013792 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_totais'
[0m16:19:56.013792 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:19:56.016304 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m16:19:56.016304 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FC5ECE00>]}
[0m16:19:56.017348 [error] [Thread-1 (]: 17 of 26 ERROR creating sql table model main.fato_carteira_credito_totais ...... [[31mERROR[0m in 0.06s]
[0m16:19:56.018358 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:19:56.018358 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:19:56.018358 [info ] [Thread-1 (]: 18 of 26 START sql table model main.fato_demonstracao_resultado ................ [RUN]
[0m16:19:56.019357 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_totais' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^.
[0m16:19:56.019866 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:19:56.020374 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:19:56.024339 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:19:56.025350 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:19:56.027907 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:19:56.029525 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:19:56.029525 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:19:56.029525 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:56.030530 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:56.030530 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:19:56.031037 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:19:56.088836 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:19:56.088836 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:19:56.089837 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: ROLLBACK
[0m16:19:56.091897 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_demonstracao_resultado'
[0m16:19:56.091897 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:19:56.095265 [debug] [Thread-1 (]: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m16:19:56.096276 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FC5EF4D0>]}
[0m16:19:56.096276 [error] [Thread-1 (]: 18 of 26 ERROR creating sql table model main.fato_demonstracao_resultado ....... [[31mERROR[0m in 0.08s]
[0m16:19:56.097274 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:19:56.097274 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:19:56.098398 [info ] [Thread-1 (]: 19 of 26 START sql table model main.fato_movimentacao_cambio ................... [RUN]
[0m16:19:56.098398 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_demonstracao_resultado' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT".
[0m16:19:56.099434 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:19:56.099434 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:19:56.102980 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:56.104129 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:19:56.108368 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:56.109879 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:56.110895 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:19:56.110895 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:56.111474 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:56.111474 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:56.112487 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:19:56.117841 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:19:56.119365 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:56.119365 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:19:56.119365 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:56.121642 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:56.121642 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:19:56.123312 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:56.126321 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:56.126321 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:19:56.126321 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:56.130457 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:56.130965 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:19:56.130965 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:56.133178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:19:56.134196 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:56.134714 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:19:56.154871 [debug] [Thread-1 (]: SQL status: OK in 0.020 seconds
[0m16:19:56.157499 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:19:56.157499 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:19:56.163755 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:19:56.165420 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:19:56.165420 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FC5EDF40>]}
[0m16:19:56.166436 [info ] [Thread-1 (]: 19 of 26 OK created sql table model main.fato_movimentacao_cambio .............. [[32mOK[0m in 0.07s]
[0m16:19:56.166436 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:19:56.166436 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:19:56.167531 [info ] [Thread-1 (]: 20 of 26 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:19:56.167531 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:19:56.167531 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:19:56.172112 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:56.173234 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:19:56.178152 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:56.181265 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:56.182509 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:19:56.183544 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:56.184983 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:19:56.185996 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:56.185996 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:19:56.231005 [debug] [Thread-1 (]: SQL status: OK in 0.044 seconds
[0m16:19:56.232634 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:56.232634 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:19:56.234271 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:56.234271 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:56.234271 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:19:56.235868 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:56.238739 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:56.238739 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:19:56.238739 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:56.242983 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:56.242983 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:19:56.245695 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:56.247208 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:19:56.248491 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:56.249138 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:19:56.271280 [debug] [Thread-1 (]: SQL status: OK in 0.022 seconds
[0m16:19:56.276343 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:19:56.276343 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:19:56.280875 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:19:56.282974 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:19:56.283479 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FC5C7590>]}
[0m16:19:56.284001 [info ] [Thread-1 (]: 20 of 26 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.12s]
[0m16:19:56.284001 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:19:56.284001 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:19:56.285009 [info ] [Thread-1 (]: 21 of 26 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:19:56.285009 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:19:56.286009 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:19:56.290134 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:56.290678 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:19:56.294794 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:56.295842 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:56.297395 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:19:56.297395 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:19:56.298415 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:56.299406 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:56.299406 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:19:56.682553 [debug] [Thread-1 (]: SQL status: OK in 0.383 seconds
[0m16:19:56.684105 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:56.684105 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:19:56.686106 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:19:56.687181 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:56.687746 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:19:56.687746 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:56.690826 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:56.690826 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:19:56.691839 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:56.694012 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:56.694012 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:19:56.694594 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:19:56.695610 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:19:56.696223 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:56.696223 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:19:56.920581 [debug] [Thread-1 (]: SQL status: OK in 0.224 seconds
[0m16:19:56.922607 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:19:56.923177 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:19:56.931300 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:19:56.931300 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:19:56.933268 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '65281022-862a-4b3c-ab83-910fe3a8ee96', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203FA580C80>]}
[0m16:19:56.933798 [info ] [Thread-1 (]: 21 of 26 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.65s]
[0m16:19:56.934340 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:19:56.935413 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:19:56.935952 [info ] [Thread-1 (]: 22 of 26 SKIP relation main.fato_carteira_credito_atividade .................... [[33mSKIP[0m]
[0m16:19:56.935952 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:19:56.936484 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:19:56.936484 [info ] [Thread-1 (]: 23 of 26 SKIP relation main.fato_carteira_credito_porte ........................ [[33mSKIP[0m]
[0m16:19:56.937542 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:19:56.937542 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:19:56.937542 [info ] [Thread-1 (]: 24 of 26 SKIP relation main.fato_carteira_credito_produto ...................... [[33mSKIP[0m]
[0m16:19:56.938549 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:19:56.938549 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:19:56.938549 [info ] [Thread-1 (]: 25 of 26 SKIP relation main.fato_regiao_credito ................................ [[33mSKIP[0m]
[0m16:19:56.938549 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:19:56.940065 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:19:56.940597 [info ] [Thread-1 (]: 26 of 26 SKIP relation main.fato_risco_credito ................................. [[33mSKIP[0m]
[0m16:19:56.941201 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:19:56.942778 [debug] [MainThread]: Using duckdb connection "master"
[0m16:19:56.942778 [debug] [MainThread]: On master: BEGIN
[0m16:19:56.942778 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:19:56.944325 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:19:56.944325 [debug] [MainThread]: On master: COMMIT
[0m16:19:56.944904 [debug] [MainThread]: Using duckdb connection "master"
[0m16:19:56.944904 [debug] [MainThread]: On master: COMMIT
[0m16:19:56.944904 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:19:56.944904 [debug] [MainThread]: On master: Close
[0m16:19:56.945919 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:19:56.945919 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:19:56.945919 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:19:56.945919 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_resumo_financeiro' was properly closed.
[0m16:19:56.946953 [info ] [MainThread]: 
[0m16:19:56.946953 [info ] [MainThread]: Finished running 26 table models in 0 hours 0 minutes and 5.04 seconds (5.04s).
[0m16:19:56.949468 [debug] [MainThread]: Command end result
[0m16:19:56.988465 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:19:56.994091 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:19:56.999629 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:19:57.000644 [info ] [MainThread]: 
[0m16:19:57.000644 [info ] [MainThread]: [31mCompleted with 14 errors, 0 partial successes, and 0 warnings:[0m
[0m16:19:57.001209 [info ] [MainThread]: 
[0m16:19:57.001209 [error] [MainThread]: [31mFailure in model dim_atividade (models\gold\dim_atividade.sql)[0m
[0m16:19:57.001800 [error] [MainThread]:   Runtime Error in model dim_atividade (models\gold\dim_atividade.sql)
  Catalog Error: Table with name seed_dim_atividade does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_atividade"
                ^
[0m16:19:57.001800 [info ] [MainThread]: 
[0m16:19:57.002464 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_atividade.sql
[0m16:19:57.002464 [info ] [MainThread]: 
[0m16:19:57.002464 [error] [MainThread]: [31mFailure in model dim_classe_instituicao (models\gold\dim_classe_instituicao.sql)[0m
[0m16:19:57.003492 [error] [MainThread]:   Runtime Error in model dim_classe_instituicao (models\gold\dim_classe_instituicao.sql)
  Catalog Error: Table with name seed_dim_classe_instituicao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
                ^
[0m16:19:57.004002 [info ] [MainThread]: 
[0m16:19:57.004568 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_classe_instituicao.sql
[0m16:19:57.005184 [info ] [MainThread]: 
[0m16:19:57.005184 [error] [MainThread]: [31mFailure in model dim_consolidado (models\gold\dim_consolidado.sql)[0m
[0m16:19:57.005184 [error] [MainThread]:   Runtime Error in model dim_consolidado (models\gold\dim_consolidado.sql)
  Catalog Error: Table with name seed_dim_consolidado does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_consolidado"
                ^
[0m16:19:57.006199 [info ] [MainThread]: 
[0m16:19:57.006199 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_consolidado.sql
[0m16:19:57.006704 [info ] [MainThread]: 
[0m16:19:57.007226 [error] [MainThread]: [31mFailure in model dim_controle (models\gold\dim_controle.sql)[0m
[0m16:19:57.007226 [error] [MainThread]:   Runtime Error in model dim_controle (models\gold\dim_controle.sql)
  Catalog Error: Table with name seed_dim_controle does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_controle"
                ^
[0m16:19:57.007776 [info ] [MainThread]: 
[0m16:19:57.007776 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_controle.sql
[0m16:19:57.007776 [info ] [MainThread]: 
[0m16:19:57.008791 [error] [MainThread]: [31mFailure in model dim_faixa_vencimento (models\gold\dim_faixa_vencimento.sql)[0m
[0m16:19:57.217516 [error] [MainThread]:   Runtime Error in model dim_faixa_vencimento (models\gold\dim_faixa_vencimento.sql)
  Catalog Error: Table with name seed_dim_faixa_vencimento does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
                ^
[0m16:19:57.219065 [info ] [MainThread]: 
[0m16:19:57.219765 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_faixa_vencimento.sql
[0m16:19:57.220425 [info ] [MainThread]: 
[0m16:19:57.220970 [error] [MainThread]: [31mFailure in model dim_porte (models\gold\dim_porte.sql)[0m
[0m16:19:57.221491 [error] [MainThread]:   Runtime Error in model dim_porte (models\gold\dim_porte.sql)
  Catalog Error: Table with name seed_dim_porte does not exist!
  Did you mean "dim_tempo"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_porte"
                ^
[0m16:19:57.221491 [info ] [MainThread]: 
[0m16:19:57.221491 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_porte.sql
[0m16:19:57.221491 [info ] [MainThread]: 
[0m16:19:57.221491 [error] [MainThread]: [31mFailure in model dim_produto_credito (models\gold\dim_produto_credito.sql)[0m
[0m16:19:57.222500 [error] [MainThread]:   Runtime Error in model dim_produto_credito (models\gold\dim_produto_credito.sql)
  Catalog Error: Table with name seed_dim_produto_credito does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 18: FROM "gold_warehouse"."main"."seed_dim_produto_credito"
                ^
[0m16:19:57.223005 [info ] [MainThread]: 
[0m16:19:57.223005 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_produto_credito.sql
[0m16:19:57.223005 [info ] [MainThread]: 
[0m16:19:57.223005 [error] [MainThread]: [31mFailure in model dim_regiao (models\gold\dim_regiao.sql)[0m
[0m16:19:57.224012 [error] [MainThread]:   Runtime Error in model dim_regiao (models\gold\dim_regiao.sql)
  Catalog Error: Table with name seed_dim_regiao does not exist!
  Did you mean "dim_instituicao"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_regiao"
                ^
[0m16:19:57.224012 [info ] [MainThread]: 
[0m16:19:57.224012 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_regiao.sql
[0m16:19:57.224012 [info ] [MainThread]: 
[0m16:19:57.224012 [error] [MainThread]: [31mFailure in model dim_risco (models\gold\dim_risco.sql)[0m
[0m16:19:57.225024 [error] [MainThread]:   Runtime Error in model dim_risco (models\gold\dim_risco.sql)
  Catalog Error: Table with name seed_dim_risco does not exist!
  Did you mean "fato_resumo_financeiro"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_risco"
                ^
[0m16:19:57.225024 [info ] [MainThread]: 
[0m16:19:57.225024 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_risco.sql
[0m16:19:57.225024 [info ] [MainThread]: 
[0m16:19:57.226015 [error] [MainThread]: [31mFailure in model dim_segmento (models\gold\dim_segmento.sql)[0m
[0m16:19:57.226015 [error] [MainThread]:   Runtime Error in model dim_segmento (models\gold\dim_segmento.sql)
  Catalog Error: Table with name seed_dim_segmento does not exist!
  Did you mean "fato_operacoes_clientes"?
  
  LINE 17: FROM "gold_warehouse"."main"."seed_dim_segmento"
                ^
[0m16:19:57.226426 [info ] [MainThread]: 
[0m16:19:57.226426 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\dim_segmento.sql
[0m16:19:57.226934 [info ] [MainThread]: 
[0m16:19:57.226934 [error] [MainThread]: [31mFailure in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)[0m
[0m16:19:57.226934 [error] [MainThread]:   Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:19:57.227945 [info ] [MainThread]: 
[0m16:19:57.227945 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_capital_prudencial.sql
[0m16:19:57.227945 [info ] [MainThread]: 
[0m16:19:57.227945 [error] [MainThread]: [31mFailure in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)[0m
[0m16:19:57.227945 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^
[0m16:19:57.227945 [info ] [MainThread]: 
[0m16:19:57.227945 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_indexador.sql
[0m16:19:57.227945 [info ] [MainThread]: 
[0m16:19:57.229599 [error] [MainThread]: [31mFailure in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)[0m
[0m16:19:57.229599 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m16:19:57.229599 [info ] [MainThread]: 
[0m16:19:57.229599 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_totais.sql
[0m16:19:57.230642 [info ] [MainThread]: 
[0m16:19:57.230642 [error] [MainThread]: [31mFailure in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)[0m
[0m16:19:57.231154 [error] [MainThread]:   Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m16:19:57.231154 [info ] [MainThread]: 
[0m16:19:57.231154 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_demonstracao_resultado.sql
[0m16:19:57.231154 [info ] [MainThread]: 
[0m16:19:57.231154 [info ] [MainThread]: Done. PASS=7 WARN=0 ERROR=14 SKIP=5 NO-OP=0 TOTAL=26
[0m16:19:57.231154 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:19:57.232710 [debug] [MainThread]: Command `dbt run` failed at 16:19:57.232710 after 9.13 seconds
[0m16:19:57.232710 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F7729F40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F86C5880>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203F83F47A0>]}
[0m16:19:58.040479 [debug] [MainThread]: An error was encountered while trying to send an event
[0m16:19:58.043008 [debug] [MainThread]: Flushing usage events
[0m16:20:21.260738 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5C7B20E60>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5C4B1AB70>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5C7B213D0>]}


============================== 16:20:21.266541 | 79862279-9c12-4043-a578-27fbffb06778 ==============================
[0m16:20:21.266541 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:20:21.267623 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'False', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt seed --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:20:21.506178 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5C550F3B0>]}
[0m16:20:21.571153 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5C7B87DA0>]}
[0m16:20:21.574375 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:20:21.883682 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:20:21.885409 [debug] [MainThread]: Partial parsing not enabled
[0m16:20:23.959875 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:20:23.961446 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CA1B1AC0>]}
[0m16:20:24.447094 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:20:24.456847 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CA4CA2D0>]}
[0m16:20:24.560174 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:20:24.563132 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:20:24.605087 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CA16B320>]}
[0m16:20:24.606103 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:20:24.606103 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CA3F7EF0>]}
[0m16:20:24.608806 [info ] [MainThread]: 
[0m16:20:24.609788 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:20:24.610487 [info ] [MainThread]: 
[0m16:20:24.610487 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:20:24.617275 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:20:24.729118 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:20:24.729118 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:20:24.730629 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:20:24.861697 [debug] [ThreadPool]: SQL status: OK in 0.131 seconds
[0m16:20:24.862923 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:20:24.863931 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:20:24.863931 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:20:24.869232 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:20:24.870310 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:20:24.870310 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:20:24.871343 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:20:24.872351 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:20:24.872894 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:20:24.873453 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:20:24.873994 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:20:24.873994 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:20:24.874532 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:20:24.875071 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:20:24.875608 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:20:24.876266 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:20:24.876810 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:20:24.876810 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:20:24.880472 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:20:24.885890 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:20:24.885890 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:20:24.885890 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:20:24.886897 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:20:24.886897 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:20:24.886897 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:20:24.903794 [debug] [ThreadPool]: SQL status: OK in 0.016 seconds
[0m16:20:24.904945 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:20:24.905952 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:20:24.907063 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:20:24.908321 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CA555C40>]}
[0m16:20:24.908866 [debug] [MainThread]: Using duckdb connection "master"
[0m16:20:24.909400 [debug] [MainThread]: On master: BEGIN
[0m16:20:24.909939 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:20:24.911005 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:20:24.911560 [debug] [MainThread]: On master: COMMIT
[0m16:20:24.912142 [debug] [MainThread]: Using duckdb connection "master"
[0m16:20:24.912690 [debug] [MainThread]: On master: COMMIT
[0m16:20:24.913264 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:20:24.913797 [debug] [MainThread]: On master: Close
[0m16:20:24.917661 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:20:24.917661 [info ] [Thread-1 (]: 1 of 10 START seed file main.seed_dim_atividade ................................ [RUN]
[0m16:20:24.919248 [debug] [Thread-1 (]: Acquiring new duckdb connection 'seed.bacen_ifdata_analytics.seed_dim_atividade'
[0m16:20:24.919248 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:20:24.920361 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:20:24.944166 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:20:24.944727 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:20:24.944727 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:20:24.945737 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:24.945737 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:20:24.946735 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m16:20:24.948252 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:24.959927 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:20:24.960484 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:20:24.974982 [debug] [Thread-1 (]: SQL status: OK in 0.015 seconds
[0m16:20:24.979567 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:20:24.992918 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:20:24.992918 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:20:24.992918 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:20:24.998031 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:20:24.999558 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:20:25.002163 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CA68BE60>]}
[0m16:20:25.002163 [info ] [Thread-1 (]: 1 of 10 OK loaded seed file main.seed_dim_atividade ............................ [[32mINSERT 10[0m in 0.08s]
[0m16:20:25.003769 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:20:25.003769 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:20:25.004331 [info ] [Thread-1 (]: 2 of 10 START seed file main.seed_dim_classe_instituicao ....................... [RUN]
[0m16:20:25.004914 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m16:20:25.004914 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:20:25.005948 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:20:25.010651 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:20:25.010651 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m16:20:25.010651 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:25.012166 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:25.012704 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:20:25.013248 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m16:20:25.014339 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:25.016626 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:20:25.017166 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:20:25.019313 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:25.020370 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:20:25.022944 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:20:25.022944 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:20:25.022944 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:20:25.027955 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:20:25.029476 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m16:20:25.030263 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CA85D820>]}
[0m16:20:25.030803 [info ] [Thread-1 (]: 2 of 10 OK loaded seed file main.seed_dim_classe_instituicao ................... [[32mINSERT 26[0m in 0.03s]
[0m16:20:25.031337 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:20:25.031337 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:20:25.032344 [info ] [Thread-1 (]: 3 of 10 START seed file main.seed_dim_consolidado .............................. [RUN]
[0m16:20:25.032344 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m16:20:25.032344 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:20:25.032344 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:20:25.035974 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:20:25.035974 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m16:20:25.037115 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:25.037115 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:25.037115 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:20:25.038149 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m16:20:25.038149 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:25.039172 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:20:25.039172 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:20:25.040642 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:25.040642 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:20:25.042758 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:20:25.042758 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:20:25.042758 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:20:25.051542 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:20:25.052111 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m16:20:25.052111 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CA85D790>]}
[0m16:20:25.053639 [info ] [Thread-1 (]: 3 of 10 OK loaded seed file main.seed_dim_consolidado .......................... [[32mINSERT 8[0m in 0.02s]
[0m16:20:25.054202 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:20:25.054202 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:20:25.054202 [info ] [Thread-1 (]: 4 of 10 START seed file main.seed_dim_controle ................................. [RUN]
[0m16:20:25.055720 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m16:20:25.056230 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:20:25.056230 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:20:25.061870 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:20:25.062412 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m16:20:25.062946 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:25.064016 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:25.064555 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:20:25.064555 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m16:20:25.065628 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:25.066678 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:20:25.066678 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:20:25.067740 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:25.069270 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:20:25.070584 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:20:25.071592 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:20:25.072105 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:20:25.075770 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:20:25.077779 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m16:20:25.077779 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CA865370>]}
[0m16:20:25.079581 [info ] [Thread-1 (]: 4 of 10 OK loaded seed file main.seed_dim_controle ............................. [[32mINSERT 3[0m in 0.02s]
[0m16:20:25.079581 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:20:25.080589 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:20:25.081097 [info ] [Thread-1 (]: 5 of 10 START seed file main.seed_dim_faixa_vencimento ......................... [RUN]
[0m16:20:25.081097 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:20:25.081097 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:20:25.081097 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:20:25.086859 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:20:25.087375 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:20:25.087375 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:25.088377 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:25.088377 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:20:25.088377 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m16:20:25.089886 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:25.091922 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:20:25.091922 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:20:25.092933 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:25.094600 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:20:25.096612 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:20:25.097121 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:20:25.097121 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:20:25.102285 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:20:25.103300 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:20:25.103806 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CA7D4740>]}
[0m16:20:25.104365 [info ] [Thread-1 (]: 5 of 10 OK loaded seed file main.seed_dim_faixa_vencimento ..................... [[32mINSERT 7[0m in 0.02s]
[0m16:20:25.104969 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:20:25.104969 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:20:25.106489 [info ] [Thread-1 (]: 6 of 10 START seed file main.seed_dim_porte .................................... [RUN]
[0m16:20:25.107011 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:20:25.107011 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:20:25.107584 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:20:25.110613 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:20:25.110613 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:20:25.111622 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:25.111622 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:25.113043 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:20:25.113043 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m16:20:25.113043 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:25.114051 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:20:25.115049 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:20:25.116628 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:25.117225 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:20:25.119234 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:20:25.119234 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:20:25.120405 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:20:25.126041 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:20:25.127042 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:20:25.128072 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CC877770>]}
[0m16:20:25.128072 [info ] [Thread-1 (]: 6 of 10 OK loaded seed file main.seed_dim_porte ................................ [[32mINSERT 6[0m in 0.02s]
[0m16:20:25.128072 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:20:25.128072 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:20:25.129681 [info ] [Thread-1 (]: 7 of 10 START seed file main.seed_dim_produto_credito .......................... [RUN]
[0m16:20:25.129681 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:20:25.130693 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:20:25.130693 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:20:25.134489 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:20:25.136092 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:20:25.137103 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:25.137611 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:25.137611 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:20:25.138620 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m16:20:25.138620 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:25.140653 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:20:25.140653 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:20:25.142765 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:25.142765 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:20:25.145348 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:20:25.145348 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:20:25.146855 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:20:25.152028 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:20:25.154198 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:20:25.154737 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CA77D970>]}
[0m16:20:25.155262 [info ] [Thread-1 (]: 7 of 10 OK loaded seed file main.seed_dim_produto_credito ...................... [[32mINSERT 14[0m in 0.03s]
[0m16:20:25.156362 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:20:25.156362 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:20:25.157895 [info ] [Thread-1 (]: 8 of 10 START seed file main.seed_dim_regiao ................................... [RUN]
[0m16:20:25.158905 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:20:25.158905 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:20:25.159907 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:20:25.165124 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:20:25.165666 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:20:25.165666 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:25.166193 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:25.167261 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:20:25.167799 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m16:20:25.168871 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:25.170508 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:20:25.170508 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:20:25.173799 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:25.174803 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:20:25.177803 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:20:25.178331 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:20:25.178331 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:20:25.180876 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:25.181886 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:20:25.182896 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CA86D280>]}
[0m16:20:25.182896 [info ] [Thread-1 (]: 8 of 10 OK loaded seed file main.seed_dim_regiao ............................... [[32mINSERT 7[0m in 0.02s]
[0m16:20:25.183958 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:20:25.183958 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:20:25.185129 [info ] [Thread-1 (]: 9 of 10 START seed file main.seed_dim_risco .................................... [RUN]
[0m16:20:25.185637 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:20:25.186152 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:20:25.186152 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:20:25.189728 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:20:25.190739 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:20:25.190739 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:25.190739 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:25.192367 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:20:25.192367 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m16:20:25.192944 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:25.192944 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:20:25.192944 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:20:25.195513 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:25.197021 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:20:25.198030 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:20:25.198030 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:20:25.199539 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:20:25.201624 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:25.202706 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:20:25.203714 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CC878500>]}
[0m16:20:25.204243 [info ] [Thread-1 (]: 9 of 10 OK loaded seed file main.seed_dim_risco ................................ [[32mINSERT 10[0m in 0.02s]
[0m16:20:25.204820 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:20:25.204820 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:20:25.205829 [info ] [Thread-1 (]: 10 of 10 START seed file main.seed_dim_segmento ................................ [RUN]
[0m16:20:25.205829 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m16:20:25.205829 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:20:25.205829 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:20:25.211450 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:20:25.211450 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m16:20:25.212583 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:25.212583 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:25.213593 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:20:25.213593 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m16:20:25.213593 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:25.215633 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:20:25.216310 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:20:25.219777 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:20:25.220320 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:20:25.223001 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:20:25.223552 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:20:25.223552 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:20:25.226568 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:25.226568 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m16:20:25.226568 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '79862279-9c12-4043-a578-27fbffb06778', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5CC888980>]}
[0m16:20:25.228077 [info ] [Thread-1 (]: 10 of 10 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.02s]
[0m16:20:25.228077 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:20:25.230671 [debug] [MainThread]: Using duckdb connection "master"
[0m16:20:25.231182 [debug] [MainThread]: On master: BEGIN
[0m16:20:25.231182 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:20:25.231182 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:20:25.232900 [debug] [MainThread]: On master: COMMIT
[0m16:20:25.233663 [debug] [MainThread]: Using duckdb connection "master"
[0m16:20:25.233663 [debug] [MainThread]: On master: COMMIT
[0m16:20:25.234192 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:20:25.234192 [debug] [MainThread]: On master: Close
[0m16:20:25.234192 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:20:25.234192 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:20:25.234192 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:20:25.234192 [debug] [MainThread]: Connection 'seed.bacen_ifdata_analytics.seed_dim_segmento' was properly closed.
[0m16:20:25.235766 [info ] [MainThread]: 
[0m16:20:25.235766 [info ] [MainThread]: Finished running 10 seeds in 0 hours 0 minutes and 0.63 seconds (0.63s).
[0m16:20:25.237982 [debug] [MainThread]: Command end result
[0m16:20:25.276838 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:20:25.281383 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:20:25.288284 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:20:25.288284 [info ] [MainThread]: 
[0m16:20:25.288284 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:20:25.289799 [info ] [MainThread]: 
[0m16:20:25.289799 [info ] [MainThread]: Done. PASS=10 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=10
[0m16:20:25.290814 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:20:25.292864 [debug] [MainThread]: Command `dbt seed` succeeded at 16:20:25.292864 after 4.21 seconds
[0m16:20:25.292864 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5C7B87830>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5C81BAFF0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001E5C81BB5C0>]}
[0m16:20:25.292864 [debug] [MainThread]: Flushing usage events
[0m16:20:26.330944 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:20:30.198870 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE5CFF920>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE5EBBA10>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE5E8BF50>]}


============================== 16:20:30.204176 | 23e57724-7314-4d22-8271-3b0636d66b09 ==============================
[0m16:20:30.204176 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:20:30.204747 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'False', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt run --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:20:30.460593 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE72904D0>]}
[0m16:20:30.530649 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE58F3500>]}
[0m16:20:30.532771 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:20:30.863736 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:20:30.865354 [debug] [MainThread]: Partial parsing not enabled
[0m16:20:33.571319 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:20:33.572743 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE7BE08F0>]}
[0m16:20:34.149670 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:20:34.162384 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE7D90170>]}
[0m16:20:34.297780 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:20:34.303727 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:20:34.366121 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE7AF4650>]}
[0m16:20:34.366638 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:20:34.366638 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE79CFDA0>]}
[0m16:20:34.371444 [info ] [MainThread]: 
[0m16:20:34.371444 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:20:34.372453 [info ] [MainThread]: 
[0m16:20:34.373022 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:20:34.380730 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:20:34.642639 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:20:34.643146 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:20:34.644663 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:20:34.817434 [debug] [ThreadPool]: SQL status: OK in 0.174 seconds
[0m16:20:34.819637 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:20:34.820725 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:20:34.821245 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:20:34.830433 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:20:34.831110 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:20:34.831110 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:20:34.832286 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:20:34.833299 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:20:34.834321 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:20:34.834321 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:20:34.834321 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:20:34.834321 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:20:34.834321 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:20:34.836818 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:20:34.836818 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:20:34.836818 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:20:34.837839 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:20:34.837839 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:20:34.842003 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:20:34.847428 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:20:34.848435 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:20:34.848435 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:20:34.850468 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:20:34.851028 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:20:34.851028 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:20:34.870847 [debug] [ThreadPool]: SQL status: OK in 0.019 seconds
[0m16:20:34.873004 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:20:34.874270 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:20:34.874829 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:20:34.877470 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE7FC09B0>]}
[0m16:20:34.878472 [debug] [MainThread]: Using duckdb connection "master"
[0m16:20:34.879553 [debug] [MainThread]: On master: BEGIN
[0m16:20:34.879553 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:20:34.880870 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:20:34.880870 [debug] [MainThread]: On master: COMMIT
[0m16:20:34.880870 [debug] [MainThread]: Using duckdb connection "master"
[0m16:20:34.880870 [debug] [MainThread]: On master: COMMIT
[0m16:20:34.882500 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:20:34.882500 [debug] [MainThread]: On master: Close
[0m16:20:34.887988 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:20:34.887988 [info ] [Thread-1 (]: 1 of 26 START sql table model main.dim_atividade ............................... [RUN]
[0m16:20:34.888995 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_atividade'
[0m16:20:34.889991 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:20:34.901078 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:20:34.902234 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:20:34.936893 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:20:34.937913 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:20:34.938918 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:20:34.940417 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:20:34.941945 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:34.941945 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:20:34.941945 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:20:34.942964 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:34.951735 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:20:34.952269 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:20:34.953353 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:34.967305 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:20:34.968443 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:20:34.969478 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:20:34.975981 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:20:34.982683 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:20:34.982683 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:20:34.984317 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:34.985873 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:20:34.990434 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE5300350>]}
[0m16:20:34.990434 [info ] [Thread-1 (]: 1 of 26 OK created sql table model main.dim_atividade .......................... [[32mOK[0m in 0.10s]
[0m16:20:34.991963 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:20:34.991963 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:20:34.993100 [info ] [Thread-1 (]: 2 of 26 START sql table model main.dim_classe_instituicao ...................... [RUN]
[0m16:20:34.993636 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:20:34.993636 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:20:34.996939 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:20:34.998001 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:20:35.001176 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:20:35.002422 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:20:35.003432 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:20:35.003983 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.004546 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.004546 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:20:35.004546 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:20:35.016623 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:20:35.019196 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:20:35.019793 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:20:35.020877 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.021397 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:20:35.022577 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:20:35.023162 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:20:35.026725 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:20:35.030765 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:20:35.031289 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:20:35.031289 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.032921 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:20:35.033935 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE7F8E7B0>]}
[0m16:20:35.034445 [info ] [Thread-1 (]: 2 of 26 OK created sql table model main.dim_classe_instituicao ................. [[32mOK[0m in 0.04s]
[0m16:20:35.034445 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:20:35.035952 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:20:35.036961 [info ] [Thread-1 (]: 3 of 26 START sql table model main.dim_consolidado ............................. [RUN]
[0m16:20:35.036961 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:20:35.036961 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:20:35.040852 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:20:35.042390 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:20:35.045726 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:20:35.047228 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:20:35.047228 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:20:35.047228 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.048246 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.048246 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:20:35.048246 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:20:35.049750 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.053480 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:20:35.053990 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:20:35.054548 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.056363 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:20:35.057431 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:20:35.058001 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:20:35.060523 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:35.062593 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:20:35.062593 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:20:35.064663 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.066709 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:20:35.067298 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE90D2330>]}
[0m16:20:35.067298 [info ] [Thread-1 (]: 3 of 26 OK created sql table model main.dim_consolidado ........................ [[32mOK[0m in 0.03s]
[0m16:20:35.069617 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:20:35.070183 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:20:35.070715 [info ] [Thread-1 (]: 4 of 26 START sql table model main.dim_controle ................................ [RUN]
[0m16:20:35.071892 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:20:35.071892 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:20:35.074983 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:20:35.075982 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:20:35.079848 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:20:35.080858 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:20:35.081368 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:20:35.081368 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.082374 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.082374 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:20:35.082374 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:20:35.083961 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.088019 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:20:35.089018 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:20:35.090017 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.091129 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:20:35.091635 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:20:35.092156 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:20:35.095507 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:20:35.098257 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:20:35.098257 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:20:35.099951 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.101649 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:20:35.102181 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE90E09E0>]}
[0m16:20:35.102720 [info ] [Thread-1 (]: 4 of 26 OK created sql table model main.dim_controle ........................... [[32mOK[0m in 0.03s]
[0m16:20:35.103264 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:20:35.103797 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:20:35.104326 [info ] [Thread-1 (]: 5 of 26 START sql table model main.dim_faixa_vencimento ........................ [RUN]
[0m16:20:35.105937 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:20:35.105937 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:20:35.108539 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:20:35.110571 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:20:35.113866 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:20:35.115373 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:20:35.116384 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:20:35.117215 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.118259 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.118259 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:20:35.118259 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:20:35.120559 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.122762 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:20:35.123773 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:20:35.123773 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.124769 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:20:35.125771 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:20:35.126773 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:20:35.127775 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:35.131332 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:20:35.131332 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:20:35.131332 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.132848 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:20:35.133860 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE808CF20>]}
[0m16:20:35.135068 [info ] [Thread-1 (]: 5 of 26 OK created sql table model main.dim_faixa_vencimento ................... [[32mOK[0m in 0.03s]
[0m16:20:35.135068 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:20:35.136031 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:20:35.136031 [info ] [Thread-1 (]: 6 of 26 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:20:35.137156 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_instituicao)
[0m16:20:35.137156 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:20:35.142794 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:20:35.142794 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:20:35.148422 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:20:35.150088 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:20:35.150617 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:20:35.151158 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.151697 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.152238 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:20:35.152238 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:20:35.448429 [debug] [Thread-1 (]: SQL status: OK in 0.295 seconds
[0m16:20:35.453645 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:20:35.454269 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:20:35.454843 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.456374 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:20:35.456890 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:20:35.457472 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.462568 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:20:35.463591 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:20:35.464604 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.468300 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:20:35.469319 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:20:35.469319 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.475494 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:20:35.476494 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:20:35.477486 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:20:35.498587 [debug] [Thread-1 (]: SQL status: OK in 0.021 seconds
[0m16:20:35.501784 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:20:35.502442 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:20:35.505586 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:35.507748 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:20:35.508841 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE7D5B200>]}
[0m16:20:35.510063 [info ] [Thread-1 (]: 6 of 26 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.37s]
[0m16:20:35.511600 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:20:35.512116 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:20:35.512630 [info ] [Thread-1 (]: 7 of 26 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:20:35.513653 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:20:35.513653 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:20:35.518201 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:20:35.519711 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:20:35.522867 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:20:35.524942 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:20:35.524942 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:20:35.524942 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.525946 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.525946 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:20:35.526944 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m16:20:35.572267 [debug] [Thread-1 (]: SQL status: OK in 0.045 seconds
[0m16:20:35.572848 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:20:35.573869 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:20:35.573869 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.574868 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:20:35.575864 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:20:35.576870 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.579397 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:20:35.580945 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:20:35.582563 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.587645 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:20:35.588235 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:20:35.588769 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.590119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:20:35.590653 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:20:35.590653 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:20:35.595358 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:20:35.598507 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:20:35.599510 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:20:35.602687 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:20:35.604819 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:20:35.606443 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE805C230>]}
[0m16:20:35.607527 [info ] [Thread-1 (]: 7 of 26 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.09s]
[0m16:20:35.608069 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:20:35.608604 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:20:35.609667 [info ] [Thread-1 (]: 8 of 26 START sql table model main.dim_porte ................................... [RUN]
[0m16:20:35.610184 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_porte)
[0m16:20:35.610715 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:20:35.615001 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:20:35.616129 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:20:35.619305 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:20:35.621932 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:20:35.622449 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:20:35.622449 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.623039 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.623575 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:20:35.623575 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:20:35.625214 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.628451 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:20:35.628451 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:20:35.629983 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.631056 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:20:35.631056 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:20:35.631056 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:20:35.635846 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:20:35.638381 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:20:35.638381 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:20:35.639894 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.640913 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:20:35.642258 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE9122300>]}
[0m16:20:35.642850 [info ] [Thread-1 (]: 8 of 26 OK created sql table model main.dim_porte .............................. [[32mOK[0m in 0.03s]
[0m16:20:35.642850 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:20:35.642850 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:20:35.644413 [info ] [Thread-1 (]: 9 of 26 START sql table model main.dim_produto_credito ......................... [RUN]
[0m16:20:35.645274 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:20:35.645806 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:20:35.649337 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:20:35.650854 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:20:35.655294 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:20:35.657443 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:20:35.657443 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:20:35.657978 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.657978 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.658985 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:20:35.658985 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:20:35.660492 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.663935 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:20:35.664945 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:20:35.665454 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.666990 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:20:35.667495 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:20:35.667495 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:20:35.674918 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:20:35.678122 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:20:35.679703 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:20:35.681224 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.683964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:20:35.684501 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE7CB2F30>]}
[0m16:20:35.685048 [info ] [Thread-1 (]: 9 of 26 OK created sql table model main.dim_produto_credito .................... [[32mOK[0m in 0.04s]
[0m16:20:35.685597 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:20:35.686138 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:20:35.687163 [info ] [Thread-1 (]: 10 of 26 START sql table model main.dim_regiao ................................. [RUN]
[0m16:20:35.687163 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:20:35.687163 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:20:35.690552 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:20:35.692773 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:20:35.698543 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:20:35.699547 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:20:35.699547 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:20:35.700064 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.700579 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.700579 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:20:35.701144 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:20:35.702320 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.704996 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:20:35.706005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:20:35.706522 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.707641 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:20:35.708323 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:20:35.708323 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:20:35.712378 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:20:35.713975 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:20:35.714977 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:20:35.715495 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.717026 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:20:35.717533 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE90EEA20>]}
[0m16:20:35.717533 [info ] [Thread-1 (]: 10 of 26 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.03s]
[0m16:20:35.719108 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:20:35.719691 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:20:35.719691 [info ] [Thread-1 (]: 11 of 26 START sql table model main.dim_risco .................................. [RUN]
[0m16:20:35.720786 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:20:35.721315 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:20:35.726672 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:20:35.728186 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:20:35.732902 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:20:35.734425 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:20:35.734425 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:20:35.734425 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.735952 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.735952 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:20:35.736975 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:20:35.739113 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:35.740638 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:20:35.742179 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:20:35.742776 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.744435 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:20:35.745455 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:20:35.745455 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:20:35.749556 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:20:35.752434 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:20:35.753444 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:20:35.754571 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.755675 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:20:35.756216 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE90EB830>]}
[0m16:20:35.757230 [info ] [Thread-1 (]: 11 of 26 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.04s]
[0m16:20:35.757230 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:20:35.757230 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:20:35.759133 [info ] [Thread-1 (]: 12 of 26 START sql table model main.dim_segmento ............................... [RUN]
[0m16:20:35.760145 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:20:35.760678 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:20:35.763729 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:20:35.766294 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:20:35.771357 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:20:35.772891 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:20:35.772891 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:20:35.773907 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.774908 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.774908 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:20:35.775907 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:20:35.776906 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.781038 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:20:35.781038 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:20:35.782628 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.784244 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:20:35.784885 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:20:35.784885 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:20:35.790446 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:20:35.791993 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:20:35.793012 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:20:35.794616 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.797137 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:20:35.798162 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE914D4F0>]}
[0m16:20:35.798162 [info ] [Thread-1 (]: 12 of 26 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.04s]
[0m16:20:35.799156 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:20:35.799156 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:20:35.800757 [info ] [Thread-1 (]: 13 of 26 START sql table model main.dim_tempo .................................. [RUN]
[0m16:20:35.801898 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:20:35.802451 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:20:35.804700 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:20:35.807805 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:20:35.811850 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:20:35.813715 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:20:35.814223 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:20:35.814771 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.815874 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.815874 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:20:35.816411 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:20:35.831123 [debug] [Thread-1 (]: SQL status: OK in 0.014 seconds
[0m16:20:35.832704 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:20:35.833365 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:20:35.834393 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.835959 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:20:35.835959 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:20:35.836968 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.839989 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:20:35.840508 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:20:35.840508 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.844618 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:20:35.845633 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:20:35.845633 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:35.847153 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:20:35.847153 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:20:35.847153 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:20:35.854916 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:20:35.858774 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:20:35.859281 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:20:35.861455 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:35.863109 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:20:35.864282 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE7AE2150>]}
[0m16:20:35.864814 [info ] [Thread-1 (]: 13 of 26 OK created sql table model main.dim_tempo ............................. [[32mOK[0m in 0.06s]
[0m16:20:35.865331 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:20:35.865850 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:20:35.866382 [info ] [Thread-1 (]: 14 of 26 START sql table model main.fato_balanco_patrimonial ................... [RUN]
[0m16:20:35.867908 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:20:35.867908 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:20:35.873775 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:20:35.874790 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:20:35.879782 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:20:35.881970 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:20:35.882507 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:20:35.883048 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:35.884567 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:35.885676 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:20:35.885676 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:20:36.498064 [debug] [Thread-1 (]: SQL status: OK in 0.611 seconds
[0m16:20:36.499577 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:20:36.500590 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:20:36.502311 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:36.504330 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:20:36.505640 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:20:36.507020 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:36.514689 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:20:36.517210 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:20:36.519216 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:36.525847 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:20:36.526846 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:20:36.526846 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:36.528355 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:20:36.530680 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:20:36.530680 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:20:36.830173 [debug] [Thread-1 (]: SQL status: OK in 0.298 seconds
[0m16:20:36.834431 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:20:36.834940 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:20:36.839671 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:20:36.842204 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:20:36.842814 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE9176660>]}
[0m16:20:36.844353 [info ] [Thread-1 (]: 14 of 26 OK created sql table model main.fato_balanco_patrimonial .............. [[32mOK[0m in 0.98s]
[0m16:20:36.845364 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:20:36.846367 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:20:36.847355 [info ] [Thread-1 (]: 15 of 26 START sql table model main.fato_capital_prudencial .................... [RUN]
[0m16:20:36.850944 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:20:36.850944 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:20:36.857349 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:20:36.859355 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:20:36.865119 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:20:36.866642 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:20:36.867884 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:20:36.867884 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:36.869578 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:36.870591 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:20:36.871496 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:20:36.874501 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:20:36.875514 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:20:36.876525 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: ROLLBACK
[0m16:20:36.892874 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_capital_prudencial'
[0m16:20:36.892874 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:20:36.896467 [debug] [Thread-1 (]: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:20:36.896975 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE90C3C50>]}
[0m16:20:36.897534 [error] [Thread-1 (]: 15 of 26 ERROR creating sql table model main.fato_capital_prudencial ........... [[31mERROR[0m in 0.05s]
[0m16:20:36.898546 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:20:36.899543 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:20:36.899543 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_capital_prudencial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^.
[0m16:20:36.900890 [info ] [Thread-1 (]: 16 of 26 START sql table model main.fato_carteira_credito_indexador ............ [RUN]
[0m16:20:36.902006 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:20:36.902006 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:20:36.907250 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:20:36.908257 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:20:36.912808 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:20:36.913913 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:20:36.914921 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:20:36.914921 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:36.915490 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:36.915490 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:20:36.916496 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:20:36.917710 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:20:36.917710 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:20:36.917710 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: ROLLBACK
[0m16:20:36.921340 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador'
[0m16:20:36.921340 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:20:36.923885 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^
[0m16:20:36.923885 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE90F29C0>]}
[0m16:20:36.924886 [error] [Thread-1 (]: 16 of 26 ERROR creating sql table model main.fato_carteira_credito_indexador ... [[31mERROR[0m in 0.02s]
[0m16:20:36.925885 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:20:36.926888 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:20:36.927885 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^.
[0m16:20:36.927885 [info ] [Thread-1 (]: 17 of 26 START sql table model main.fato_carteira_credito_totais ............... [RUN]
[0m16:20:36.927885 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:20:36.929741 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:20:36.933833 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:20:36.934341 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:20:36.937372 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:20:36.938382 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:20:36.938382 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:20:36.939890 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:36.939890 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:36.939890 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:20:36.941916 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:20:36.942927 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:20:36.944535 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:20:36.944535 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: ROLLBACK
[0m16:20:36.947603 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_totais'
[0m16:20:36.948656 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:20:36.950671 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m16:20:36.950671 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE90F8E90>]}
[0m16:20:36.951184 [error] [Thread-1 (]: 17 of 26 ERROR creating sql table model main.fato_carteira_credito_totais ...... [[31mERROR[0m in 0.02s]
[0m16:20:36.952424 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:20:36.952424 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:20:36.952424 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_totais' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^.
[0m16:20:36.953943 [info ] [Thread-1 (]: 18 of 26 START sql table model main.fato_demonstracao_resultado ................ [RUN]
[0m16:20:36.954502 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:20:36.955098 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:20:36.958685 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:20:36.960201 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:20:36.962777 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:20:36.964796 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:20:36.964796 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:20:36.965301 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:36.965301 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:36.965301 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:20:36.966624 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:20:36.968272 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:20:36.969286 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:20:36.969286 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: ROLLBACK
[0m16:20:36.973099 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_demonstracao_resultado'
[0m16:20:36.974119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:20:36.976119 [debug] [Thread-1 (]: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m16:20:36.976119 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE90E88C0>]}
[0m16:20:36.977117 [error] [Thread-1 (]: 18 of 26 ERROR creating sql table model main.fato_demonstracao_resultado ....... [[31mERROR[0m in 0.02s]
[0m16:20:36.977117 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:20:36.978118 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:20:36.978632 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_demonstracao_resultado' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT".
[0m16:20:36.986187 [info ] [Thread-1 (]: 19 of 26 START sql table model main.fato_movimentacao_cambio ................... [RUN]
[0m16:20:36.987179 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:20:36.988177 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:20:36.990833 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:20:36.991920 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:20:36.993282 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:20:36.995822 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:20:36.995822 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:20:36.997072 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:36.997617 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:36.997617 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:20:36.997617 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:20:37.004685 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:20:37.006290 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:20:37.006290 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:20:37.006921 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:37.007497 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:20:37.008505 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:20:37.010013 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:37.013103 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:20:37.014186 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:20:37.014186 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:37.018237 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:20:37.018237 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:20:37.019247 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:37.020715 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:20:37.020715 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:20:37.021299 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:20:37.028599 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:20:37.031128 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:20:37.031128 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:20:37.038950 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:20:37.039949 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:20:37.040459 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE8089130>]}
[0m16:20:37.041989 [info ] [Thread-1 (]: 19 of 26 OK created sql table model main.fato_movimentacao_cambio .............. [[32mOK[0m in 0.05s]
[0m16:20:37.043006 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:20:37.044919 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:20:37.046208 [info ] [Thread-1 (]: 20 of 26 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:20:37.047359 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:20:37.047359 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:20:37.053872 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:20:37.055216 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:20:37.060543 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:20:37.062575 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:20:37.062575 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:20:37.062575 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:37.064587 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:37.065096 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:20:37.065698 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:20:37.112405 [debug] [Thread-1 (]: SQL status: OK in 0.046 seconds
[0m16:20:37.115123 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:20:37.115123 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:20:37.117361 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:37.119602 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:20:37.120208 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:20:37.121255 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:37.126002 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:20:37.127517 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:20:37.128059 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:37.132912 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:20:37.132912 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:20:37.134433 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:37.136988 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:20:37.136988 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:20:37.138098 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:20:37.154389 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:20:37.157404 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:20:37.158413 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:20:37.160498 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:20:37.162960 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:20:37.163972 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AF5FA44A0>]}
[0m16:20:37.164984 [info ] [Thread-1 (]: 20 of 26 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.12s]
[0m16:20:37.166574 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:20:37.167083 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:20:37.167591 [info ] [Thread-1 (]: 21 of 26 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:20:37.169152 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:20:37.169152 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:20:37.176303 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:20:37.178302 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:20:37.181080 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:20:37.182657 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:20:37.184262 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:20:37.184262 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:37.185877 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:37.185877 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:20:37.186900 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:20:37.535981 [debug] [Thread-1 (]: SQL status: OK in 0.348 seconds
[0m16:20:37.537000 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:20:37.537000 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:20:37.538395 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:37.539910 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:20:37.539910 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:20:37.540453 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:37.544408 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:20:37.544408 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:20:37.545419 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:37.551089 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:20:37.551640 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:20:37.553238 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:37.554878 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:20:37.555435 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:20:37.555435 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:20:37.825653 [debug] [Thread-1 (]: SQL status: OK in 0.270 seconds
[0m16:20:37.829154 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:20:37.829663 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:20:37.835854 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:20:37.838229 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:20:37.839321 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE803F170>]}
[0m16:20:37.839840 [info ] [Thread-1 (]: 21 of 26 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.67s]
[0m16:20:37.840970 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:20:37.841503 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:20:37.842582 [info ] [Thread-1 (]: 22 of 26 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:20:37.843122 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:20:37.843669 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:20:37.848348 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:20:37.850902 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:20:37.853705 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:20:37.855683 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:20:37.856944 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:20:37.857487 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:37.858564 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:37.858564 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:20:37.859098 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:20:37.863776 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:20:37.863776 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:20:37.863776 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: ROLLBACK
[0m16:20:37.866378 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_atividade'
[0m16:20:37.866378 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:20:37.869021 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_atividade (models\gold\fato_carteira_credito_atividade.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause
[0m16:20:37.869567 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AF5F81520>]}
[0m16:20:41.102389 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:20:41.105082 [error] [Thread-1 (]: 22 of 26 ERROR creating sql table model main.fato_carteira_credito_atividade ... [[31mERROR[0m in 0.03s]
[0m16:20:41.106131 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:20:41.107142 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:20:41.108267 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_atividade' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_atividade (models\gold\fato_carteira_credito_atividade.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause.
[0m16:20:41.108267 [info ] [Thread-1 (]: 23 of 26 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:20:41.110277 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:20:41.110785 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:20:41.115452 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:20:41.117521 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:20:41.123263 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:20:41.126033 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:20:41.127032 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:20:41.128032 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:41.128032 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:41.129702 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:20:41.129702 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:20:41.131220 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:20:41.131220 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:20:41.132806 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: ROLLBACK
[0m16:20:41.136965 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_porte'
[0m16:20:41.137502 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:20:41.140874 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_porte (models\gold\fato_carteira_credito_porte.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause
[0m16:20:41.141884 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE7FD2B70>]}
[0m16:20:41.141884 [error] [Thread-1 (]: 23 of 26 ERROR creating sql table model main.fato_carteira_credito_porte ....... [[31mERROR[0m in 0.03s]
[0m16:20:41.143240 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:20:41.143240 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:20:41.144757 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_porte' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_porte (models\gold\fato_carteira_credito_porte.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause.
[0m16:20:41.144757 [info ] [Thread-1 (]: 24 of 26 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:20:41.145765 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:20:41.145765 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:20:41.150512 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:20:41.152169 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:20:41.154955 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:20:41.156011 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:20:41.156011 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:20:41.157020 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:41.157618 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:41.157618 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:20:41.157618 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:20:41.160147 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:20:41.160686 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:20:41.161240 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: ROLLBACK
[0m16:20:41.163390 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_produto'
[0m16:20:41.163390 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:20:41.166504 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_produto (models\gold\fato_carteira_credito_produto.sql)
  Binder Error: Column "total_carteira_pessoa_fisica" in EXCLUDE list not found in FROM clause
[0m16:20:41.166504 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE90DE750>]}
[0m16:20:41.167044 [error] [Thread-1 (]: 24 of 26 ERROR creating sql table model main.fato_carteira_credito_produto ..... [[31mERROR[0m in 0.02s]
[0m16:20:41.167570 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:20:41.167570 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:20:41.167570 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_produto' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_produto (models\gold\fato_carteira_credito_produto.sql)
  Binder Error: Column "total_carteira_pessoa_fisica" in EXCLUDE list not found in FROM clause.
[0m16:20:41.169139 [info ] [Thread-1 (]: 25 of 26 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:20:41.169794 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:20:41.170352 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:20:41.173925 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:20:41.174939 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:20:41.178439 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:20:41.179446 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:20:41.179446 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:20:41.179446 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:41.180974 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:41.180974 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:20:41.180974 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:20:41.453309 [debug] [Thread-1 (]: SQL status: OK in 0.271 seconds
[0m16:20:41.457665 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:20:41.457665 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:20:41.458670 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:41.458670 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:20:41.460178 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:20:41.460701 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:20:41.480727 [debug] [Thread-1 (]: SQL status: OK in 0.019 seconds
[0m16:20:41.482791 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:20:41.483889 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:20:41.483889 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:41.485934 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:20:41.485934 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AF5F7E360>]}
[0m16:20:41.485934 [info ] [Thread-1 (]: 25 of 26 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.32s]
[0m16:20:41.487372 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:20:41.487372 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:20:41.488399 [info ] [Thread-1 (]: 26 of 26 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:20:41.488399 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:20:41.489912 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:20:41.492967 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:20:41.494532 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:20:41.498416 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:20:41.499442 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:20:41.499442 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:20:41.500495 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:20:41.501017 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:20:41.501017 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:20:41.501609 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:20:41.864971 [debug] [Thread-1 (]: SQL status: OK in 0.363 seconds
[0m16:20:41.867536 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:20:41.867536 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:20:41.867536 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:41.869715 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:20:41.869715 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:20:41.870246 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:20:41.942916 [debug] [Thread-1 (]: SQL status: OK in 0.072 seconds
[0m16:20:41.945637 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:20:41.945637 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:20:41.947141 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:20:41.948213 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:20:41.949258 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '23e57724-7314-4d22-8271-3b0636d66b09', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE7FD1E50>]}
[0m16:20:41.949803 [info ] [Thread-1 (]: 26 of 26 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.46s]
[0m16:20:41.949803 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:20:41.951819 [debug] [MainThread]: Using duckdb connection "master"
[0m16:20:41.952326 [debug] [MainThread]: On master: BEGIN
[0m16:20:41.952326 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:20:41.952326 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:20:41.953333 [debug] [MainThread]: On master: COMMIT
[0m16:20:41.953333 [debug] [MainThread]: Using duckdb connection "master"
[0m16:20:41.953841 [debug] [MainThread]: On master: COMMIT
[0m16:20:41.954406 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:20:41.954406 [debug] [MainThread]: On master: Close
[0m16:20:41.954990 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:20:41.954990 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:20:41.954990 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:20:41.954990 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_risco_credito' was properly closed.
[0m16:20:41.955999 [info ] [MainThread]: 
[0m16:20:41.955999 [info ] [MainThread]: Finished running 26 table models in 0 hours 0 minutes and 7.58 seconds (7.58s).
[0m16:20:41.961176 [debug] [MainThread]: Command end result
[0m16:20:42.078506 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:20:42.082621 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:20:42.088998 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:20:42.089997 [info ] [MainThread]: 
[0m16:20:42.090503 [info ] [MainThread]: [31mCompleted with 7 errors, 0 partial successes, and 0 warnings:[0m
[0m16:20:42.090503 [info ] [MainThread]: 
[0m16:20:42.092027 [error] [MainThread]: [31mFailure in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)[0m
[0m16:20:42.093038 [error] [MainThread]:   Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:20:42.094156 [info ] [MainThread]: 
[0m16:20:42.095643 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_capital_prudencial.sql
[0m16:20:42.096186 [info ] [MainThread]: 
[0m16:20:42.097239 [error] [MainThread]: [31mFailure in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)[0m
[0m16:20:42.097771 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^
[0m16:20:42.098305 [info ] [MainThread]: 
[0m16:20:42.098845 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_indexador.sql
[0m16:20:42.100459 [info ] [MainThread]: 
[0m16:20:42.101729 [error] [MainThread]: [31mFailure in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)[0m
[0m16:20:42.102892 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m16:20:42.103442 [info ] [MainThread]: 
[0m16:20:42.103978 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_totais.sql
[0m16:20:42.105094 [info ] [MainThread]: 
[0m16:20:42.106155 [error] [MainThread]: [31mFailure in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)[0m
[0m16:20:42.107166 [error] [MainThread]:   Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m16:20:42.107672 [info ] [MainThread]: 
[0m16:20:42.107672 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_demonstracao_resultado.sql
[0m16:20:42.108682 [info ] [MainThread]: 
[0m16:20:42.108682 [error] [MainThread]: [31mFailure in model fato_carteira_credito_atividade (models\gold\fato_carteira_credito_atividade.sql)[0m
[0m16:20:42.108682 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_atividade (models\gold\fato_carteira_credito_atividade.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause
[0m16:20:42.110191 [info ] [MainThread]: 
[0m16:20:42.110712 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_atividade.sql
[0m16:20:42.110712 [info ] [MainThread]: 
[0m16:20:42.111722 [error] [MainThread]: [31mFailure in model fato_carteira_credito_porte (models\gold\fato_carteira_credito_porte.sql)[0m
[0m16:20:42.111722 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_porte (models\gold\fato_carteira_credito_porte.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause
[0m16:20:42.112762 [info ] [MainThread]: 
[0m16:20:42.112762 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_porte.sql
[0m16:20:42.113801 [info ] [MainThread]: 
[0m16:20:42.113801 [error] [MainThread]: [31mFailure in model fato_carteira_credito_produto (models\gold\fato_carteira_credito_produto.sql)[0m
[0m16:20:42.114802 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_produto (models\gold\fato_carteira_credito_produto.sql)
  Binder Error: Column "total_carteira_pessoa_fisica" in EXCLUDE list not found in FROM clause
[0m16:20:42.115386 [info ] [MainThread]: 
[0m16:20:42.116396 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_produto.sql
[0m16:20:42.116905 [info ] [MainThread]: 
[0m16:20:42.117433 [info ] [MainThread]: Done. PASS=19 WARN=0 ERROR=7 SKIP=0 NO-OP=0 TOTAL=26
[0m16:20:42.117433 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:20:42.119633 [debug] [MainThread]: Command `dbt run` failed at 16:20:42.119633 after 12.07 seconds
[0m16:20:42.120519 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE52DABD0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE59A9040>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024AE59AB5C0>]}
[0m16:20:42.121532 [debug] [MainThread]: Flushing usage events
[0m16:20:42.782879 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:21:11.374075 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001885C5FE210>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001885EF663C0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001885F389190>]}


============================== 16:21:11.380995 | 28008fbb-3c3c-4138-89d1-bfe4d30620d9 ==============================
[0m16:21:11.380995 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:21:11.382512 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'False', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt run --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:21:11.669417 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001885ED57E90>]}
[0m16:21:11.731321 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001885EE19430>]}
[0m16:21:11.733979 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:21:12.082635 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:21:12.084264 [debug] [MainThread]: Partial parsing not enabled
[0m16:21:14.804813 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:21:14.805822 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018860C711C0>]}
[0m16:21:15.750129 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:21:15.764446 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000188617A6720>]}
[0m16:21:15.923201 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:21:15.928213 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:21:16.025497 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000188614E66F0>]}
[0m16:21:16.026689 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:21:16.026689 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001886137F650>]}
[0m16:21:16.035051 [info ] [MainThread]: 
[0m16:21:16.036042 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:21:16.036550 [info ] [MainThread]: 
[0m16:21:16.038458 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:21:16.067352 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:21:16.512554 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:21:16.513064 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:21:16.513064 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:21:18.071264 [debug] [ThreadPool]: SQL status: OK in 1.557 seconds
[0m16:21:18.074853 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:21:18.077852 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:21:18.078361 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:21:18.086755 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:21:18.087285 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:21:18.087285 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:21:18.088840 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:21:18.090349 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:21:18.090349 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:21:18.091947 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:21:18.092957 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:21:18.092957 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:21:18.094524 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:21:18.095534 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:21:18.095534 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:21:18.095534 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:21:18.097045 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:21:18.097552 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:21:18.101838 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:21:18.108464 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:21:18.108464 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:21:18.109973 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:21:18.110556 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:21:18.110556 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:21:18.111565 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:21:18.136930 [debug] [ThreadPool]: SQL status: OK in 0.026 seconds
[0m16:21:18.140158 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:21:18.142185 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:21:18.142766 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:21:18.151117 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018861364440>]}
[0m16:21:18.151693 [debug] [MainThread]: Using duckdb connection "master"
[0m16:21:18.152266 [debug] [MainThread]: On master: BEGIN
[0m16:21:18.152266 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:21:18.153275 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:21:18.153783 [debug] [MainThread]: On master: COMMIT
[0m16:21:18.154356 [debug] [MainThread]: Using duckdb connection "master"
[0m16:21:18.154904 [debug] [MainThread]: On master: COMMIT
[0m16:21:18.154904 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:21:18.155917 [debug] [MainThread]: On master: Close
[0m16:21:18.165844 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:21:18.166917 [info ] [Thread-1 (]: 1 of 26 START sql table model main.dim_atividade ............................... [RUN]
[0m16:21:18.168034 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_atividade'
[0m16:21:18.169114 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:21:18.181061 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:21:18.182666 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:21:18.231433 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:21:18.233967 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:21:18.234978 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:21:18.234978 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:21:18.237532 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:18.238543 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:21:18.238543 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:21:18.244305 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:21:18.251315 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:21:18.251315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:21:18.253957 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.256088 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:21:18.256088 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:21:18.258622 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:18.268436 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:21:18.268957 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade" rename to "dim_atividade__dbt_backup"
[0m16:21:18.270077 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.274494 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:21:18.275495 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:21:18.276497 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:18.302140 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:21:18.302140 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:21:18.303708 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:21:18.310152 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:21:18.318990 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:21:18.320168 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:21:18.325526 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:21:18.328567 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:21:18.332784 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001885ECC03B0>]}
[0m16:21:18.333793 [info ] [Thread-1 (]: 1 of 26 OK created sql table model main.dim_atividade .......................... [[32mOK[0m in 0.16s]
[0m16:21:18.334850 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:21:18.334850 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:21:18.335847 [info ] [Thread-1 (]: 2 of 26 START sql table model main.dim_classe_instituicao ...................... [RUN]
[0m16:21:18.335847 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:21:18.336903 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:21:18.340937 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:21:18.342952 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:21:18.347206 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:21:18.349219 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:21:18.350413 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:21:18.350920 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:18.351480 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.352034 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:21:18.352034 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:21:18.354791 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:18.356969 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:21:18.357529 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:21:18.358543 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.360055 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:21:18.362338 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:21:18.363428 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.369470 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:21:18.370002 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao" rename to "dim_classe_instituicao__dbt_backup"
[0m16:21:18.371075 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:18.374771 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:21:18.375772 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:21:18.376771 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:18.378274 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:21:18.378954 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:21:18.378954 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:21:18.384188 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:21:18.387270 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:21:18.388274 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:21:18.396661 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:21:18.398797 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:21:18.399334 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018861A2EDE0>]}
[0m16:21:18.399859 [info ] [Thread-1 (]: 2 of 26 OK created sql table model main.dim_classe_instituicao ................. [[32mOK[0m in 0.06s]
[0m16:21:18.400910 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:21:18.401433 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:21:18.401967 [info ] [Thread-1 (]: 3 of 26 START sql table model main.dim_consolidado ............................. [RUN]
[0m16:21:18.403052 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:21:18.403574 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:21:18.407800 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:21:18.408810 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:21:18.413962 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:21:18.415527 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:21:18.416545 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:21:18.416545 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:18.417748 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.417748 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:21:18.417748 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:21:18.419364 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.421468 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:21:18.421468 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:21:18.423179 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.424189 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:21:18.425187 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:21:18.425794 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.430964 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:21:18.430964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado" rename to "dim_consolidado__dbt_backup"
[0m16:21:18.432541 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.437893 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:21:18.438432 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:21:18.439516 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.441250 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:21:18.441776 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:21:18.442300 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:21:18.458638 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:21:18.461764 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:21:18.462332 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:21:18.465450 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:18.467016 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:21:18.467540 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018861A2EDE0>]}
[0m16:21:18.467540 [info ] [Thread-1 (]: 3 of 26 OK created sql table model main.dim_consolidado ........................ [[32mOK[0m in 0.07s]
[0m16:21:18.469724 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:21:18.470268 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:21:18.470268 [info ] [Thread-1 (]: 4 of 26 START sql table model main.dim_controle ................................ [RUN]
[0m16:21:18.471274 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:21:18.471785 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:21:18.476726 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:21:18.478318 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:21:18.482606 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:21:18.483137 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:21:18.484146 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:21:18.484657 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:18.485666 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.485666 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:21:18.486676 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:21:18.488193 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.489195 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:21:18.490226 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:21:18.491292 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.492801 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:21:18.494399 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:21:18.495407 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.498506 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:21:18.499504 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle" rename to "dim_controle__dbt_backup"
[0m16:21:18.501099 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:18.505048 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:21:18.505048 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:21:18.506056 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:18.508955 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:21:18.509489 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:21:18.509489 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:21:18.512179 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:18.515474 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:21:18.515980 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:21:18.518003 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:18.520251 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:21:18.521258 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018861A2F8C0>]}
[0m16:21:18.521258 [info ] [Thread-1 (]: 4 of 26 OK created sql table model main.dim_controle ........................... [[32mOK[0m in 0.05s]
[0m16:21:18.522650 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:21:18.523235 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:21:18.524245 [info ] [Thread-1 (]: 5 of 26 START sql table model main.dim_faixa_vencimento ........................ [RUN]
[0m16:21:18.524245 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:21:18.525242 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:21:18.529337 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:21:18.530900 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:21:18.536712 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:21:18.538758 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:21:18.538758 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:21:18.539761 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:18.540856 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.540856 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:21:18.541857 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:21:18.544248 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.545860 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:21:18.546391 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:21:18.548006 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.550012 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:21:18.551533 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:21:18.552134 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.556923 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:21:18.557519 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m16:21:18.557519 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:18.561686 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:21:18.562693 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:21:18.562693 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:18.565249 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:21:18.565782 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:21:18.566318 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:21:18.574139 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:21:18.577140 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:21:18.578138 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:21:18.584074 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:21:18.586639 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:21:18.587748 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018862AD7950>]}
[0m16:21:18.588751 [info ] [Thread-1 (]: 5 of 26 OK created sql table model main.dim_faixa_vencimento ................... [[32mOK[0m in 0.06s]
[0m16:21:18.590264 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:21:18.591266 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:21:18.592266 [info ] [Thread-1 (]: 6 of 26 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:21:18.592775 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_instituicao)
[0m16:21:18.592775 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:21:18.600313 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:21:18.602480 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:21:18.607549 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:21:18.608556 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:21:18.610067 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:21:18.610067 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:18.613268 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.613268 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:21:18.613268 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:21:18.862591 [debug] [Thread-1 (]: SQL status: OK in 0.247 seconds
[0m16:21:18.863788 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:21:18.865636 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:21:18.867235 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.869594 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:21:18.870146 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:21:18.871184 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.877768 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:21:18.879359 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:21:18.879359 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.885820 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:21:18.885820 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:21:18.886887 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:18.889104 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:21:18.889664 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:21:18.890188 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:21:18.899601 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:21:18.903310 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:21:18.903827 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:21:18.907628 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:21:18.909186 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:21:18.910181 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000188619D1040>]}
[0m16:21:18.910711 [info ] [Thread-1 (]: 6 of 26 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.32s]
[0m16:21:18.910711 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:21:18.911718 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:21:18.912728 [info ] [Thread-1 (]: 7 of 26 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:21:18.913236 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:21:18.913236 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:21:18.921666 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:21:18.923181 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:21:18.927996 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:21:18.929588 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:21:18.931193 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:21:18.931193 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:18.933316 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.934149 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:21:18.934691 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m16:21:18.984285 [debug] [Thread-1 (]: SQL status: OK in 0.050 seconds
[0m16:21:18.986491 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:21:18.987023 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:21:18.988033 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.990044 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:21:18.990044 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:21:18.991826 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:18.997000 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:21:18.997000 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:21:18.998010 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.002833 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:21:19.003843 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:21:19.004906 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.006968 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:21:19.007475 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:21:19.008020 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:21:19.012656 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:21:19.017314 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:21:19.017864 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:21:19.020411 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:19.022469 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:21:19.023046 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018862AAFE00>]}
[0m16:21:19.024066 [info ] [Thread-1 (]: 7 of 26 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.11s]
[0m16:21:19.025056 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:21:19.025056 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:21:19.026055 [info ] [Thread-1 (]: 8 of 26 START sql table model main.dim_porte ................................... [RUN]
[0m16:21:19.027055 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_porte)
[0m16:21:19.027055 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:21:19.031180 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:21:19.032782 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:21:19.036514 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:21:19.037575 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:21:19.038104 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:21:19.038643 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:19.039181 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.039717 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:21:19.039717 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:21:19.041386 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.042989 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:21:19.043520 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:21:19.044605 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.045153 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:21:19.045153 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:21:19.047241 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.051583 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:21:19.052159 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte" rename to "dim_porte__dbt_backup"
[0m16:21:19.052159 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.058207 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:21:19.059208 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:21:19.060208 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.065082 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:21:19.065623 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:21:19.066183 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:21:19.070361 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:21:19.073010 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:21:19.074019 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:21:19.077019 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:21:19.078022 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:21:19.079782 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018862A93F80>]}
[0m16:21:19.080418 [info ] [Thread-1 (]: 8 of 26 OK created sql table model main.dim_porte .............................. [[32mOK[0m in 0.05s]
[0m16:21:19.081427 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:21:19.081427 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:21:19.083100 [info ] [Thread-1 (]: 9 of 26 START sql table model main.dim_produto_credito ......................... [RUN]
[0m16:21:19.083608 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:21:19.084130 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:21:19.087779 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:21:19.088800 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:21:19.093045 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:21:19.094601 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:21:19.094601 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:21:19.094601 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:19.096179 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.096742 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:21:19.097296 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:21:19.098307 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.099326 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:21:19.099326 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:21:19.100931 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.102118 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:21:19.102118 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:21:19.103760 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.107570 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:21:19.108578 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m16:21:19.109674 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.112965 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:21:19.113513 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:21:19.114629 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.115738 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:21:19.116759 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:21:19.116759 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:21:19.117363 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.120130 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:21:19.121156 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:21:19.122790 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.125099 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:21:19.125099 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018861A2F230>]}
[0m16:21:19.126109 [info ] [Thread-1 (]: 9 of 26 OK created sql table model main.dim_produto_credito .................... [[32mOK[0m in 0.04s]
[0m16:21:19.127110 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:21:19.127110 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:21:19.127110 [info ] [Thread-1 (]: 10 of 26 START sql table model main.dim_regiao ................................. [RUN]
[0m16:21:19.128615 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:21:19.128615 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:21:19.131196 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:21:19.132766 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:21:19.135463 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:21:19.137053 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:21:19.137584 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:21:19.138473 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:19.139571 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.140094 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:21:19.140627 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:21:19.141688 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.142869 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:21:19.142869 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:21:19.142869 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.145444 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:21:19.145444 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:21:19.145444 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.150039 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:21:19.151046 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao" rename to "dim_regiao__dbt_backup"
[0m16:21:19.152053 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.158012 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:21:19.158012 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:21:19.159030 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.160023 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:21:19.161786 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:21:19.161786 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:21:19.163828 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:19.169036 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:21:19.170227 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:21:19.173581 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:19.175294 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:21:19.176466 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018862B1AF90>]}
[0m16:21:19.176466 [info ] [Thread-1 (]: 10 of 26 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.05s]
[0m16:21:19.177481 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:21:19.177481 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:21:19.178480 [info ] [Thread-1 (]: 11 of 26 START sql table model main.dim_risco .................................. [RUN]
[0m16:21:19.179532 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:21:19.180041 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:21:19.184296 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:21:19.184296 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:21:19.187932 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:21:19.190153 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:21:19.191179 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:21:19.192169 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:19.192169 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.193666 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:21:19.193666 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:21:19.195899 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.197411 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:21:19.198489 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:21:19.199480 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.199480 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:21:19.201070 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:21:19.202341 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.207916 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:21:19.209154 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco" rename to "dim_risco__dbt_backup"
[0m16:21:19.210164 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.216336 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:21:19.216902 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:21:19.217462 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.219078 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:21:19.220314 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:21:19.221838 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:21:19.224957 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:19.227956 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:21:19.228464 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:21:19.231062 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:19.232643 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:21:19.232643 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018861A304D0>]}
[0m16:21:19.232643 [info ] [Thread-1 (]: 11 of 26 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.05s]
[0m16:21:19.234227 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:21:19.234227 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:21:19.234227 [info ] [Thread-1 (]: 12 of 26 START sql table model main.dim_segmento ............................... [RUN]
[0m16:21:19.235790 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:21:19.236442 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:21:19.238971 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:21:19.240483 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:21:19.246684 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:21:19.249848 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:21:19.250374 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:21:19.251257 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:19.251765 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.252304 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:21:19.252849 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:21:19.254455 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.256052 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:21:19.256607 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:21:19.257691 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.258704 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:21:19.258704 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:21:19.260212 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.262954 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:21:19.263965 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento" rename to "dim_segmento__dbt_backup"
[0m16:21:19.263965 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.267508 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:21:19.267508 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:21:19.269089 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.270195 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:21:19.270195 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:21:19.271205 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:21:19.273837 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:19.275835 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:21:19.276834 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:21:19.279933 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:21:19.281611 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:21:19.281611 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018862B47920>]}
[0m16:21:19.283410 [info ] [Thread-1 (]: 12 of 26 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.05s]
[0m16:21:19.283410 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:21:19.283947 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:21:19.284485 [info ] [Thread-1 (]: 13 of 26 START sql table model main.dim_tempo .................................. [RUN]
[0m16:21:19.285020 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:21:19.285020 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:21:19.290737 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:21:19.293252 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:21:19.298041 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:21:19.307298 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:21:19.308816 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:21:19.308816 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:19.314852 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:21:19.321303 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:21:19.321842 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:21:19.341449 [debug] [Thread-1 (]: SQL status: OK in 0.019 seconds
[0m16:21:19.343450 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:21:19.344076 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:21:19.345501 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.346847 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:21:19.347858 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:21:19.349557 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.357391 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:21:19.357900 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:21:19.359319 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:19.364788 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:21:19.366870 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:21:19.367868 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.371221 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:21:19.371729 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:21:19.372307 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:21:19.377168 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:21:19.379690 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:21:19.381447 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:21:19.385463 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:21:19.388100 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:21:19.389108 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018861A305F0>]}
[0m16:21:19.389108 [info ] [Thread-1 (]: 13 of 26 OK created sql table model main.dim_tempo ............................. [[32mOK[0m in 0.10s]
[0m16:21:19.390624 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:21:19.392235 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:21:19.393308 [info ] [Thread-1 (]: 14 of 26 START sql table model main.fato_balanco_patrimonial ................... [RUN]
[0m16:21:19.394319 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:21:19.394826 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:21:19.405739 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:21:19.407353 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:21:19.412973 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:21:19.414989 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:21:19.415933 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:21:19.416442 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:19.417455 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:19.418387 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:21:19.419398 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:21:20.099603 [debug] [Thread-1 (]: SQL status: OK in 0.679 seconds
[0m16:21:20.101750 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:21:20.102264 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:21:20.103779 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.104982 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:21:20.105996 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:21:20.108241 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.113972 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:21:20.114975 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:21:20.115482 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:20.120279 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:21:20.121292 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:21:20.122679 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:20.124198 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:21:20.124198 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:21:20.125225 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:21:20.430242 [debug] [Thread-1 (]: SQL status: OK in 0.304 seconds
[0m16:21:20.434353 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:21:20.435932 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:21:20.449235 [debug] [Thread-1 (]: SQL status: OK in 0.013 seconds
[0m16:21:20.450287 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:21:20.451246 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018861A49460>]}
[0m16:21:20.452329 [info ] [Thread-1 (]: 14 of 26 OK created sql table model main.fato_balanco_patrimonial .............. [[32mOK[0m in 1.06s]
[0m16:21:20.453848 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:21:20.454402 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:21:20.455003 [info ] [Thread-1 (]: 15 of 26 START sql table model main.fato_capital_prudencial .................... [RUN]
[0m16:21:20.456527 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:21:20.457037 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:21:20.462770 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:21:20.463844 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:21:20.467381 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:21:20.470168 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:21:20.470168 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:21:20.471793 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:20.472990 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.474003 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:21:20.474003 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:21:20.499216 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:21:20.500437 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:21:20.502098 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: ROLLBACK
[0m16:21:20.517459 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_capital_prudencial'
[0m16:21:20.519133 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:21:20.524446 [debug] [Thread-1 (]: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:21:20.525457 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000188619A5460>]}
[0m16:21:20.525457 [error] [Thread-1 (]: 15 of 26 ERROR creating sql table model main.fato_capital_prudencial ........... [[31mERROR[0m in 0.07s]
[0m16:21:20.526456 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:21:20.526456 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:21:20.528847 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_capital_prudencial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^.
[0m16:21:20.529356 [info ] [Thread-1 (]: 16 of 26 START sql table model main.fato_carteira_credito_indexador ............ [RUN]
[0m16:21:20.532655 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:21:20.532655 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:21:20.538384 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:21:20.539913 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:21:20.545657 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:21:20.548176 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:21:20.549176 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:21:20.549176 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:20.550882 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.551467 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:21:20.552058 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:21:20.553586 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:21:20.554193 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:21:20.555209 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: ROLLBACK
[0m16:21:20.565619 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador'
[0m16:21:20.567144 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:21:20.572169 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^
[0m16:21:20.572878 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018862B3E8A0>]}
[0m16:21:20.575170 [error] [Thread-1 (]: 16 of 26 ERROR creating sql table model main.fato_carteira_credito_indexador ... [[31mERROR[0m in 0.04s]
[0m16:21:20.576172 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:21:20.578166 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:21:20.578676 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^.
[0m16:21:20.579684 [info ] [Thread-1 (]: 17 of 26 START sql table model main.fato_carteira_credito_totais ............... [RUN]
[0m16:21:20.580699 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:21:20.580699 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:21:20.593382 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:21:20.595190 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:21:20.603860 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:21:20.607557 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:21:20.608091 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:21:20.609103 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:20.610610 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.611621 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:21:20.612622 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:21:20.618926 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:21:20.620927 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:21:20.621927 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: ROLLBACK
[0m16:21:20.630253 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_totais'
[0m16:21:20.631761 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:21:20.636741 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m16:21:20.637430 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018862A9CE30>]}
[0m16:21:20.640961 [error] [Thread-1 (]: 17 of 26 ERROR creating sql table model main.fato_carteira_credito_totais ...... [[31mERROR[0m in 0.06s]
[0m16:21:20.643030 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:21:20.643965 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:21:20.643965 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_totais' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^.
[0m16:21:20.645596 [info ] [Thread-1 (]: 18 of 26 START sql table model main.fato_demonstracao_resultado ................ [RUN]
[0m16:21:20.647106 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:21:20.647106 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:21:20.655635 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:21:20.658051 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:21:20.663742 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:21:20.666522 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:21:20.667565 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:21:20.668723 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:20.670450 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:21:20.670957 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:21:20.671968 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:21:20.676058 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:21:20.677057 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:21:20.678060 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: ROLLBACK
[0m16:21:20.685508 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_demonstracao_resultado'
[0m16:21:20.686464 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:21:20.692192 [debug] [Thread-1 (]: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m16:21:20.693412 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018862AAA360>]}
[0m16:21:20.696088 [error] [Thread-1 (]: 18 of 26 ERROR creating sql table model main.fato_demonstracao_resultado ....... [[31mERROR[0m in 0.05s]
[0m16:21:20.697401 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:21:20.698081 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:21:20.699524 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_demonstracao_resultado' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT".
[0m16:21:20.700105 [info ] [Thread-1 (]: 19 of 26 START sql table model main.fato_movimentacao_cambio ................... [RUN]
[0m16:21:20.701210 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:21:20.703311 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:21:20.708494 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:21:20.710026 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:21:20.717267 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:21:20.719345 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:21:20.720862 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:21:20.721369 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:20.722380 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.722890 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:21:20.723904 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:21:20.731235 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:21:20.733984 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:21:20.734997 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:21:20.736015 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.738546 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:21:20.738546 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:21:20.740057 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.745622 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:21:20.748168 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:21:20.749678 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.756218 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:21:20.756727 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:21:20.757738 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.760742 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:21:20.761741 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:21:20.762740 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:21:20.781554 [debug] [Thread-1 (]: SQL status: OK in 0.018 seconds
[0m16:21:20.788129 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:21:20.789322 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:21:20.816544 [debug] [Thread-1 (]: SQL status: OK in 0.027 seconds
[0m16:21:20.819546 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:21:20.822065 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018861A48B60>]}
[0m16:21:20.828580 [info ] [Thread-1 (]: 19 of 26 OK created sql table model main.fato_movimentacao_cambio .............. [[32mOK[0m in 0.12s]
[0m16:21:20.830579 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:21:20.833300 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:21:20.835202 [info ] [Thread-1 (]: 20 of 26 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:21:20.836209 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:21:20.836826 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:21:20.845467 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:21:20.851490 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:21:20.870799 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:21:20.872339 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:21:20.872849 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:21:20.872849 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:20.873861 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.874860 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:21:20.874860 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:21:20.921262 [debug] [Thread-1 (]: SQL status: OK in 0.045 seconds
[0m16:21:20.922785 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:21:20.923796 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:21:20.925309 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.927828 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:21:20.927828 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:21:20.929422 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.934407 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:21:20.934915 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:21:20.935924 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.939964 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:21:20.940973 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:21:20.941975 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.943000 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:21:20.943000 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:21:20.944607 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:21:20.967504 [debug] [Thread-1 (]: SQL status: OK in 0.023 seconds
[0m16:21:20.972251 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:21:20.972815 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:21:20.974824 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:20.977041 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:21:20.978050 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018861A30B90>]}
[0m16:21:20.980657 [info ] [Thread-1 (]: 20 of 26 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.14s]
[0m16:21:20.982761 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:21:20.983772 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:21:20.983772 [info ] [Thread-1 (]: 21 of 26 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:21:20.985772 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:21:20.986785 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:21:20.992854 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:21:20.995995 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:21:20.999575 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:21:21.002310 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:21:21.002310 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:21:21.003322 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:21.004395 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:21.005008 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:21:21.005008 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:21:21.560733 [debug] [Thread-1 (]: SQL status: OK in 0.554 seconds
[0m16:21:21.562886 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:21:21.563429 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:21:21.564980 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:21.567102 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:21:21.567609 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:21:21.570014 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:21.574689 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:21:21.575690 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:21:21.576689 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:21.583734 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:21:21.585215 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:21:21.586791 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:21.590006 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:21:21.590516 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:21:21.590516 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:21:21.890321 [debug] [Thread-1 (]: SQL status: OK in 0.298 seconds
[0m16:21:21.894323 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:21:21.895326 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:21:21.899843 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:21:21.901847 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:21:21.902845 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001886E9D3D40>]}
[0m16:21:21.904176 [info ] [Thread-1 (]: 21 of 26 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.92s]
[0m16:21:21.905666 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:21:21.907142 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:21:21.909166 [info ] [Thread-1 (]: 22 of 26 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:21:21.910693 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:21:21.911851 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:21:21.919330 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:21:21.921333 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:21:21.930372 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:21:21.933895 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:21:21.935740 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:21:21.936753 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:21.939753 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:21:21.941753 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:21:21.942393 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:21:21.952422 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:21:21.953940 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:21:21.954951 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: ROLLBACK
[0m16:21:21.959952 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_atividade'
[0m16:21:21.960950 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:21:21.966606 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_atividade (models\gold\fato_carteira_credito_atividade.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause
[0m16:21:21.968612 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018862B322A0>]}
[0m16:21:22.831531 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:21:22.835275 [error] [Thread-1 (]: 22 of 26 ERROR creating sql table model main.fato_carteira_credito_atividade ... [[31mERROR[0m in 0.06s]
[0m16:21:22.835833 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:21:22.836378 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:21:22.836908 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_atividade' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_atividade (models\gold\fato_carteira_credito_atividade.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause.
[0m16:21:22.837458 [info ] [Thread-1 (]: 23 of 26 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:21:22.838496 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:21:22.838496 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:21:22.842302 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:21:22.842928 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:21:22.847168 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:21:22.848185 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:21:22.848185 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:21:22.849187 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:22.849728 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:22.849728 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:21:22.849728 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:21:22.852503 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:21:22.853084 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:21:22.853630 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: ROLLBACK
[0m16:21:22.857035 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_porte'
[0m16:21:22.857570 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:21:22.860648 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_porte (models\gold\fato_carteira_credito_porte.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause
[0m16:21:22.860648 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000188614FF860>]}
[0m16:21:22.862184 [error] [Thread-1 (]: 23 of 26 ERROR creating sql table model main.fato_carteira_credito_porte ....... [[31mERROR[0m in 0.02s]
[0m16:21:22.862695 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:21:22.862695 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:21:22.862695 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_porte' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_porte (models\gold\fato_carteira_credito_porte.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause.
[0m16:21:22.863716 [info ] [Thread-1 (]: 24 of 26 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:21:22.864720 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:21:22.864720 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:21:22.870313 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:21:22.872116 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:21:22.875954 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:21:22.876966 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:21:22.876966 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:21:22.878487 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:22.878487 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:22.879503 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:21:22.880018 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:21:22.882598 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:21:22.882598 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:21:22.884260 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: ROLLBACK
[0m16:21:22.886863 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_produto'
[0m16:21:22.887375 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:21:22.890949 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_produto (models\gold\fato_carteira_credito_produto.sql)
  Binder Error: Column "total_carteira_pessoa_fisica" in EXCLUDE list not found in FROM clause
[0m16:21:22.890949 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001886E9CEEA0>]}
[0m16:21:22.891952 [error] [Thread-1 (]: 24 of 26 ERROR creating sql table model main.fato_carteira_credito_produto ..... [[31mERROR[0m in 0.03s]
[0m16:21:22.893047 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:21:22.893047 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:21:22.893047 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_produto' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_produto (models\gold\fato_carteira_credito_produto.sql)
  Binder Error: Column "total_carteira_pessoa_fisica" in EXCLUDE list not found in FROM clause.
[0m16:21:22.894286 [info ] [Thread-1 (]: 25 of 26 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:21:22.895010 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:21:22.895010 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:21:22.905290 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:21:22.907324 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:21:22.984870 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:21:22.985877 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:21:22.987292 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:21:22.987292 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:22.987292 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:22.988317 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:21:22.988317 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:21:23.282544 [debug] [Thread-1 (]: SQL status: OK in 0.294 seconds
[0m16:21:23.284139 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:21:23.284139 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:21:23.284139 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:23.286741 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:21:23.286741 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:21:23.287251 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:23.291866 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:21:23.292875 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito" rename to "fato_regiao_credito__dbt_backup"
[0m16:21:23.292875 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:23.297662 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:21:23.298234 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:21:23.298766 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:23.300971 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:21:23.301508 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:21:23.302033 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:21:23.340845 [debug] [Thread-1 (]: SQL status: OK in 0.038 seconds
[0m16:21:23.343488 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:21:23.344008 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:21:23.349136 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:21:23.349643 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:21:23.351727 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018861691EE0>]}
[0m16:21:23.352293 [info ] [Thread-1 (]: 25 of 26 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.46s]
[0m16:21:23.353303 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:21:23.353809 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:21:23.354973 [info ] [Thread-1 (]: 26 of 26 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:21:23.354973 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:21:23.355981 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:21:23.361615 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:21:23.363141 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:21:23.366493 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:21:23.368064 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:21:23.369073 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:21:23.369073 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:21:23.370134 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:23.370134 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:21:23.370134 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:21:24.128735 [debug] [Thread-1 (]: SQL status: OK in 0.744 seconds
[0m16:21:24.134252 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:21:24.137254 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:21:24.142767 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:21:24.152812 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:21:24.155815 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:21:24.160329 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:24.174401 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:21:24.175402 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito" rename to "fato_risco_credito__dbt_backup"
[0m16:21:24.176400 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:21:24.181400 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:21:24.182400 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:21:24.183906 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:21:24.201943 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:21:24.203049 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:21:24.203587 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:21:24.361511 [debug] [Thread-1 (]: SQL status: OK in 0.158 seconds
[0m16:21:24.367512 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:21:24.369702 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:21:24.382409 [debug] [Thread-1 (]: SQL status: OK in 0.013 seconds
[0m16:21:24.385776 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:21:24.385776 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '28008fbb-3c3c-4138-89d1-bfe4d30620d9', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018862AA4B90>]}
[0m16:21:24.387294 [info ] [Thread-1 (]: 26 of 26 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 1.03s]
[0m16:21:24.388299 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:21:24.389808 [debug] [MainThread]: Using duckdb connection "master"
[0m16:21:24.390821 [debug] [MainThread]: On master: BEGIN
[0m16:21:24.390821 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:21:24.391820 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:21:24.391820 [debug] [MainThread]: On master: COMMIT
[0m16:21:24.391820 [debug] [MainThread]: Using duckdb connection "master"
[0m16:21:24.393078 [debug] [MainThread]: On master: COMMIT
[0m16:21:24.393078 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:21:24.394085 [debug] [MainThread]: On master: Close
[0m16:21:24.394592 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:21:24.394592 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:21:24.395601 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:21:24.395601 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_risco_credito' was properly closed.
[0m16:21:24.396600 [info ] [MainThread]: 
[0m16:21:24.397107 [info ] [MainThread]: Finished running 26 table models in 0 hours 0 minutes and 8.36 seconds (8.36s).
[0m16:21:24.400797 [debug] [MainThread]: Command end result
[0m16:21:24.453845 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:21:24.458525 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:21:24.467367 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:21:24.468940 [info ] [MainThread]: 
[0m16:21:24.469557 [info ] [MainThread]: [31mCompleted with 7 errors, 0 partial successes, and 0 warnings:[0m
[0m16:21:24.470104 [info ] [MainThread]: 
[0m16:21:24.470104 [error] [MainThread]: [31mFailure in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)[0m
[0m16:21:24.471705 [error] [MainThread]:   Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:21:24.471705 [info ] [MainThread]: 
[0m16:21:24.473261 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_capital_prudencial.sql
[0m16:21:24.473261 [info ] [MainThread]: 
[0m16:21:24.474268 [error] [MainThread]: [31mFailure in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)[0m
[0m16:21:24.475269 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^
[0m16:21:24.475269 [info ] [MainThread]: 
[0m16:21:24.476268 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_indexador.sql
[0m16:21:24.476268 [info ] [MainThread]: 
[0m16:21:24.477268 [error] [MainThread]: [31mFailure in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)[0m
[0m16:21:24.478268 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m16:21:24.478774 [info ] [MainThread]: 
[0m16:21:24.479279 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_totais.sql
[0m16:21:24.479279 [info ] [MainThread]: 
[0m16:21:24.480287 [error] [MainThread]: [31mFailure in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)[0m
[0m16:21:24.481288 [error] [MainThread]:   Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m16:21:24.481288 [info ] [MainThread]: 
[0m16:21:24.481288 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_demonstracao_resultado.sql
[0m16:21:24.482880 [info ] [MainThread]: 
[0m16:21:24.483890 [error] [MainThread]: [31mFailure in model fato_carteira_credito_atividade (models\gold\fato_carteira_credito_atividade.sql)[0m
[0m16:21:24.483890 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_atividade (models\gold\fato_carteira_credito_atividade.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause
[0m16:21:24.484961 [info ] [MainThread]: 
[0m16:21:24.484961 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_atividade.sql
[0m16:21:24.485959 [info ] [MainThread]: 
[0m16:21:24.485959 [error] [MainThread]: [31mFailure in model fato_carteira_credito_porte (models\gold\fato_carteira_credito_porte.sql)[0m
[0m16:21:24.485959 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_porte (models\gold\fato_carteira_credito_porte.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause
[0m16:21:24.487023 [info ] [MainThread]: 
[0m16:21:24.487531 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_porte.sql
[0m16:21:24.488540 [info ] [MainThread]: 
[0m16:21:24.488540 [error] [MainThread]: [31mFailure in model fato_carteira_credito_produto (models\gold\fato_carteira_credito_produto.sql)[0m
[0m16:21:24.488540 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_produto (models\gold\fato_carteira_credito_produto.sql)
  Binder Error: Column "total_carteira_pessoa_fisica" in EXCLUDE list not found in FROM clause
[0m16:21:24.490047 [info ] [MainThread]: 
[0m16:21:24.491057 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_produto.sql
[0m16:21:24.491057 [info ] [MainThread]: 
[0m16:21:24.492057 [info ] [MainThread]: Done. PASS=19 WARN=0 ERROR=7 SKIP=0 NO-OP=0 TOTAL=26
[0m16:21:24.493239 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:21:24.494757 [debug] [MainThread]: Command `dbt run` failed at 16:21:24.494757 after 13.43 seconds
[0m16:21:24.495279 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001885FBC0C80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001885F339730>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001885F3395B0>]}
[0m16:21:24.495279 [debug] [MainThread]: Flushing usage events
[0m16:21:25.107307 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:23:32.100230 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E320EBA10>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E2E1E58E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E2EA6E9F0>]}


============================== 16:23:32.108377 | 997404ef-baaa-41fb-bba2-6ec5f41df1de ==============================
[0m16:23:32.108377 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:23:32.109425 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'False', 'use_colors': 'True', 'invocation_command': 'dbt run --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:23:32.420980 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E33A839E0>]}
[0m16:23:32.492243 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E2F608410>]}
[0m16:23:32.498064 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:23:33.037041 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:23:33.039581 [debug] [MainThread]: Partial parsing not enabled
[0m16:23:35.153264 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:23:35.153783 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E34192090>]}
[0m16:23:35.729453 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:23:35.740756 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E345284A0>]}
[0m16:23:35.854189 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:23:35.858487 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:23:36.030999 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E342E6F90>]}
[0m16:23:36.031796 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:23:36.032816 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E341CB620>]}
[0m16:23:36.043360 [info ] [MainThread]: 
[0m16:23:36.045369 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:23:36.045369 [info ] [MainThread]: 
[0m16:23:36.047383 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:23:36.065736 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:23:36.753337 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:23:36.753897 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:23:36.753897 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:23:37.636650 [debug] [ThreadPool]: SQL status: OK in 0.883 seconds
[0m16:23:37.640350 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:23:37.640975 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:23:37.642485 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:23:37.648675 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:23:37.648675 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:23:37.648675 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:23:37.650179 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:23:37.651184 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:23:37.651687 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:23:37.652250 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:23:37.652250 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:23:37.652250 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:23:37.653271 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:23:37.654366 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:23:37.654366 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:23:37.654366 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:23:37.654936 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:23:37.654936 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:23:37.658489 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:23:37.664773 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:23:37.664773 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:23:37.665780 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:23:37.665780 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:23:37.666778 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:23:37.666778 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:23:37.684469 [debug] [ThreadPool]: SQL status: OK in 0.018 seconds
[0m16:23:37.686037 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:23:37.688074 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:23:37.688074 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:23:37.691165 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E3193BC80>]}
[0m16:23:37.692677 [debug] [MainThread]: Using duckdb connection "master"
[0m16:23:37.692677 [debug] [MainThread]: On master: BEGIN
[0m16:23:37.692677 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:23:37.692677 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:23:37.694837 [debug] [MainThread]: On master: COMMIT
[0m16:23:37.694837 [debug] [MainThread]: Using duckdb connection "master"
[0m16:23:37.695848 [debug] [MainThread]: On master: COMMIT
[0m16:23:37.695848 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:23:37.695848 [debug] [MainThread]: On master: Close
[0m16:23:37.702434 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:23:37.702434 [info ] [Thread-1 (]: 1 of 26 START sql table model main.dim_atividade ............................... [RUN]
[0m16:23:37.703396 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_atividade'
[0m16:23:37.703755 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:23:37.708364 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:23:37.710457 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:23:37.738394 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:23:37.739898 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:23:37.740905 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:23:37.740905 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:23:37.740905 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.740905 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:23:37.742413 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:23:37.746696 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:23:37.749831 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:23:37.751341 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:23:37.751946 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.753666 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:23:37.754212 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:23:37.756229 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:23:37.763618 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:23:37.763618 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade" rename to "dim_atividade__dbt_backup"
[0m16:23:37.764623 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.767258 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:23:37.767258 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:23:37.768262 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.782723 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:23:37.782723 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:23:37.782723 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:23:37.785820 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:23:37.792750 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:23:37.793290 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:23:37.794828 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.797257 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:23:37.799263 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E2F45E600>]}
[0m16:23:37.799767 [info ] [Thread-1 (]: 1 of 26 OK created sql table model main.dim_atividade .......................... [[32mOK[0m in 0.09s]
[0m16:23:37.799767 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:23:37.800777 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:23:37.800777 [info ] [Thread-1 (]: 2 of 26 START sql table model main.dim_classe_instituicao ...................... [RUN]
[0m16:23:37.801787 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:23:37.801787 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:23:37.804461 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:23:37.805050 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:23:37.809249 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:23:37.811556 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:23:37.812071 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:23:37.812071 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:37.812584 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.813119 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:23:37.813119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:23:37.815646 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:23:37.816663 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:23:37.817254 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:23:37.817254 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.818257 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:23:37.819264 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:23:37.819264 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.824648 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:23:37.825169 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao" rename to "dim_classe_instituicao__dbt_backup"
[0m16:23:37.826244 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.828275 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:23:37.828275 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:23:37.829280 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.829784 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:23:37.829784 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:23:37.829784 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:23:37.832806 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:23:37.834319 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:23:37.834319 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:23:37.837901 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:23:37.840110 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:23:37.840673 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E3482ECC0>]}
[0m16:23:37.841353 [info ] [Thread-1 (]: 2 of 26 OK created sql table model main.dim_classe_instituicao ................. [[32mOK[0m in 0.04s]
[0m16:23:37.841887 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:23:37.841887 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:23:37.842440 [info ] [Thread-1 (]: 3 of 26 START sql table model main.dim_consolidado ............................. [RUN]
[0m16:23:37.842974 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:23:37.843518 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:23:37.845108 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:23:37.846617 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:23:37.849195 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:23:37.849697 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:23:37.849697 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:23:37.849697 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:37.849697 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.851200 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:23:37.851200 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:23:37.852773 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.856621 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:23:37.857140 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:23:37.858511 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.860123 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:23:37.860652 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:23:37.860652 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.866860 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:23:37.867363 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado" rename to "dim_consolidado__dbt_backup"
[0m16:23:37.867363 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.871422 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:23:37.871422 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:23:37.872935 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.873942 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:23:37.874948 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:23:37.874948 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:23:37.876988 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.879147 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:23:37.879147 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:23:37.882697 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:23:37.882697 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:23:37.884247 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E358A3860>]}
[0m16:23:37.884871 [info ] [Thread-1 (]: 3 of 26 OK created sql table model main.dim_consolidado ........................ [[32mOK[0m in 0.04s]
[0m16:23:37.884871 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:23:37.884871 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:23:37.886387 [info ] [Thread-1 (]: 4 of 26 START sql table model main.dim_controle ................................ [RUN]
[0m16:23:37.886387 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:23:37.886889 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:23:37.889897 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:23:37.890909 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:23:37.895658 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:23:37.896735 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:23:37.897243 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:23:37.897243 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:37.897789 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.897789 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:23:37.897789 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:23:37.899300 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.900043 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:23:37.900043 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:23:37.901558 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.902697 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:23:37.902697 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:23:37.903701 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.906757 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:23:37.907339 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle" rename to "dim_controle__dbt_backup"
[0m16:23:37.908345 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.911494 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:23:37.911999 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:23:37.913042 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.914121 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:23:37.914658 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:23:37.915329 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:23:37.918959 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:23:37.920058 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:23:37.921626 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:23:37.925198 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:23:37.926785 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:23:37.927824 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E3482F8F0>]}
[0m16:23:37.928746 [info ] [Thread-1 (]: 4 of 26 OK created sql table model main.dim_controle ........................... [[32mOK[0m in 0.04s]
[0m16:23:37.929286 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:23:37.929822 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:23:37.931045 [info ] [Thread-1 (]: 5 of 26 START sql table model main.dim_faixa_vencimento ........................ [RUN]
[0m16:23:37.931581 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:23:37.931581 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:23:37.934098 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:23:37.934098 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:23:37.938188 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:23:37.939188 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:23:37.940192 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:23:37.940192 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:37.940192 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.941356 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:23:37.941356 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:23:37.942865 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.942865 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:23:37.944482 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:23:37.944482 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.946793 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:23:37.947366 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:23:37.948986 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.952778 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:23:37.952778 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m16:23:37.953819 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.955889 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:23:37.955889 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:23:37.957015 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:37.958038 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:23:37.958038 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:23:37.958038 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:23:37.962719 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:23:37.966746 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:23:37.967785 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:23:37.972009 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:23:37.973069 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:23:37.974075 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E358C1190>]}
[0m16:23:37.974075 [info ] [Thread-1 (]: 5 of 26 OK created sql table model main.dim_faixa_vencimento ................... [[32mOK[0m in 0.04s]
[0m16:23:37.975084 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:23:37.975084 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:23:37.976080 [info ] [Thread-1 (]: 6 of 26 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:23:37.976670 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_instituicao)
[0m16:23:37.976670 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:23:37.979702 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:23:37.981206 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:23:37.986849 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:23:37.987856 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:23:37.987856 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:23:37.988855 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:37.988855 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:37.989856 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:23:37.989856 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:23:38.285091 [debug] [Thread-1 (]: SQL status: OK in 0.294 seconds
[0m16:23:38.287104 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:23:38.288100 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:23:38.289087 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.291604 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:23:38.297143 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:23:38.300665 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.314713 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:23:38.315727 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:23:38.317724 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.322783 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:23:38.323790 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:23:38.324791 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:38.326804 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:23:38.327801 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:23:38.327801 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:23:38.345893 [debug] [Thread-1 (]: SQL status: OK in 0.018 seconds
[0m16:23:38.354510 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:23:38.355509 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:23:38.359036 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:23:38.361041 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:23:38.362569 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E3482FB90>]}
[0m16:23:38.364003 [info ] [Thread-1 (]: 6 of 26 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.39s]
[0m16:23:38.365010 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:23:38.366012 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:23:38.367013 [info ] [Thread-1 (]: 7 of 26 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:23:38.368014 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:23:38.368014 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:23:38.377045 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:23:38.379053 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:23:38.384265 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:23:38.385836 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:23:38.386849 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:23:38.387845 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:38.388850 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.389844 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:23:38.389844 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m16:23:38.453272 [debug] [Thread-1 (]: SQL status: OK in 0.062 seconds
[0m16:23:38.454795 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:23:38.455803 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:23:38.456802 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.459804 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:23:38.460805 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:23:38.462806 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.467411 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:23:38.468326 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:23:38.469335 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.474403 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:23:38.475412 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:23:38.476419 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.478936 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:23:38.479933 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:23:38.480937 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:23:38.486173 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:23:38.490736 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:23:38.490736 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:23:38.494765 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:23:38.496605 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:23:38.497613 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E358D1130>]}
[0m16:23:38.499136 [info ] [Thread-1 (]: 7 of 26 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.13s]
[0m16:23:38.500143 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:23:38.501151 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:23:38.502233 [info ] [Thread-1 (]: 8 of 26 START sql table model main.dim_porte ................................... [RUN]
[0m16:23:38.503260 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_porte)
[0m16:23:38.503260 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:23:38.508296 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:23:38.510305 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:23:38.515857 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:23:38.517857 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:23:38.518859 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:23:38.518859 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:38.519942 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.520859 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:23:38.520859 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:23:38.523469 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.524981 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:23:38.525989 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:23:38.528000 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.530524 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:23:38.530524 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:23:38.533029 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.538042 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:23:38.538594 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte" rename to "dim_porte__dbt_backup"
[0m16:23:38.539600 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:38.544361 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:23:38.544361 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:23:38.546380 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.551430 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:23:38.551935 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:23:38.552941 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:23:38.556476 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:23:38.561481 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:23:38.566110 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:23:38.570615 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:23:38.573132 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:23:38.574233 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E3586A480>]}
[0m16:23:38.575139 [info ] [Thread-1 (]: 8 of 26 OK created sql table model main.dim_porte .............................. [[32mOK[0m in 0.07s]
[0m16:23:38.576149 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:23:38.577147 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:23:38.577147 [info ] [Thread-1 (]: 9 of 26 START sql table model main.dim_produto_credito ......................... [RUN]
[0m16:23:38.578656 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:23:38.578656 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:23:38.583998 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:23:38.586001 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:23:38.592001 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:23:38.593532 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:23:38.594520 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:23:38.594520 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:38.596526 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.597612 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:23:38.598527 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:23:38.601527 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:23:38.603835 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:23:38.605368 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:23:38.607524 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.610069 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:23:38.612582 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:23:38.613589 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.620065 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:23:38.621690 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m16:23:38.622700 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.627731 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:23:38.627731 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:23:38.629238 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.631246 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:23:38.632758 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:23:38.633768 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:23:38.638563 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:23:38.643179 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:23:38.644210 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:23:38.648274 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:23:38.651225 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:23:38.652764 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E348300E0>]}
[0m16:23:38.653773 [info ] [Thread-1 (]: 9 of 26 OK created sql table model main.dim_produto_credito .................... [[32mOK[0m in 0.07s]
[0m16:23:38.654899 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:23:38.655912 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:23:38.656907 [info ] [Thread-1 (]: 10 of 26 START sql table model main.dim_regiao ................................. [RUN]
[0m16:23:38.658044 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:23:38.658044 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:23:38.663291 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:23:38.665389 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:23:38.670380 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:23:38.672921 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:23:38.673931 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:23:38.673931 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:38.674931 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.675942 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:23:38.676940 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:23:38.678448 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:23:38.682974 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:23:38.683981 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:23:38.685989 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.688503 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:23:38.688503 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:23:38.691016 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.696099 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:23:38.696099 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao" rename to "dim_regiao__dbt_backup"
[0m16:23:38.697735 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.705135 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:23:38.705135 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:23:38.706648 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.708781 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:23:38.708781 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:23:38.709784 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:23:38.713569 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:23:38.718280 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:23:38.718280 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:23:38.726756 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:23:38.727760 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:23:38.727760 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E358FAF60>]}
[0m16:23:38.729408 [info ] [Thread-1 (]: 10 of 26 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.07s]
[0m16:23:38.730980 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:23:38.730980 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:23:38.732552 [info ] [Thread-1 (]: 11 of 26 START sql table model main.dim_risco .................................. [RUN]
[0m16:23:38.732552 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:23:38.734230 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:23:38.737331 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:23:38.738339 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:23:38.743077 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:23:38.744732 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:23:38.745737 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:23:38.745737 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:38.747246 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.748253 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:23:38.748253 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:23:38.749257 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.751745 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:23:38.752352 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:23:38.752867 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.754564 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:23:38.755162 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:23:38.756222 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.762553 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:23:38.763607 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco" rename to "dim_risco__dbt_backup"
[0m16:23:38.766566 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.771406 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:23:38.773109 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:23:38.774206 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.777231 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:23:38.778352 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:23:38.779871 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:23:38.786337 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:23:38.790859 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:23:38.791863 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:23:38.800210 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:23:38.802760 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:23:38.804272 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E348304D0>]}
[0m16:23:38.805633 [info ] [Thread-1 (]: 11 of 26 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.07s]
[0m16:23:38.806295 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:23:38.807439 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:23:38.807960 [info ] [Thread-1 (]: 12 of 26 START sql table model main.dim_segmento ............................... [RUN]
[0m16:23:38.808966 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:23:38.809966 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:23:38.813991 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:23:38.817008 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:23:38.823182 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:23:38.827666 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:23:38.828172 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:23:38.829009 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:38.829644 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.830148 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:23:38.830148 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:23:38.832664 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.834175 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:23:38.835077 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:23:38.837616 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.840454 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:23:38.840989 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:23:38.843114 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.848143 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:23:38.848788 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento" rename to "dim_segmento__dbt_backup"
[0m16:23:38.850300 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.855581 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:23:38.856125 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:23:38.857397 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.859000 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:23:38.860507 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:23:38.861513 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:23:38.863653 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:23:38.868499 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:23:38.869956 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:23:38.873505 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:23:38.876221 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:23:38.877239 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E358AFEC0>]}
[0m16:23:38.879241 [info ] [Thread-1 (]: 12 of 26 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.07s]
[0m16:23:38.880251 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:23:38.881250 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:23:38.882759 [info ] [Thread-1 (]: 13 of 26 START sql table model main.dim_tempo .................................. [RUN]
[0m16:23:38.883870 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:23:38.884970 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:23:38.889868 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:23:38.890876 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:23:38.894618 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:23:38.896132 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:23:38.896652 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:23:38.897307 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:38.897307 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.898315 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:23:38.898315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:23:38.916851 [debug] [Thread-1 (]: SQL status: OK in 0.018 seconds
[0m16:23:38.917857 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:23:38.919500 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:23:38.920101 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:38.920101 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:23:38.921693 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:23:38.922703 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.925221 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:23:38.926221 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:23:38.926221 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:38.930564 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:23:38.931655 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:23:38.933469 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.935617 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:23:38.936155 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:23:38.936155 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:23:38.940173 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:23:38.942685 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:23:38.942685 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:23:38.946870 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:23:38.948381 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:23:38.949385 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E3482F110>]}
[0m16:23:38.949385 [info ] [Thread-1 (]: 13 of 26 OK created sql table model main.dim_tempo ............................. [[32mOK[0m in 0.06s]
[0m16:23:38.949385 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:23:38.950992 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:23:38.952156 [info ] [Thread-1 (]: 14 of 26 START sql table model main.fato_balanco_patrimonial ................... [RUN]
[0m16:23:38.952672 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:23:38.952672 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:23:38.961848 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:23:38.963393 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:23:38.969718 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:23:38.971284 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:23:38.972299 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:23:38.972824 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:38.973831 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:38.975086 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:23:38.975625 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:23:39.523854 [debug] [Thread-1 (]: SQL status: OK in 0.547 seconds
[0m16:23:39.525491 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:23:39.526026 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:23:39.527137 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:39.528647 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:23:39.530164 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:23:39.531235 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:39.534544 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:23:39.534544 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:23:39.534544 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:39.537687 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:23:39.537687 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:23:39.538686 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:39.540193 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:23:39.540193 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:23:39.540193 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:23:39.863922 [debug] [Thread-1 (]: SQL status: OK in 0.323 seconds
[0m16:23:39.867274 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:23:39.867822 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:23:39.876876 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:23:39.878380 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:23:39.879810 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E34798140>]}
[0m16:23:39.880483 [info ] [Thread-1 (]: 14 of 26 OK created sql table model main.fato_balanco_patrimonial .............. [[32mOK[0m in 0.93s]
[0m16:23:39.881491 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:23:39.881491 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:23:39.882651 [info ] [Thread-1 (]: 15 of 26 START sql table model main.fato_capital_prudencial .................... [RUN]
[0m16:23:39.883729 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:23:39.883729 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:23:39.886888 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:23:39.887924 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:23:39.890432 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:23:39.890432 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:23:39.891983 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:23:39.891983 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:39.892493 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:39.893001 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:23:39.893001 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:23:39.911042 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:23:39.911042 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:23:39.912550 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: ROLLBACK
[0m16:23:39.924504 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_capital_prudencial'
[0m16:23:39.924504 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:23:39.927066 [debug] [Thread-1 (]: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:23:39.927066 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E3482E360>]}
[0m16:23:39.927066 [error] [Thread-1 (]: 15 of 26 ERROR creating sql table model main.fato_capital_prudencial ........... [[31mERROR[0m in 0.04s]
[0m16:23:39.928570 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:23:39.928570 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:23:39.930081 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_capital_prudencial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^.
[0m16:23:39.930081 [info ] [Thread-1 (]: 16 of 26 START sql table model main.fato_carteira_credito_indexador ............ [RUN]
[0m16:23:39.931084 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:23:39.931084 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:23:39.936578 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:23:39.938531 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:23:39.941209 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:23:39.942713 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:23:39.942713 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:23:39.944399 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:39.944739 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:39.944739 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:23:39.945406 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:23:39.945406 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:23:39.946913 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:23:39.947481 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: ROLLBACK
[0m16:23:39.951006 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador'
[0m16:23:39.951607 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:23:39.954771 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^
[0m16:23:39.955362 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E3476F260>]}
[0m16:23:39.956626 [error] [Thread-1 (]: 16 of 26 ERROR creating sql table model main.fato_carteira_credito_indexador ... [[31mERROR[0m in 0.02s]
[0m16:23:39.957163 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:23:39.957690 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:23:39.958250 [info ] [Thread-1 (]: 17 of 26 START sql table model main.fato_carteira_credito_totais ............... [RUN]
[0m16:23:39.958797 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:23:39.959334 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^.
[0m16:23:39.959334 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:23:39.965110 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:23:39.967612 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:23:39.973193 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:23:39.974831 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:23:39.975367 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:23:39.975907 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:39.977073 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:39.977600 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:23:39.978126 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:23:39.984452 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:23:39.984452 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:23:39.985957 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: ROLLBACK
[0m16:23:39.988476 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_totais'
[0m16:23:39.988476 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:23:39.991722 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m16:23:39.992630 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E358DCEF0>]}
[0m16:23:39.993289 [error] [Thread-1 (]: 17 of 26 ERROR creating sql table model main.fato_carteira_credito_totais ...... [[31mERROR[0m in 0.03s]
[0m16:23:39.993829 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:23:39.994353 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:23:39.994881 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_totais' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^.
[0m16:23:39.995405 [info ] [Thread-1 (]: 18 of 26 START sql table model main.fato_demonstracao_resultado ................ [RUN]
[0m16:23:39.995942 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:23:39.995942 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:23:40.001792 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:23:40.004817 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:23:40.008965 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:23:40.011519 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:23:40.012559 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:23:40.013085 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:40.014176 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:40.014709 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:23:40.015782 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:23:40.018427 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT 
        codigo, 
        data_base,
        rendas_operacoes_de_credito,
        receitas_intermediacao_financeira,
        despesas_captacao,
        despesas_intermediacao_financeira,
        resultado_intermediacao_financeira,
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao_participacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:23:40.019007 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:23:40.019534 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: ROLLBACK
[0m16:23:40.024230 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_demonstracao_resultado'
[0m16:23:40.024230 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:23:40.030320 [debug] [Thread-1 (]: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m16:23:40.031381 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E35861040>]}
[0m16:23:40.033961 [error] [Thread-1 (]: 18 of 26 ERROR creating sql table model main.fato_demonstracao_resultado ....... [[31mERROR[0m in 0.04s]
[0m16:23:40.035743 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:23:40.036997 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:23:40.038035 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_demonstracao_resultado' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT".
[0m16:23:40.039106 [info ] [Thread-1 (]: 19 of 26 START sql table model main.fato_movimentacao_cambio ................... [RUN]
[0m16:23:40.040618 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:23:40.040618 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:23:40.045411 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:23:40.048107 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:23:40.052391 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:23:40.055298 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:23:40.055805 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:23:40.055805 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:40.055805 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:40.057401 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:23:40.057401 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:23:40.063591 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:23:40.065696 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:23:40.066784 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:23:40.068874 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:40.069928 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:23:40.072509 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:23:40.073638 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:40.076815 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:23:40.076815 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:23:40.078324 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:40.081342 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:23:40.081943 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:23:40.082452 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:40.084029 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:23:40.084029 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:23:40.084029 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:23:40.101206 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:23:40.105001 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:23:40.106005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:23:40.110121 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:23:40.111698 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:23:40.111698 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E358BA9C0>]}
[0m16:23:40.112704 [info ] [Thread-1 (]: 19 of 26 OK created sql table model main.fato_movimentacao_cambio .............. [[32mOK[0m in 0.07s]
[0m16:23:40.113208 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:23:40.113208 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:23:40.114214 [info ] [Thread-1 (]: 20 of 26 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:23:40.115721 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:23:40.116777 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:23:40.121677 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:23:40.123804 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:23:40.126917 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:23:40.129032 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:23:40.129550 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:23:40.129550 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:40.131301 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:40.131301 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:23:40.131301 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:23:40.168911 [debug] [Thread-1 (]: SQL status: OK in 0.036 seconds
[0m16:23:40.170002 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:23:40.170002 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:23:40.171586 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:40.173220 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:23:40.174226 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:23:40.175232 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:40.179736 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:23:40.181303 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:23:40.182588 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:40.186282 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:23:40.186807 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:23:40.187328 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:40.187956 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:23:40.188966 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:23:40.188966 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:23:40.206272 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:23:40.210211 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:23:40.210211 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:23:40.213626 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:23:40.215130 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:23:40.216762 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E358D1820>]}
[0m16:23:40.217376 [info ] [Thread-1 (]: 20 of 26 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.10s]
[0m16:23:40.217376 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:23:40.217376 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:23:40.217376 [info ] [Thread-1 (]: 21 of 26 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:23:40.219504 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:23:40.220288 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:23:40.226016 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:23:40.227222 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:23:40.230394 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:23:40.231915 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:23:40.232936 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:23:40.232936 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:40.233943 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:40.235034 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:23:40.235034 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:23:40.590162 [debug] [Thread-1 (]: SQL status: OK in 0.355 seconds
[0m16:23:40.592833 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:23:40.592833 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:23:40.594208 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:40.595347 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:23:40.596864 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:23:40.599010 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:40.602119 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:23:40.602637 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:23:40.603736 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:40.610069 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:23:40.610769 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:23:40.611776 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:40.612401 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:23:40.612401 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:23:40.613359 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:23:40.822509 [debug] [Thread-1 (]: SQL status: OK in 0.209 seconds
[0m16:23:40.824571 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:23:40.825570 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:23:40.826569 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:23:40.828601 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:23:40.829610 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E3482E2D0>]}
[0m16:23:40.830117 [info ] [Thread-1 (]: 21 of 26 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.61s]
[0m16:23:40.831125 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:23:40.831125 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:23:40.832646 [info ] [Thread-1 (]: 22 of 26 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:23:40.832646 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:23:40.832646 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:23:40.836796 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:23:40.838425 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:23:40.840477 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:23:40.842656 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:23:40.842656 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:23:40.842656 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:40.844195 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:40.844746 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:23:40.844746 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:23:40.849764 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:23:40.849764 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:23:40.849764 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: ROLLBACK
[0m16:23:40.853851 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_atividade'
[0m16:23:40.854379 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:23:40.856459 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_atividade (models\gold\fato_carteira_credito_atividade.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause
[0m16:23:40.856964 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E417B2570>]}
[0m16:23:41.913654 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:23:41.917305 [error] [Thread-1 (]: 22 of 26 ERROR creating sql table model main.fato_carteira_credito_atividade ... [[31mERROR[0m in 0.02s]
[0m16:23:41.918366 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:23:41.918894 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:23:41.919420 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_atividade' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_atividade (models\gold\fato_carteira_credito_atividade.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause.
[0m16:23:41.919950 [info ] [Thread-1 (]: 23 of 26 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:23:41.921005 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:23:41.921583 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:23:41.926148 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:23:41.927148 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:23:41.930169 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:23:41.931175 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:23:41.932700 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:23:41.932700 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:41.934270 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:41.934270 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:23:41.935964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:23:41.937988 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:23:41.937988 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:23:41.937988 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: ROLLBACK
[0m16:23:41.941258 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_porte'
[0m16:23:41.941787 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:23:41.944456 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_porte (models\gold\fato_carteira_credito_porte.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause
[0m16:23:41.944965 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E417B2510>]}
[0m16:23:41.945501 [error] [Thread-1 (]: 23 of 26 ERROR creating sql table model main.fato_carteira_credito_porte ....... [[31mERROR[0m in 0.02s]
[0m16:23:41.946028 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:23:41.946539 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:23:41.946539 [info ] [Thread-1 (]: 24 of 26 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:23:41.946539 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_porte' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_porte (models\gold\fato_carteira_credito_porte.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause.
[0m16:23:41.947546 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:23:41.947546 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:23:41.953293 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:23:41.955054 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:23:41.958830 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:23:41.959970 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:23:41.960503 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:23:41.960503 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:41.961057 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:41.961589 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:23:41.961589 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:23:41.963631 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_carteira_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:23:41.963631 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:23:41.965135 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: ROLLBACK
[0m16:23:41.967262 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_produto'
[0m16:23:41.967262 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:23:41.969268 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_produto (models\gold\fato_carteira_credito_produto.sql)
  Binder Error: Column "total_carteira_pessoa_fisica" in EXCLUDE list not found in FROM clause
[0m16:23:41.970592 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E417AB770>]}
[0m16:23:41.971598 [error] [Thread-1 (]: 24 of 26 ERROR creating sql table model main.fato_carteira_credito_produto ..... [[31mERROR[0m in 0.02s]
[0m16:23:41.972102 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:23:41.972605 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:23:41.973208 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_produto' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_produto (models\gold\fato_carteira_credito_produto.sql)
  Binder Error: Column "total_carteira_pessoa_fisica" in EXCLUDE list not found in FROM clause.
[0m16:23:41.974271 [info ] [Thread-1 (]: 25 of 26 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:23:41.974914 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:23:41.975449 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:23:41.981002 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:23:41.984238 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:23:42.063885 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:23:42.065401 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:23:42.066515 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:23:42.067828 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:42.068952 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:42.069574 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:23:42.070119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:23:42.388620 [debug] [Thread-1 (]: SQL status: OK in 0.319 seconds
[0m16:23:42.389626 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:23:42.390630 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:23:42.391134 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:42.392656 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:23:42.392656 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:23:42.394202 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:42.397801 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:23:42.397801 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito" rename to "fato_regiao_credito__dbt_backup"
[0m16:23:42.399316 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:42.403632 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:23:42.404174 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:23:42.404523 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:42.406179 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:23:42.406179 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:23:42.406179 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:23:42.417568 [debug] [Thread-1 (]: SQL status: OK in 0.011 seconds
[0m16:23:42.421893 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:23:42.422426 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:23:42.424028 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:42.425619 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:23:42.425619 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E3432E2A0>]}
[0m16:23:42.426625 [info ] [Thread-1 (]: 25 of 26 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.45s]
[0m16:23:42.426625 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:23:42.428129 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:23:42.428129 [info ] [Thread-1 (]: 26 of 26 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:23:42.429764 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:23:42.429764 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:23:42.432870 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:23:42.433876 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:23:42.438457 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:23:42.440706 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:23:42.441215 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:23:42.441881 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:23:42.443974 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:42.444544 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:23:42.444544 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:23:42.818660 [debug] [Thread-1 (]: SQL status: OK in 0.373 seconds
[0m16:23:42.819739 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:23:42.819739 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:23:42.820850 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:42.822476 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:23:42.823216 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:23:42.823821 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:42.826827 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:23:42.826827 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito" rename to "fato_risco_credito__dbt_backup"
[0m16:23:42.827831 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:23:42.829411 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:23:42.831004 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:23:42.831004 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:23:42.833539 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:23:42.834135 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:23:42.834665 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:23:42.874151 [debug] [Thread-1 (]: SQL status: OK in 0.039 seconds
[0m16:23:42.878152 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:23:42.879718 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:23:42.883015 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:23:42.885823 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:23:42.887084 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '997404ef-baaa-41fb-bba2-6ec5f41df1de', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E34424050>]}
[0m16:23:42.888217 [info ] [Thread-1 (]: 26 of 26 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.46s]
[0m16:23:42.889753 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:23:42.891349 [debug] [MainThread]: Using duckdb connection "master"
[0m16:23:42.891958 [debug] [MainThread]: On master: BEGIN
[0m16:23:42.891958 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:23:42.893017 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:23:42.894225 [debug] [MainThread]: On master: COMMIT
[0m16:23:42.894801 [debug] [MainThread]: Using duckdb connection "master"
[0m16:23:42.895327 [debug] [MainThread]: On master: COMMIT
[0m16:23:42.895327 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:23:42.895327 [debug] [MainThread]: On master: Close
[0m16:23:42.895327 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:23:42.896841 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:23:42.897430 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:23:42.897430 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_risco_credito' was properly closed.
[0m16:23:42.897430 [info ] [MainThread]: 
[0m16:23:42.898949 [info ] [MainThread]: Finished running 26 table models in 0 hours 0 minutes and 6.85 seconds (6.85s).
[0m16:23:42.902715 [debug] [MainThread]: Command end result
[0m16:23:42.938818 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:23:42.943354 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:23:42.952936 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:23:42.953994 [info ] [MainThread]: 
[0m16:23:42.954535 [info ] [MainThread]: [31mCompleted with 7 errors, 0 partial successes, and 0 warnings:[0m
[0m16:23:42.955138 [info ] [MainThread]: 
[0m16:23:42.955138 [error] [MainThread]: [31mFailure in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)[0m
[0m16:23:42.956147 [error] [MainThread]:   Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:23:42.956147 [info ] [MainThread]: 
[0m16:23:42.956147 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_capital_prudencial.sql
[0m16:23:42.957376 [info ] [MainThread]: 
[0m16:23:42.957376 [error] [MainThread]: [31mFailure in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)[0m
[0m16:23:42.957376 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^
[0m16:23:42.957376 [info ] [MainThread]: 
[0m16:23:42.958386 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_indexador.sql
[0m16:23:42.958386 [info ] [MainThread]: 
[0m16:23:42.958386 [error] [MainThread]: [31mFailure in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)[0m
[0m16:23:42.958386 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_totais (models\gold\fato_carteira_credito_totais.sql)
  Binder Error: Referenced column "total_carteira_pessoa_juridica" not found in FROM clause!
  Candidate bindings: "total_exterior_pessoa_juridica", "total_da_carteira_de_pessoa_juridica", "transporte_vencido_a_partir_15_dias", "agricultura_vencido_a_partir_15_dias", "construcao_vencido_a_partir_15_dias"
  
  LINE 36:         total_carteira_pessoa_juridica as total_carteira_pj,
                   ^
[0m16:23:42.958386 [info ] [MainThread]: 
[0m16:23:42.958386 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_totais.sql
[0m16:23:42.959895 [info ] [MainThread]: 
[0m16:23:42.959895 [error] [MainThread]: [31mFailure in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)[0m
[0m16:23:42.960454 [error] [MainThread]:   Runtime Error in model fato_demonstracao_resultado (models\gold\fato_demonstracao_resultado.sql)
  Parser Error: syntax error at or near "SELECT"
[0m16:23:42.960454 [info ] [MainThread]: 
[0m16:23:42.960454 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_demonstracao_resultado.sql
[0m16:23:42.960454 [info ] [MainThread]: 
[0m16:23:42.961463 [error] [MainThread]: [31mFailure in model fato_carteira_credito_atividade (models\gold\fato_carteira_credito_atividade.sql)[0m
[0m16:23:42.961463 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_atividade (models\gold\fato_carteira_credito_atividade.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause
[0m16:23:42.961463 [info ] [MainThread]: 
[0m16:23:42.961463 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_atividade.sql
[0m16:23:42.961463 [info ] [MainThread]: 
[0m16:23:42.961463 [error] [MainThread]: [31mFailure in model fato_carteira_credito_porte (models\gold\fato_carteira_credito_porte.sql)[0m
[0m16:23:42.961463 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_porte (models\gold\fato_carteira_credito_porte.sql)
  Binder Error: Column "total_carteira_pessoa_juridica" in EXCLUDE list not found in FROM clause
[0m16:23:42.961463 [info ] [MainThread]: 
[0m16:23:42.963780 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_porte.sql
[0m16:23:42.964579 [info ] [MainThread]: 
[0m16:23:42.965104 [error] [MainThread]: [31mFailure in model fato_carteira_credito_produto (models\gold\fato_carteira_credito_produto.sql)[0m
[0m16:23:42.965104 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_produto (models\gold\fato_carteira_credito_produto.sql)
  Binder Error: Column "total_carteira_pessoa_fisica" in EXCLUDE list not found in FROM clause
[0m16:23:42.965104 [info ] [MainThread]: 
[0m16:23:42.965640 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_produto.sql
[0m16:23:42.965640 [info ] [MainThread]: 
[0m16:23:42.966176 [info ] [MainThread]: Done. PASS=19 WARN=0 ERROR=7 SKIP=0 NO-OP=0 TOTAL=26
[0m16:23:42.966698 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:23:42.967776 [debug] [MainThread]: Command `dbt run` failed at 16:23:42.967776 after 11.33 seconds
[0m16:23:42.969062 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E32997B90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E32107230>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000027E32106F00>]}
[0m16:23:42.970685 [debug] [MainThread]: Flushing usage events
[0m16:23:43.578546 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:27:48.460580 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E496B4D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8DF451A90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E2F99D30>]}


============================== 16:27:48.467914 | 40ea87fb-c696-4478-ac4f-60430d6e85eb ==============================
[0m16:27:48.467914 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:27:48.470059 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'False', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt run --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:27:48.836764 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E4A77BC0>]}
[0m16:27:48.922559 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E694BC20>]}
[0m16:27:48.927902 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:27:49.287750 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:27:49.289848 [debug] [MainThread]: Partial parsing not enabled
[0m16:27:51.881393 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:27:51.883463 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E6F92D20>]}
[0m16:27:52.694047 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:27:52.708422 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E72E5940>]}
[0m16:27:52.849254 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:27:52.855126 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:27:52.919707 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E712F950>]}
[0m16:27:52.920272 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:27:52.921286 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E70B0260>]}
[0m16:27:52.924759 [info ] [MainThread]: 
[0m16:27:52.925758 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:27:52.926760 [info ] [MainThread]: 
[0m16:27:52.928275 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:27:52.935710 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:27:53.235810 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:27:53.236818 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:27:53.237326 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:27:54.260872 [debug] [ThreadPool]: SQL status: OK in 1.023 seconds
[0m16:27:54.264413 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:27:54.266424 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:27:54.267445 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:27:54.285673 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:27:54.288677 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:27:54.289670 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:27:54.292689 [debug] [ThreadPool]: SQL status: OK in 0.003 seconds
[0m16:27:54.295715 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:27:54.296716 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:27:54.296716 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:27:54.298233 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:27:54.298233 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:27:54.324012 [debug] [ThreadPool]: SQL status: OK in 0.026 seconds
[0m16:27:54.327026 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:27:54.329030 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:27:54.329030 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:27:54.330026 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:27:54.330026 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:27:54.388778 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:27:54.423620 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:27:54.424617 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:27:54.424617 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:27:54.425626 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:27:54.426630 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:27:54.426630 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:27:54.474329 [debug] [ThreadPool]: SQL status: OK in 0.047 seconds
[0m16:27:54.477409 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:27:54.481430 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:27:54.482955 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:27:54.489492 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E712C6B0>]}
[0m16:27:54.490761 [debug] [MainThread]: Using duckdb connection "master"
[0m16:27:54.490761 [debug] [MainThread]: On master: BEGIN
[0m16:27:54.491776 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:27:54.492779 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:27:54.493617 [debug] [MainThread]: On master: COMMIT
[0m16:27:54.494300 [debug] [MainThread]: Using duckdb connection "master"
[0m16:27:54.494809 [debug] [MainThread]: On master: COMMIT
[0m16:27:54.495835 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:27:54.496820 [debug] [MainThread]: On master: Close
[0m16:27:54.584750 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:27:54.585748 [info ] [Thread-1 (]: 1 of 26 START sql table model main.dim_atividade ............................... [RUN]
[0m16:27:54.586761 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_atividade'
[0m16:27:54.588761 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:27:54.599436 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:27:54.601439 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:27:54.653364 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:27:54.655507 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:27:54.656406 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:27:54.656406 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:27:54.657585 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.657585 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:27:54.657585 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:27:54.665687 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:27:54.671328 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:27:54.671328 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:27:54.672836 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.676358 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:27:54.677369 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:27:54.681076 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:27:54.694531 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:27:54.697053 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade" rename to "dim_atividade__dbt_backup"
[0m16:27:54.701293 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:27:54.706604 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:27:54.707618 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:27:54.710091 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.745024 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:27:54.746037 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:27:54.747039 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:27:54.752626 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:27:54.770723 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:27:54.771723 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:27:54.776754 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:27:54.781757 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:27:54.787879 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E71C95E0>]}
[0m16:27:54.788891 [info ] [Thread-1 (]: 1 of 26 OK created sql table model main.dim_atividade .......................... [[32mOK[0m in 0.20s]
[0m16:27:54.792636 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:27:54.793647 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:27:54.794651 [info ] [Thread-1 (]: 2 of 26 START sql table model main.dim_classe_instituicao ...................... [RUN]
[0m16:27:54.796661 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:27:54.797663 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:27:54.802726 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:27:54.805414 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:27:54.811943 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:27:54.813156 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:27:54.814679 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:27:54.815692 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:54.816798 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.817798 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:27:54.818852 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:27:54.822747 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:27:54.824554 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:27:54.825566 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:27:54.826565 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.828564 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:27:54.829079 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:27:54.831186 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.835926 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:27:54.836935 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao" rename to "dim_classe_instituicao__dbt_backup"
[0m16:27:54.837984 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:54.842146 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:27:54.842677 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:27:54.842677 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:54.845446 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:27:54.845446 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:27:54.846958 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:27:54.847594 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.850357 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:27:54.851358 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:27:54.851949 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.854234 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:27:54.854234 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E774B6B0>]}
[0m16:27:54.855750 [info ] [Thread-1 (]: 2 of 26 OK created sql table model main.dim_classe_instituicao ................. [[32mOK[0m in 0.06s]
[0m16:27:54.856814 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:27:54.857887 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:27:54.858899 [info ] [Thread-1 (]: 3 of 26 START sql table model main.dim_consolidado ............................. [RUN]
[0m16:27:54.858899 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:27:54.859898 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:27:54.863721 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:27:54.865228 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:27:54.869003 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:27:54.870298 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:27:54.871819 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:27:54.872341 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:54.872857 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.872857 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:27:54.873867 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:27:54.875866 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.876867 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:27:54.879403 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:27:54.879403 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.881006 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:27:54.882533 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:27:54.882533 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.889791 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:27:54.890802 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado" rename to "dim_consolidado__dbt_backup"
[0m16:27:54.891802 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.895517 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:27:54.895517 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:27:54.895517 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:54.897023 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:27:54.897023 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:27:54.898544 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:27:54.899555 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.903067 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:27:54.903067 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:27:54.905202 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:27:54.907626 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:27:54.908637 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E97A6A20>]}
[0m16:27:54.908637 [info ] [Thread-1 (]: 3 of 26 OK created sql table model main.dim_consolidado ........................ [[32mOK[0m in 0.05s]
[0m16:27:54.910156 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:27:54.910156 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:27:54.910156 [info ] [Thread-1 (]: 4 of 26 START sql table model main.dim_controle ................................ [RUN]
[0m16:27:54.911771 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:27:54.912785 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:27:54.915644 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:27:54.917302 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:27:54.921368 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:27:54.923696 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:27:54.923696 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:27:54.923696 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:54.924698 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.924698 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:27:54.924698 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:27:54.927711 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:27:54.929360 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:27:54.929360 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:27:54.930368 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.933058 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:27:54.933058 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:27:54.934590 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.937781 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:27:54.938783 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle" rename to "dim_controle__dbt_backup"
[0m16:27:54.940797 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.945386 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:27:54.945386 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:27:54.947495 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.948114 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:27:54.949640 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:27:54.949640 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:27:54.951844 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.954716 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:27:54.954716 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:27:54.956335 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.958477 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:27:54.958477 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E772F5F0>]}
[0m16:27:54.958477 [info ] [Thread-1 (]: 4 of 26 OK created sql table model main.dim_controle ........................... [[32mOK[0m in 0.05s]
[0m16:27:54.960585 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:27:54.961598 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:27:54.962610 [info ] [Thread-1 (]: 5 of 26 START sql table model main.dim_faixa_vencimento ........................ [RUN]
[0m16:27:54.962610 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:27:54.963622 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:27:54.968038 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:27:54.969679 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:27:54.974008 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:27:54.976018 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:27:54.977006 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:27:54.978007 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:54.978516 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.979533 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:27:54.980236 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:27:54.981757 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.982766 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:27:54.982766 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:27:54.984389 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.985998 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:27:54.987010 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:27:54.988094 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:54.992683 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:27:54.992683 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m16:27:54.994838 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:54.999104 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:27:54.999619 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:27:54.999619 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.001226 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:27:55.001842 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:27:55.002675 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:27:55.004912 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.007621 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:27:55.007621 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:27:55.008636 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.011947 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:27:55.012475 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E97D5070>]}
[0m16:27:55.012997 [info ] [Thread-1 (]: 5 of 26 OK created sql table model main.dim_faixa_vencimento ................... [[32mOK[0m in 0.05s]
[0m16:27:55.015006 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:27:55.015629 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:27:55.017151 [info ] [Thread-1 (]: 6 of 26 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:27:55.018165 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_instituicao)
[0m16:27:55.018165 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:27:55.024820 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:27:55.026927 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:27:55.031192 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:27:55.032715 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:27:55.034309 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:27:55.034309 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:55.034309 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.035896 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:27:55.037425 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:27:55.339631 [debug] [Thread-1 (]: SQL status: OK in 0.302 seconds
[0m16:27:55.341149 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:27:55.341149 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:27:55.343342 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.345361 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:27:55.345361 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:27:55.346868 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.351515 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:27:55.352070 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:27:55.352659 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.357299 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:27:55.358349 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:27:55.359856 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.361968 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:27:55.362478 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:27:55.362478 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:27:55.371302 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:27:55.374853 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:27:55.374853 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:27:55.376872 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.379379 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:27:55.380960 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E772FA10>]}
[0m16:27:55.382482 [info ] [Thread-1 (]: 6 of 26 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.36s]
[0m16:27:55.383018 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:27:55.384538 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:27:55.386047 [info ] [Thread-1 (]: 7 of 26 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:27:55.387060 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:27:55.387060 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:27:55.393158 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:27:55.395676 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:27:55.400830 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:27:55.401895 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:27:55.402903 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:27:55.403408 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:55.403963 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.404508 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:27:55.404508 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m16:27:55.456754 [debug] [Thread-1 (]: SQL status: OK in 0.051 seconds
[0m16:27:55.458277 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:27:55.458277 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:27:55.460486 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.461568 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:27:55.462578 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:27:55.463085 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.466607 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:27:55.467620 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:27:55.469229 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.472786 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:27:55.472786 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:27:55.473796 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.474799 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:27:55.475809 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:27:55.475809 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:27:55.478227 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:27:55.483002 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:27:55.484032 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:27:55.486040 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:27:55.487050 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:27:55.488057 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E772F860>]}
[0m16:27:55.489059 [info ] [Thread-1 (]: 7 of 26 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.10s]
[0m16:27:55.490568 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:27:55.490568 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:27:55.492106 [info ] [Thread-1 (]: 8 of 26 START sql table model main.dim_porte ................................... [RUN]
[0m16:27:55.492763 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_porte)
[0m16:27:55.494356 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:27:55.497459 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:27:55.499511 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:27:55.503711 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:27:55.505228 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:27:55.505228 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:27:55.506234 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:55.507253 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.507798 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:27:55.507798 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:27:55.510017 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.511796 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:27:55.512810 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:27:55.513898 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.515422 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:27:55.516431 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:27:55.517450 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.520029 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:27:55.521640 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte" rename to "dim_porte__dbt_backup"
[0m16:27:55.521640 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.526687 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:27:55.527689 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:27:55.528689 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.532823 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:27:55.533357 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:27:55.533357 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:27:55.534890 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.538922 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:27:55.539920 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:27:55.542515 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.544558 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:27:55.545576 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E778F680>]}
[0m16:27:55.545576 [info ] [Thread-1 (]: 8 of 26 OK created sql table model main.dim_porte .............................. [[32mOK[0m in 0.05s]
[0m16:27:55.546573 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:27:55.547089 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:27:55.548112 [info ] [Thread-1 (]: 9 of 26 START sql table model main.dim_produto_credito ......................... [RUN]
[0m16:27:55.548621 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:27:55.548621 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:27:55.552836 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:27:55.554696 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:27:55.557296 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:27:55.558710 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:27:55.558710 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:27:55.559709 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:55.560217 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.560217 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:27:55.560217 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:27:55.561832 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.562840 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:27:55.563859 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:27:55.563859 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.566340 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:27:55.566340 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:27:55.567539 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.570320 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:27:55.571329 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m16:27:55.571329 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.575016 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:27:55.575016 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:27:55.576018 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.577020 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:27:55.578037 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:27:55.578037 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:27:55.579918 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.582487 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:27:55.582487 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:27:55.584057 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.586068 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:27:55.586582 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E7730050>]}
[0m16:27:55.587091 [info ] [Thread-1 (]: 9 of 26 OK created sql table model main.dim_produto_credito .................... [[32mOK[0m in 0.04s]
[0m16:27:55.588104 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:27:55.588104 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:27:55.589103 [info ] [Thread-1 (]: 10 of 26 START sql table model main.dim_regiao ................................. [RUN]
[0m16:27:55.590109 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:27:55.590109 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:27:55.594319 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:27:55.594920 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:27:55.597542 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:27:55.599446 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:27:55.600974 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:27:55.601480 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:55.602076 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.602602 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:27:55.602602 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:27:55.604203 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.604725 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:27:55.604725 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:27:55.604725 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.607320 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:27:55.607320 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:27:55.608347 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.611435 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:27:55.611435 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao" rename to "dim_regiao__dbt_backup"
[0m16:27:55.611435 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.616682 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:27:55.616682 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:27:55.617275 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.618852 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:27:55.618852 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:27:55.619429 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:27:55.619991 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.622554 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:27:55.623061 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:27:55.624069 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.626079 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:27:55.627134 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E980BF20>]}
[0m16:27:55.627134 [info ] [Thread-1 (]: 10 of 26 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.04s]
[0m16:27:55.628138 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:27:55.628138 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:27:55.628138 [info ] [Thread-1 (]: 11 of 26 START sql table model main.dim_risco .................................. [RUN]
[0m16:27:55.629850 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:27:55.629850 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:27:55.632916 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:27:55.633925 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:27:55.639201 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:27:55.640235 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:27:55.640235 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:27:55.641277 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:55.641277 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.642288 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:27:55.642794 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:27:55.642794 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.644348 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:27:55.645384 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:27:55.645384 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.646895 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:27:55.647537 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:27:55.649547 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.652782 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:27:55.653307 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco" rename to "dim_risco__dbt_backup"
[0m16:27:55.653872 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.656031 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:27:55.656031 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:27:55.657713 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.658721 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:27:55.658721 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:27:55.658721 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:27:55.660228 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.663760 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:27:55.663760 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:27:55.665262 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.666779 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:27:55.667306 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E7246120>]}
[0m16:27:55.667306 [info ] [Thread-1 (]: 11 of 26 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.04s]
[0m16:27:55.668324 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:27:55.668324 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:27:55.669326 [info ] [Thread-1 (]: 12 of 26 START sql table model main.dim_segmento ............................... [RUN]
[0m16:27:55.670477 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:27:55.670477 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:27:55.673152 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:27:55.674165 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:27:55.677673 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:27:55.679397 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:27:55.681006 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:27:55.681006 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:55.681006 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.681006 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:27:55.682553 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:27:55.685135 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:27:55.686128 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:27:55.686641 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:27:55.686641 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.688212 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:27:55.689269 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:27:55.689799 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.692314 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:27:55.692856 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento" rename to "dim_segmento__dbt_backup"
[0m16:27:55.692856 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.696537 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:27:55.696537 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:27:55.697678 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.699647 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:27:55.699647 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:27:55.701238 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:27:55.702793 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.705039 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:27:55.705039 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:27:55.706047 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.707710 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:27:55.708720 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E982CA70>]}
[0m16:27:55.710228 [info ] [Thread-1 (]: 12 of 26 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.04s]
[0m16:27:55.711545 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:27:55.712557 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:27:55.713594 [info ] [Thread-1 (]: 13 of 26 START sql table model main.dim_tempo .................................. [RUN]
[0m16:27:55.713594 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:27:55.714603 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:27:55.717482 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:27:55.720229 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:27:55.723277 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:27:55.725367 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:27:55.725367 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:27:55.725367 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:55.726492 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.726492 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:27:55.726492 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:27:55.744695 [debug] [Thread-1 (]: SQL status: OK in 0.017 seconds
[0m16:27:55.746705 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:27:55.747213 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:27:55.748229 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.749753 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:27:55.749753 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:27:55.749753 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.753717 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:27:55.754225 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:27:55.754732 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:55.757297 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:27:55.758458 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:27:55.760571 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.761582 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:27:55.762641 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:27:55.762641 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:27:55.764691 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:27:55.767343 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:27:55.767343 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:27:55.769606 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.770257 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:27:55.771780 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E772F0B0>]}
[0m16:27:55.772285 [info ] [Thread-1 (]: 13 of 26 OK created sql table model main.dim_tempo ............................. [[32mOK[0m in 0.06s]
[0m16:27:55.772806 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:27:55.773816 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:27:55.773816 [info ] [Thread-1 (]: 14 of 26 START sql table model main.fato_balanco_patrimonial ................... [RUN]
[0m16:27:55.774825 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:27:55.775816 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:27:55.782938 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:27:55.784457 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:27:55.787157 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:27:55.788167 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:27:55.788167 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:27:55.789674 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:55.790193 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:55.790193 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:27:55.791200 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:27:56.428079 [debug] [Thread-1 (]: SQL status: OK in 0.637 seconds
[0m16:27:56.428079 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:27:56.429716 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:27:56.429716 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:56.431298 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:27:56.431298 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:27:56.432832 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:56.438653 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:27:56.440163 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:27:56.441188 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:56.444895 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:27:56.444895 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:27:56.445906 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:56.448427 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:27:56.448427 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:27:56.449427 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:27:56.664656 [debug] [Thread-1 (]: SQL status: OK in 0.215 seconds
[0m16:27:56.667465 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:27:56.669286 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:27:56.672601 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:27:56.674190 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:27:56.674190 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E9795B20>]}
[0m16:27:56.675190 [info ] [Thread-1 (]: 14 of 26 OK created sql table model main.fato_balanco_patrimonial .............. [[32mOK[0m in 0.90s]
[0m16:27:56.676188 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:27:56.677193 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:27:56.678193 [info ] [Thread-1 (]: 15 of 26 START sql table model main.fato_capital_prudencial .................... [RUN]
[0m16:27:56.678193 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:27:56.678193 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:27:56.684055 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:27:56.685259 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:27:56.688301 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:27:56.689809 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:27:56.690346 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:27:56.690346 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:56.690346 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:56.691875 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:27:56.691875 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:27:56.703011 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:27:56.704119 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:27:56.704711 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: ROLLBACK
[0m16:27:56.717419 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_capital_prudencial'
[0m16:27:56.719069 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:27:56.721784 [debug] [Thread-1 (]: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:27:56.722289 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E7742A20>]}
[0m16:27:56.722804 [error] [Thread-1 (]: 15 of 26 ERROR creating sql table model main.fato_capital_prudencial ........... [[31mERROR[0m in 0.04s]
[0m16:27:56.723813 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:27:56.723813 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:27:56.724814 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_capital_prudencial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^.
[0m16:27:56.725815 [info ] [Thread-1 (]: 16 of 26 START sql table model main.fato_carteira_credito_indexador ............ [RUN]
[0m16:27:56.726814 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:27:56.727813 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:27:56.733934 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:27:56.734444 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:27:56.740110 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:27:56.742155 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:27:56.742674 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:27:56.742674 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:56.742674 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:56.744264 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:27:56.744264 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:27:56.746852 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:27:56.747360 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:27:56.747360 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: ROLLBACK
[0m16:27:56.750891 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador'
[0m16:27:56.751471 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:27:56.754691 [debug] [Thread-1 (]: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^
[0m16:27:56.754691 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E778A840>]}
[0m16:27:56.756219 [error] [Thread-1 (]: 16 of 26 ERROR creating sql table model main.fato_carteira_credito_indexador ... [[31mERROR[0m in 0.03s]
[0m16:27:56.756219 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:27:56.757226 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:27:56.757226 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_indexador' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^.
[0m16:27:56.757226 [info ] [Thread-1 (]: 17 of 26 START sql table model main.fato_carteira_credito_totais ............... [RUN]
[0m16:27:56.758310 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:27:56.758310 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:27:56.765644 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:27:56.767169 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:27:56.770380 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:27:56.771386 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:27:56.771386 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:27:56.772983 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:56.774240 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:56.774240 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:27:56.775425 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:27:56.853702 [debug] [Thread-1 (]: SQL status: OK in 0.077 seconds
[0m16:27:56.858597 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:27:56.858597 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:27:56.858597 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:56.860105 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:27:56.861740 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:27:56.861740 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:27:56.882603 [debug] [Thread-1 (]: SQL status: OK in 0.021 seconds
[0m16:27:56.888722 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:27:56.889718 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:27:56.889718 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:56.892568 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:27:56.893093 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E778E2D0>]}
[0m16:27:56.894609 [info ] [Thread-1 (]: 17 of 26 OK created sql table model main.fato_carteira_credito_totais .......... [[32mOK[0m in 0.13s]
[0m16:27:56.895618 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:27:56.895618 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:27:56.897128 [info ] [Thread-1 (]: 18 of 26 START sql table model main.fato_demonstracao_resultado ................ [RUN]
[0m16:27:56.898137 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:27:56.899139 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:27:56.905225 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:27:56.906239 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:27:56.910609 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:27:56.912840 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:27:56.912840 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:27:56.913852 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:56.914852 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:56.914852 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:27:56.915362 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:27:57.574102 [debug] [Thread-1 (]: SQL status: OK in 0.658 seconds
[0m16:27:57.578109 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:27:57.579884 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:27:57.580894 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:57.580894 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:27:57.582542 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:27:57.582542 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:27:57.789290 [debug] [Thread-1 (]: SQL status: OK in 0.205 seconds
[0m16:27:57.793046 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:27:57.794057 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:27:57.796176 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:57.799284 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:27:57.800338 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E97CEBA0>]}
[0m16:27:57.802385 [info ] [Thread-1 (]: 18 of 26 OK created sql table model main.fato_demonstracao_resultado ........... [[32mOK[0m in 0.90s]
[0m16:27:57.803397 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:27:57.804439 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:27:57.804958 [info ] [Thread-1 (]: 19 of 26 START sql table model main.fato_movimentacao_cambio ................... [RUN]
[0m16:27:57.806209 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:27:57.806209 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:27:57.813654 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:27:57.815339 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:27:57.825290 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:27:57.827820 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:27:57.829909 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:27:57.831452 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:57.833652 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:27:57.835175 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:27:57.836215 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:27:57.850197 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:27:57.851773 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:27:57.853295 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:27:57.855482 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:57.860047 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:27:57.860576 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:27:57.862357 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:57.869102 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:27:57.870385 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:27:57.872963 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:57.878273 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:27:57.879857 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:27:57.881727 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:57.884643 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:27:57.884643 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:27:57.886169 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:27:57.892928 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:27:57.896010 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:27:57.896010 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:27:57.897021 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:57.899382 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:27:57.900391 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E9797800>]}
[0m16:27:57.900901 [info ] [Thread-1 (]: 19 of 26 OK created sql table model main.fato_movimentacao_cambio .............. [[32mOK[0m in 0.09s]
[0m16:27:57.902015 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:27:57.902015 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:27:57.902544 [info ] [Thread-1 (]: 20 of 26 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:27:57.903553 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:27:57.904224 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:27:57.909114 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:27:57.910631 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:27:57.915214 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:27:57.917255 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:27:57.917774 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:27:57.917774 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:57.917774 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:57.917774 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:27:57.919309 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:27:57.958369 [debug] [Thread-1 (]: SQL status: OK in 0.039 seconds
[0m16:27:57.961443 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:27:57.961955 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:27:57.963487 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:57.965065 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:27:57.966038 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:27:57.968116 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:57.972495 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:27:57.973008 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:27:57.974020 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:57.978178 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:27:57.979202 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:27:57.979724 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:57.981299 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:27:57.982315 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:27:57.982315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:27:57.992228 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:27:57.994284 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:27:57.994879 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:27:57.996510 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:57.998046 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:27:57.998046 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E7258F50>]}
[0m16:27:57.998046 [info ] [Thread-1 (]: 20 of 26 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.09s]
[0m16:27:57.999602 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:27:57.999602 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:27:58.001165 [info ] [Thread-1 (]: 21 of 26 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:27:58.002386 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:27:58.003463 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:27:58.009147 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:27:58.012265 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:27:58.016408 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:27:58.018462 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:27:58.018971 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:27:58.019544 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:58.020070 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:58.020070 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:27:58.020070 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:27:58.471753 [debug] [Thread-1 (]: SQL status: OK in 0.450 seconds
[0m16:27:58.473338 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:27:58.473338 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:27:58.477915 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:58.479523 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:27:58.479523 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:27:58.483551 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:58.490953 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:27:58.490953 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:27:58.493277 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:58.499267 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:27:58.499267 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:27:58.502702 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:58.504223 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:27:58.505234 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:27:58.506301 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:27:58.744995 [debug] [Thread-1 (]: SQL status: OK in 0.238 seconds
[0m16:27:58.748227 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:27:58.751456 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:27:58.755097 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:27:58.756648 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:27:58.757188 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E7743C20>]}
[0m16:27:58.758211 [info ] [Thread-1 (]: 21 of 26 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.75s]
[0m16:27:58.759735 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:27:58.760263 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:27:58.761385 [info ] [Thread-1 (]: 22 of 26 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:27:58.761911 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:27:58.762932 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:27:58.767641 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:27:58.769404 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:27:58.773071 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:27:58.774592 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:27:58.775602 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:27:58.776390 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:58.777910 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:58.777910 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:27:58.778923 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:27:58.829483 [debug] [Thread-1 (]: SQL status: OK in 0.050 seconds
[0m16:27:58.832570 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:27:58.832570 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:27:58.834162 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:58.835772 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:27:58.836784 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:27:58.837295 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:27:58.840018 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:27:58.846397 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:27:58.846927 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:27:58.848358 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:27:58.851024 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:27:58.853777 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8F56B2B10>]}
[0m16:27:59.823460 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:27:59.826724 [info ] [Thread-1 (]: 22 of 26 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 0.09s]
[0m16:27:59.827782 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:27:59.827782 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:27:59.828865 [info ] [Thread-1 (]: 23 of 26 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:27:59.829395 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:27:59.831004 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:27:59.932962 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:27:59.935371 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:27:59.940371 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:27:59.942972 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:27:59.943754 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:27:59.944270 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:27:59.944903 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:27:59.945433 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:27:59.945991 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:28:00.179194 [debug] [Thread-1 (]: SQL status: OK in 0.234 seconds
[0m16:28:00.183847 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:28:00.184783 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:28:00.186537 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:28:00.187660 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:28:00.188576 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:28:00.188576 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:28:00.196579 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:28:00.199623 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:28:00.199623 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:28:00.201146 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:28:00.202885 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:28:00.205034 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E981FB60>]}
[0m16:28:00.207463 [info ] [Thread-1 (]: 23 of 26 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.37s]
[0m16:28:00.209657 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:28:00.211222 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:28:00.212775 [info ] [Thread-1 (]: 24 of 26 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:28:00.213317 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:28:00.213906 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:28:00.220972 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:28:00.223476 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:28:00.228309 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:28:00.231012 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:28:00.232604 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:28:00.233509 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:28:00.235122 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:28:00.235664 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:28:00.236185 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:28:00.358673 [debug] [Thread-1 (]: SQL status: OK in 0.122 seconds
[0m16:28:00.368557 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:28:00.369119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:28:00.370857 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:28:00.374649 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:28:00.375048 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:28:00.375556 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:28:00.379056 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:28:00.383430 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:28:00.383949 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:28:00.384961 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:28:00.386507 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:28:00.388890 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E74A0C80>]}
[0m16:28:00.390412 [info ] [Thread-1 (]: 24 of 26 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 0.18s]
[0m16:28:00.391960 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:28:00.393015 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:28:00.393883 [info ] [Thread-1 (]: 25 of 26 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:28:00.394990 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:28:00.395516 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:28:00.400916 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:28:00.402954 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:28:00.410448 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:28:00.413005 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:28:00.414020 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:28:00.415371 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:28:00.415371 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:28:00.416389 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:28:00.416901 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:28:00.785124 [debug] [Thread-1 (]: SQL status: OK in 0.368 seconds
[0m16:28:00.786638 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:28:00.786638 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:28:00.788596 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:28:00.789898 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:28:00.789898 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:28:00.792048 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:28:00.794605 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:28:00.796226 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito" rename to "fato_regiao_credito__dbt_backup"
[0m16:28:00.797359 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:28:00.803184 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:28:00.804178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:28:00.805400 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:28:00.807041 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:28:00.807041 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:28:00.807041 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:28:00.820028 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:28:00.822085 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:28:00.822619 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:28:00.825094 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:28:00.826695 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:28:00.828235 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E7758140>]}
[0m16:28:00.828235 [info ] [Thread-1 (]: 25 of 26 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.43s]
[0m16:28:00.831320 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:28:00.831320 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:28:00.831320 [info ] [Thread-1 (]: 26 of 26 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:28:00.832857 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:28:00.833868 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:28:00.839597 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:28:00.840652 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:28:00.845435 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:28:00.847062 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:28:00.847062 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:28:00.847610 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:28:00.848138 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:28:00.848138 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:28:00.848138 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:28:01.244165 [debug] [Thread-1 (]: SQL status: OK in 0.395 seconds
[0m16:28:01.245216 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:28:01.245216 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:28:01.246651 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:28:01.247382 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:28:01.247382 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:28:01.249482 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:28:01.252009 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:28:01.252535 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito" rename to "fato_risco_credito__dbt_backup"
[0m16:28:01.253544 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:28:01.257890 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:28:01.257890 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:28:01.259512 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:28:01.261056 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:28:01.261568 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:28:01.262582 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:28:01.323944 [debug] [Thread-1 (]: SQL status: OK in 0.062 seconds
[0m16:28:01.329611 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:28:01.330626 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:28:01.333862 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:28:01.335317 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:28:01.335859 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '40ea87fb-c696-4478-ac4f-60430d6e85eb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8F56B2C30>]}
[0m16:28:01.337380 [info ] [Thread-1 (]: 26 of 26 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.50s]
[0m16:28:01.338449 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:28:01.339969 [debug] [MainThread]: Using duckdb connection "master"
[0m16:28:01.339969 [debug] [MainThread]: On master: BEGIN
[0m16:28:01.339969 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:28:01.341577 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:28:01.341577 [debug] [MainThread]: On master: COMMIT
[0m16:28:01.342128 [debug] [MainThread]: Using duckdb connection "master"
[0m16:28:01.342128 [debug] [MainThread]: On master: COMMIT
[0m16:28:01.342675 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:28:01.342675 [debug] [MainThread]: On master: Close
[0m16:28:01.342675 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:28:01.342675 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:28:01.342675 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:28:01.344244 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_risco_credito' was properly closed.
[0m16:28:01.344244 [info ] [MainThread]: 
[0m16:28:01.344835 [info ] [MainThread]: Finished running 26 table models in 0 hours 0 minutes and 8.42 seconds (8.42s).
[0m16:28:01.347535 [debug] [MainThread]: Command end result
[0m16:28:01.453184 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:28:01.458951 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:28:01.483082 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:28:01.484092 [info ] [MainThread]: 
[0m16:28:01.484092 [info ] [MainThread]: [31mCompleted with 2 errors, 0 partial successes, and 0 warnings:[0m
[0m16:28:01.487378 [info ] [MainThread]: 
[0m16:28:01.488905 [error] [MainThread]: [31mFailure in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)[0m
[0m16:28:01.490821 [error] [MainThread]:   Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:28:01.492342 [info ] [MainThread]: 
[0m16:28:01.493397 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_capital_prudencial.sql
[0m16:28:01.493397 [info ] [MainThread]: 
[0m16:28:01.494978 [error] [MainThread]: [31mFailure in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)[0m
[0m16:28:01.496576 [error] [MainThread]:   Runtime Error in model fato_carteira_credito_indexador (models\gold\fato_carteira_credito_indexador.sql)
  Binder Error: Referenced column "tlp" not found in FROM clause!
  Candidate bindings: "tjlp", "total_geral", "total_exterior", "tipo_de_controle", "tipo_de_consolidacao"
  
  LINE 86:     tlp,
               ^
[0m16:28:01.499642 [info ] [MainThread]: 
[0m16:28:01.501266 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_carteira_credito_indexador.sql
[0m16:28:01.501808 [info ] [MainThread]: 
[0m16:28:01.504208 [info ] [MainThread]: Done. PASS=24 WARN=0 ERROR=2 SKIP=0 NO-OP=0 TOTAL=26
[0m16:28:01.506340 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:28:01.507588 [debug] [MainThread]: Command `dbt run` failed at 16:28:01.507588 after 13.23 seconds
[0m16:28:01.509169 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E522F440>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E4A50530>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C8E54D5A30>]}
[0m16:28:01.510695 [debug] [MainThread]: Flushing usage events
[0m16:28:02.129527 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:29:08.430401 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DD0FC6E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DD0C2390>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DD0C16D0>]}


============================== 16:29:08.434202 | 0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec ==============================
[0m16:29:08.434202 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:29:08.436751 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'False', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt run --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:29:08.720321 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DD9DAC90>]}
[0m16:29:08.781134 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DEBA2330>]}
[0m16:29:08.784280 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:29:09.085596 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:29:09.087187 [debug] [MainThread]: Partial parsing not enabled
[0m16:29:10.876804 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:29:10.890724 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DEE18F20>]}
[0m16:29:11.631053 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:29:11.642657 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF240A40>]}
[0m16:29:11.751659 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:29:11.754616 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:29:11.823131 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF263800>]}
[0m16:29:11.823131 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:29:11.825141 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF108350>]}
[0m16:29:11.828168 [info ] [MainThread]: 
[0m16:29:11.828168 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:29:11.829873 [info ] [MainThread]: 
[0m16:29:11.829873 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:29:11.837485 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:29:12.038764 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:29:12.039764 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:29:12.039764 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:29:12.893087 [debug] [ThreadPool]: SQL status: OK in 0.853 seconds
[0m16:29:12.894702 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:29:12.895776 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:29:12.896318 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:29:12.902820 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:29:12.903353 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:29:12.903940 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:29:12.904512 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:29:12.905109 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:29:12.906117 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:29:12.906117 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:29:12.906117 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:29:12.906117 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:29:12.907204 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:29:12.908517 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:29:12.908517 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:29:12.908517 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:29:12.908517 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:29:12.910025 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:29:12.912653 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:29:12.919472 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:29:12.920679 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:29:12.921245 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:29:12.922357 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:29:12.922879 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:29:12.922879 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:29:12.937759 [debug] [ThreadPool]: SQL status: OK in 0.014 seconds
[0m16:29:12.939910 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:29:12.942038 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:29:12.942577 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:29:12.948474 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF511070>]}
[0m16:29:12.948474 [debug] [MainThread]: Using duckdb connection "master"
[0m16:29:12.948474 [debug] [MainThread]: On master: BEGIN
[0m16:29:12.949475 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:29:12.949475 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:29:12.951124 [debug] [MainThread]: On master: COMMIT
[0m16:29:12.951124 [debug] [MainThread]: Using duckdb connection "master"
[0m16:29:12.951722 [debug] [MainThread]: On master: COMMIT
[0m16:29:12.951722 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:29:12.952309 [debug] [MainThread]: On master: Close
[0m16:29:12.956164 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:29:12.957380 [info ] [Thread-1 (]: 1 of 26 START sql table model main.dim_atividade ............................... [RUN]
[0m16:29:12.957380 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_atividade'
[0m16:29:12.958390 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:29:12.965520 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:29:12.967166 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:29:12.998334 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:29:12.999844 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:29:12.999844 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:29:12.999844 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:29:13.001434 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.002038 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:29:13.002561 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:29:13.005168 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:29:13.009439 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:29:13.010448 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:29:13.011459 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.012881 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:29:13.012881 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:29:13.013892 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.021232 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:29:13.022298 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade" rename to "dim_atividade__dbt_backup"
[0m16:29:13.022819 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.028074 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:29:13.028611 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:29:13.029146 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.045883 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:29:13.045883 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:29:13.045883 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:29:13.049426 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:29:13.054747 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:29:13.055287 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:29:13.057039 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.058098 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:29:13.061811 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DC9C0500>]}
[0m16:29:13.062408 [info ] [Thread-1 (]: 1 of 26 OK created sql table model main.dim_atividade .......................... [[32mOK[0m in 0.10s]
[0m16:29:13.062927 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:29:13.062927 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:29:13.063935 [info ] [Thread-1 (]: 2 of 26 START sql table model main.dim_classe_instituicao ...................... [RUN]
[0m16:29:13.063935 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:29:13.064936 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:29:13.067518 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:29:13.069219 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:29:13.072602 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:29:13.073176 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:29:13.074183 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:29:13.074183 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:13.075195 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.075195 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:29:13.075195 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:29:13.076704 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.077712 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:29:13.077712 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:29:13.079596 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.079596 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:29:13.081154 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:29:13.082679 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.087020 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:29:13.087020 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao" rename to "dim_classe_instituicao__dbt_backup"
[0m16:29:13.088061 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.091088 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:29:13.091088 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:29:13.092086 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.093106 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:29:13.093106 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:29:13.093106 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:29:13.094623 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.098287 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:29:13.098287 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:29:13.099285 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.101206 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:29:13.101841 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF7BE870>]}
[0m16:29:13.102904 [info ] [Thread-1 (]: 2 of 26 OK created sql table model main.dim_classe_instituicao ................. [[32mOK[0m in 0.04s]
[0m16:29:13.103994 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:29:13.104563 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:29:13.105137 [info ] [Thread-1 (]: 3 of 26 START sql table model main.dim_consolidado ............................. [RUN]
[0m16:29:13.106145 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:29:13.106145 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:29:13.108762 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:29:13.110339 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:29:13.112543 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:29:13.113552 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:29:13.113552 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:29:13.115061 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:13.115669 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.116220 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:29:13.116220 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:29:13.119099 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:29:13.120224 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:29:13.121246 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:29:13.121757 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.123806 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:29:13.123806 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:29:13.124807 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.129459 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:29:13.129459 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado" rename to "dim_consolidado__dbt_backup"
[0m16:29:13.131086 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.134248 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:29:13.136518 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:29:13.137593 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.139209 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:29:13.139209 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:29:13.139746 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:29:13.140807 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.142865 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:29:13.142865 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:29:13.145449 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.146958 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:29:13.147566 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF7BF650>]}
[0m16:29:13.147566 [info ] [Thread-1 (]: 3 of 26 OK created sql table model main.dim_consolidado ........................ [[32mOK[0m in 0.04s]
[0m16:29:13.148575 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:29:13.149241 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:29:13.149781 [info ] [Thread-1 (]: 4 of 26 START sql table model main.dim_controle ................................ [RUN]
[0m16:29:13.149781 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:29:13.150788 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:29:13.155245 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:29:13.157347 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:29:13.160560 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:29:13.161567 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:29:13.161567 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:29:13.161567 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:13.163059 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.163059 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:29:13.164068 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:29:13.166645 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:29:13.167733 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:29:13.167733 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:29:13.169258 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.170266 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:29:13.170266 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:29:13.171325 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.174200 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:29:13.174200 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle" rename to "dim_controle__dbt_backup"
[0m16:29:13.175200 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.179751 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:29:13.179751 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:29:13.179751 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.181298 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:29:13.181298 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:29:13.182822 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:29:13.226655 [debug] [Thread-1 (]: SQL status: OK in 0.045 seconds
[0m16:29:13.229773 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:29:13.231364 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:29:13.232980 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.235832 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:29:13.236926 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF7BF710>]}
[0m16:29:13.237464 [info ] [Thread-1 (]: 4 of 26 OK created sql table model main.dim_controle ........................... [[32mOK[0m in 0.09s]
[0m16:29:13.237464 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:29:13.238473 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:29:13.238473 [info ] [Thread-1 (]: 5 of 26 START sql table model main.dim_faixa_vencimento ........................ [RUN]
[0m16:29:13.239471 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:29:13.239471 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:29:13.242518 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:29:13.243038 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:29:13.247116 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:29:13.248126 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:29:13.249125 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:29:13.249125 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:13.250442 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.250442 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:29:13.250947 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:29:13.252078 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.252605 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:29:13.252605 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:29:13.254229 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.255239 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:29:13.255239 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:29:13.257291 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.260052 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:29:13.260589 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m16:29:13.261129 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.263829 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:29:13.264354 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:29:13.264885 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.265938 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:29:13.266454 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:29:13.266454 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:29:13.267463 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.270276 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:29:13.270276 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:29:13.272447 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.273620 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:29:13.273620 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF80ECF0>]}
[0m16:29:13.274673 [info ] [Thread-1 (]: 5 of 26 OK created sql table model main.dim_faixa_vencimento ................... [[32mOK[0m in 0.03s]
[0m16:29:13.275630 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:29:13.275630 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:29:13.276633 [info ] [Thread-1 (]: 6 of 26 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:29:13.276633 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_instituicao)
[0m16:29:13.278245 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:29:13.281268 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:29:13.283919 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:29:13.287888 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:29:13.289499 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:29:13.290024 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:29:13.291037 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:13.291037 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.291037 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:29:13.292049 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:29:13.571436 [debug] [Thread-1 (]: SQL status: OK in 0.280 seconds
[0m16:29:13.573459 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:29:13.573459 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:29:13.574470 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.576989 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:29:13.576989 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:29:13.578004 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.582731 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:29:13.582731 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:29:13.586212 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.591256 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:29:13.591256 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:29:13.592248 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.592755 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:29:13.594327 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:29:13.594327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:29:13.601548 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:29:13.604779 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:29:13.604779 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:29:13.607372 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.608907 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:29:13.610501 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF735130>]}
[0m16:29:13.610501 [info ] [Thread-1 (]: 6 of 26 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.33s]
[0m16:29:13.612016 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:29:13.612543 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:29:13.613558 [info ] [Thread-1 (]: 7 of 26 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:29:13.613558 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:29:13.615065 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:29:13.620417 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:29:13.625875 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:29:13.629532 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:29:13.635056 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:29:13.635592 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:29:13.636113 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:13.637197 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.638211 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:29:13.638211 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m16:29:13.693154 [debug] [Thread-1 (]: SQL status: OK in 0.054 seconds
[0m16:29:13.694901 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:29:13.695443 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:29:13.696558 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.697635 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:29:13.697635 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:29:13.700202 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.704510 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:29:13.704510 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:29:13.705133 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.709321 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:29:13.709843 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:29:13.710390 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.711399 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:29:13.713013 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:29:13.713555 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:29:13.717871 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:29:13.721553 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:29:13.722570 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:29:13.724097 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.725391 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:29:13.726403 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299E1834F50>]}
[0m16:29:13.726403 [info ] [Thread-1 (]: 7 of 26 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.11s]
[0m16:29:13.727918 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:29:13.728467 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:29:13.728467 [info ] [Thread-1 (]: 8 of 26 START sql table model main.dim_porte ................................... [RUN]
[0m16:29:13.729478 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_porte)
[0m16:29:13.729478 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:29:13.732594 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:29:13.736783 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:29:13.742683 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:29:13.745908 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:29:13.746449 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:29:13.746449 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:13.747512 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.748055 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:29:13.749326 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:29:13.751538 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.752136 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:29:13.752671 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:29:13.753684 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.755726 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:29:13.756252 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:29:13.757308 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.761983 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:29:13.762593 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte" rename to "dim_porte__dbt_backup"
[0m16:29:13.763602 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.766661 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:29:13.766661 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:29:13.767265 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.770881 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:29:13.771421 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:29:13.771421 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:29:13.773241 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.776253 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:29:13.776253 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:29:13.777761 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.779334 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:29:13.779334 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299E17F29F0>]}
[0m16:29:13.779334 [info ] [Thread-1 (]: 8 of 26 OK created sql table model main.dim_porte .............................. [[32mOK[0m in 0.05s]
[0m16:29:13.780912 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:29:13.780912 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:29:13.782704 [info ] [Thread-1 (]: 9 of 26 START sql table model main.dim_produto_credito ......................... [RUN]
[0m16:29:13.784325 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:29:13.784325 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:29:13.787767 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:29:13.788782 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:29:13.792055 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:29:13.794093 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:29:13.794093 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:29:13.794603 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:13.794603 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.795620 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:29:13.797120 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:29:13.798136 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.799649 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:29:13.799649 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:29:13.801253 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.801947 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:29:13.801947 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:29:13.803531 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.806251 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:29:13.807267 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m16:29:13.807776 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.809785 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:29:13.810293 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:29:13.810293 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.812974 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:29:13.812974 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:29:13.812974 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:29:13.813985 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.817148 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:29:13.817670 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:29:13.819221 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.821271 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:29:13.821271 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299E1812030>]}
[0m16:29:13.821271 [info ] [Thread-1 (]: 9 of 26 OK created sql table model main.dim_produto_credito .................... [[32mOK[0m in 0.04s]
[0m16:29:13.823520 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:29:13.823520 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:29:13.824541 [info ] [Thread-1 (]: 10 of 26 START sql table model main.dim_regiao ................................. [RUN]
[0m16:29:13.825535 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:29:13.825535 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:29:13.828067 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:29:13.829656 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:29:13.834523 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:29:13.838392 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:29:13.839182 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:29:13.839182 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:13.840193 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.840732 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:29:13.840732 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:29:13.842324 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.842837 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:29:13.843368 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:29:13.843897 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.844968 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:29:13.845503 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:29:13.846025 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.849564 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:29:13.849564 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao" rename to "dim_regiao__dbt_backup"
[0m16:29:13.849564 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.854688 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:29:13.856314 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:29:13.857324 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.858420 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:29:13.858420 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:29:13.859940 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:29:13.861539 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.863199 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:29:13.863199 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:29:13.865306 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.866320 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:29:13.866320 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299E185D9A0>]}
[0m16:29:13.866320 [info ] [Thread-1 (]: 10 of 26 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.04s]
[0m16:29:13.867654 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:29:13.867654 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:29:13.867654 [info ] [Thread-1 (]: 11 of 26 START sql table model main.dim_risco .................................. [RUN]
[0m16:29:13.869223 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:29:13.869223 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:29:13.872851 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:29:13.874860 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:29:13.877373 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:29:13.881105 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:29:13.882688 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:29:13.882688 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:13.882688 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.882688 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:29:13.884273 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:29:13.884273 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.885843 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:29:13.885843 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:29:13.886849 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.888004 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:29:13.888004 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:29:13.889002 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.892570 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:29:13.892570 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco" rename to "dim_risco__dbt_backup"
[0m16:29:13.893645 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.896872 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:29:13.897377 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:29:13.897377 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.898387 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:29:13.899386 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:29:13.899386 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:29:13.901114 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.904593 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:29:13.904593 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:29:13.906155 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.907208 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:29:13.908290 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF7BEE40>]}
[0m16:29:13.909800 [info ] [Thread-1 (]: 11 of 26 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.04s]
[0m16:29:13.910396 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:29:13.910960 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:29:13.910960 [info ] [Thread-1 (]: 12 of 26 START sql table model main.dim_segmento ............................... [RUN]
[0m16:29:13.911485 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:29:13.911485 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:29:13.914618 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:29:13.916387 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:29:13.920109 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:29:13.922750 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:29:13.922750 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:29:13.923978 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:13.923978 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.924977 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:29:13.924977 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:29:13.926621 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.926621 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:29:13.928129 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:29:13.928129 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.930688 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:29:13.931226 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:29:13.932292 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.935986 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:29:13.937062 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento" rename to "dim_segmento__dbt_backup"
[0m16:29:13.938135 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.940650 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:29:13.940650 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:29:13.940650 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.942872 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:29:13.942872 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:29:13.942872 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:29:13.945459 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:29:13.947601 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:29:13.948638 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:29:13.950160 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.951157 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:29:13.951738 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299E188AFC0>]}
[0m16:29:13.952312 [info ] [Thread-1 (]: 12 of 26 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.04s]
[0m16:29:13.952835 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:29:13.953356 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:29:13.953929 [info ] [Thread-1 (]: 13 of 26 START sql table model main.dim_tempo .................................. [RUN]
[0m16:29:13.955106 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:29:13.955106 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:29:13.960450 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:29:13.962026 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:29:13.965127 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:29:13.967311 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:29:13.968863 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:29:13.969432 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:13.969978 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:13.969978 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:29:13.969978 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:29:13.983872 [debug] [Thread-1 (]: SQL status: OK in 0.013 seconds
[0m16:29:13.985610 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:29:13.985610 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:29:13.988420 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.989937 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:29:13.990948 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:29:13.991957 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:13.997515 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:29:13.998029 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:29:13.999116 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:14.002935 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:29:14.003483 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:29:14.004042 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:14.005123 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:29:14.005693 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:29:14.006259 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:29:14.008054 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:29:14.010117 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:29:14.010731 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:29:14.011738 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:14.012788 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:29:14.013888 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF7C04A0>]}
[0m16:29:14.013888 [info ] [Thread-1 (]: 13 of 26 OK created sql table model main.dim_tempo ............................. [[32mOK[0m in 0.06s]
[0m16:29:14.015396 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:29:14.015396 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:29:14.016407 [info ] [Thread-1 (]: 14 of 26 START sql table model main.fato_balanco_patrimonial ................... [RUN]
[0m16:29:14.017794 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:29:14.018413 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:29:14.026745 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:29:14.029870 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:29:14.035273 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:29:14.037864 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:29:14.038866 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:29:14.038866 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:14.039865 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:14.041311 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:29:14.041311 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:29:14.821318 [debug] [Thread-1 (]: SQL status: OK in 0.779 seconds
[0m16:29:14.824849 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:29:14.826359 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:29:14.827924 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:14.830450 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:29:14.831303 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:29:14.833336 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:14.843623 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:29:14.844637 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:29:14.851173 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:14.863320 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:29:14.864336 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:29:14.865333 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:14.870346 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:29:14.871347 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:29:14.875132 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:29:15.342370 [debug] [Thread-1 (]: SQL status: OK in 0.466 seconds
[0m16:29:15.345502 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:29:15.345502 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:29:15.350209 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:29:15.351820 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:29:15.352870 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF7CF890>]}
[0m16:29:15.353884 [info ] [Thread-1 (]: 14 of 26 OK created sql table model main.fato_balanco_patrimonial .............. [[32mOK[0m in 1.34s]
[0m16:29:15.355016 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:29:15.356025 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:29:15.356025 [info ] [Thread-1 (]: 15 of 26 START sql table model main.fato_capital_prudencial .................... [RUN]
[0m16:29:15.357580 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:29:15.358590 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:29:15.361735 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:29:15.362752 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:29:15.367596 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:29:15.369714 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:29:15.370483 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:29:15.371270 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:15.371270 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:15.372581 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:29:15.372581 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:29:15.382546 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:29:15.382546 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:29:15.384142 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: ROLLBACK
[0m16:29:15.397146 [debug] [Thread-1 (]: Failed to rollback 'model.bacen_ifdata_analytics.fato_capital_prudencial'
[0m16:29:15.397684 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:29:15.400215 [debug] [Thread-1 (]: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:29:15.400215 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF74B6B0>]}
[0m16:29:15.401214 [error] [Thread-1 (]: 15 of 26 ERROR creating sql table model main.fato_capital_prudencial ........... [[31mERROR[0m in 0.04s]
[0m16:29:15.402950 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:29:15.403471 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:29:15.404047 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_capital_prudencial' to be skipped because of status 'error'.  Reason: Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^.
[0m16:29:15.404629 [info ] [Thread-1 (]: 16 of 26 START sql table model main.fato_carteira_credito_indexador ............ [RUN]
[0m16:29:15.407266 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:29:15.407266 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:29:15.412995 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:29:15.415721 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:29:15.420094 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:29:15.420094 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:29:15.421635 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:29:15.422840 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:15.422840 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:15.424244 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:29:15.424244 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:29:15.569493 [debug] [Thread-1 (]: SQL status: OK in 0.145 seconds
[0m16:29:15.577078 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:29:15.578086 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m16:29:15.578611 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:15.579624 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:29:15.579624 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:29:15.581556 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:29:15.720244 [debug] [Thread-1 (]: SQL status: OK in 0.138 seconds
[0m16:29:15.725346 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:29:15.726412 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m16:29:15.727496 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:15.729366 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:29:15.729910 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299ED6D6BD0>]}
[0m16:29:15.730919 [info ] [Thread-1 (]: 16 of 26 OK created sql table model main.fato_carteira_credito_indexador ....... [[32mOK[0m in 0.32s]
[0m16:29:15.730919 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:29:15.732671 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:29:15.732671 [info ] [Thread-1 (]: 17 of 26 START sql table model main.fato_carteira_credito_totais ............... [RUN]
[0m16:29:15.734275 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:29:15.734275 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:29:15.741139 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:29:15.742663 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:29:15.747374 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:29:15.748383 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:29:15.749385 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:29:15.749912 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:15.749912 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:15.750920 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:29:15.751498 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:29:15.920629 [debug] [Thread-1 (]: SQL status: OK in 0.169 seconds
[0m16:29:15.921702 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:29:15.922235 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:29:15.923965 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:15.925562 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:29:15.926102 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:29:15.926102 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:15.930161 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:29:15.930161 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais" rename to "fato_carteira_credito_totais__dbt_backup"
[0m16:29:15.931178 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:15.932726 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:29:15.934328 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:29:15.934328 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:15.935915 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:29:15.935915 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:29:15.936927 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:29:16.180126 [debug] [Thread-1 (]: SQL status: OK in 0.243 seconds
[0m16:29:16.181191 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:29:16.182714 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:29:16.184272 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:16.185863 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:29:16.186879 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF7CC8C0>]}
[0m16:29:16.186879 [info ] [Thread-1 (]: 17 of 26 OK created sql table model main.fato_carteira_credito_totais .......... [[32mOK[0m in 0.45s]
[0m16:29:16.188165 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:29:16.188922 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:29:16.189935 [info ] [Thread-1 (]: 18 of 26 START sql table model main.fato_demonstracao_resultado ................ [RUN]
[0m16:29:16.190447 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:29:16.191971 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:29:16.199632 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:29:16.201199 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:29:16.206771 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:29:16.208336 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:29:16.208336 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:29:16.209333 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:16.209333 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:16.209333 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:29:16.210332 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:29:16.768135 [debug] [Thread-1 (]: SQL status: OK in 0.557 seconds
[0m16:29:16.772443 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:29:16.772963 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:29:16.774021 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:16.775039 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:29:16.775039 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:29:16.776048 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:16.779657 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:29:16.780210 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado" rename to "fato_demonstracao_resultado__dbt_backup"
[0m16:29:16.781222 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:16.783779 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:29:16.784820 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:29:16.785851 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:16.786935 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:29:16.786935 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:29:16.787964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:29:17.161807 [debug] [Thread-1 (]: SQL status: OK in 0.374 seconds
[0m16:29:17.165629 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:29:17.166169 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:29:17.169952 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:29:17.171586 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:29:17.172603 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299ED6FFE30>]}
[0m16:29:17.173108 [info ] [Thread-1 (]: 18 of 26 OK created sql table model main.fato_demonstracao_resultado ........... [[32mOK[0m in 0.98s]
[0m16:29:17.174116 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:29:17.174116 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:29:17.175126 [info ] [Thread-1 (]: 19 of 26 START sql table model main.fato_movimentacao_cambio ................... [RUN]
[0m16:29:17.176447 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:29:17.176954 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:29:17.181734 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:29:17.182787 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:29:17.186971 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:29:17.189182 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:29:17.189716 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:29:17.190798 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:17.191876 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:17.192387 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:29:17.193461 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:29:17.202985 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:29:17.205117 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:29:17.205625 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:29:17.208539 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:17.210763 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:29:17.211327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:29:17.212954 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:17.218429 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:29:17.219611 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:29:17.221127 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:17.225247 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:29:17.225247 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:29:17.226256 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:17.228627 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:29:17.229639 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:29:17.229639 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:29:17.235667 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:29:17.239670 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:29:17.239670 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:29:17.242876 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:29:17.244920 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:29:17.245919 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DAF7A2A0>]}
[0m16:29:17.246919 [info ] [Thread-1 (]: 19 of 26 OK created sql table model main.fato_movimentacao_cambio .............. [[32mOK[0m in 0.07s]
[0m16:29:17.247918 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:29:17.249210 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:29:17.250231 [info ] [Thread-1 (]: 20 of 26 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:29:17.251740 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:29:17.251740 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:29:17.259135 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:29:17.261134 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:29:17.268883 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:29:17.271019 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:29:17.273088 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:29:17.273088 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:17.274098 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:17.274098 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:29:17.275097 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:29:17.321029 [debug] [Thread-1 (]: SQL status: OK in 0.047 seconds
[0m16:29:17.323558 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:29:17.323558 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:29:17.325560 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:17.326559 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:29:17.328019 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:29:17.329018 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:17.333543 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:29:17.334542 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:29:17.335543 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:17.341064 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:29:17.342574 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:29:17.343585 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:17.344585 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:29:17.346586 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:29:17.347511 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:29:17.425028 [debug] [Thread-1 (]: SQL status: OK in 0.077 seconds
[0m16:29:17.427033 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:29:17.427033 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:29:17.428030 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:17.429734 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:29:17.429734 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299E17F15B0>]}
[0m16:29:17.431273 [info ] [Thread-1 (]: 20 of 26 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.18s]
[0m16:29:17.431273 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:29:17.431273 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:29:17.432818 [info ] [Thread-1 (]: 21 of 26 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:29:17.432818 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:29:17.433831 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:29:17.438009 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:29:17.439004 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:29:17.444207 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:29:17.445723 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:29:17.445723 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:29:17.445723 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:17.447256 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:17.447256 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:29:17.447256 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:29:17.803080 [debug] [Thread-1 (]: SQL status: OK in 0.355 seconds
[0m16:29:17.804256 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:29:17.805266 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:29:17.806848 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:17.808363 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:29:17.808923 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:29:17.809933 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:17.813102 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:29:17.813629 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:29:17.814160 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:17.816379 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:29:17.816904 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:29:17.817419 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:17.817419 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:29:17.818993 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:29:17.819622 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:29:18.269008 [debug] [Thread-1 (]: SQL status: OK in 0.450 seconds
[0m16:29:18.273827 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:29:18.273827 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:29:18.278506 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:29:18.283550 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:29:18.284550 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299ED72FCB0>]}
[0m16:29:18.285927 [info ] [Thread-1 (]: 21 of 26 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.85s]
[0m16:29:18.292924 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:29:18.294123 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:29:18.295135 [info ] [Thread-1 (]: 22 of 26 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:29:18.296784 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:29:18.297970 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:29:18.477536 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:29:18.479045 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:29:18.502811 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:29:18.509399 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:29:18.510234 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:29:18.510746 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:18.511557 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:18.511557 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:29:18.512566 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:29:18.578810 [debug] [Thread-1 (]: SQL status: OK in 0.065 seconds
[0m16:29:18.579854 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:29:18.581236 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m16:29:18.582774 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:18.584878 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:29:18.584878 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m16:29:18.585873 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:18.590381 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:29:18.591904 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade" rename to "fato_carteira_credito_atividade__dbt_backup"
[0m16:29:18.592915 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:18.594430 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:29:18.595443 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:29:18.596951 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:18.598537 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:29:18.598537 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:29:18.599539 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:29:18.601132 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:18.605120 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:29:18.606159 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:29:18.607170 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:18.608766 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:29:18.608766 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299ED6E86E0>]}
[0m16:29:23.457404 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:29:23.464144 [info ] [Thread-1 (]: 22 of 26 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 0.31s]
[0m16:29:23.465159 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:29:23.466165 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:29:23.467158 [info ] [Thread-1 (]: 23 of 26 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:29:23.469158 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:29:23.470101 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:29:23.476891 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:29:23.477890 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:29:23.484024 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:29:23.486023 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:29:23.486533 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:29:23.487420 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:23.488399 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:23.488908 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:29:23.489359 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:29:23.822906 [debug] [Thread-1 (]: SQL status: OK in 0.333 seconds
[0m16:29:23.824933 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:29:23.825943 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m16:29:23.827944 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:23.829478 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:29:23.831330 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m16:29:23.831330 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:23.834396 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:29:23.835903 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte" rename to "fato_carteira_credito_porte__dbt_backup"
[0m16:29:23.835903 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:23.838421 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:29:23.839948 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:29:23.840965 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:23.843041 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:29:23.844047 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:29:23.844047 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:29:23.911837 [debug] [Thread-1 (]: SQL status: OK in 0.067 seconds
[0m16:29:23.919367 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:29:23.920908 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:29:23.924453 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:29:23.929465 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:29:23.929977 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299E17D4E90>]}
[0m16:29:23.932511 [info ] [Thread-1 (]: 23 of 26 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.46s]
[0m16:29:23.935462 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:29:23.936976 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:29:23.938505 [info ] [Thread-1 (]: 24 of 26 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:29:23.941035 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:29:23.941035 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:29:23.953955 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:29:23.956154 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:29:23.970126 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:29:23.974659 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:29:23.976083 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:29:23.977104 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:23.979623 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:29:23.980637 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:29:23.981634 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:29:24.117513 [debug] [Thread-1 (]: SQL status: OK in 0.135 seconds
[0m16:29:24.119235 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:29:24.119790 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:29:24.121392 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:24.122456 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:29:24.122978 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:29:24.124991 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:24.128122 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:29:24.128122 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto" rename to "fato_carteira_credito_produto__dbt_backup"
[0m16:29:24.129711 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:24.132832 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:29:24.132832 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:29:24.134357 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:24.135868 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:29:24.135868 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:29:24.136880 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:29:24.138930 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:24.143656 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:29:24.144178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:29:24.145299 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:24.147946 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:29:24.149016 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF7BE330>]}
[0m16:29:24.149532 [info ] [Thread-1 (]: 24 of 26 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 0.21s]
[0m16:29:24.150070 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:29:24.150602 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:29:24.151124 [info ] [Thread-1 (]: 25 of 26 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:29:24.151659 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:29:24.152197 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:29:24.158091 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:29:24.159101 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:29:24.162733 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:29:24.163809 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:29:24.163809 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:29:24.163809 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:24.164808 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:24.165398 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:29:24.165398 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:29:24.421103 [debug] [Thread-1 (]: SQL status: OK in 0.255 seconds
[0m16:29:24.423295 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:29:24.423824 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:29:24.424910 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:24.425491 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:29:24.426501 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:29:24.426501 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:24.431227 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:29:24.432751 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito" rename to "fato_regiao_credito__dbt_backup"
[0m16:29:24.432751 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:24.435907 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:29:24.436557 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:29:24.437077 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:24.439087 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:29:24.439087 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:29:24.440087 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:29:24.508235 [debug] [Thread-1 (]: SQL status: OK in 0.069 seconds
[0m16:29:24.510765 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:29:24.510765 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:29:24.512447 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:24.514639 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:29:24.514639 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299E17E3980>]}
[0m16:29:24.515719 [info ] [Thread-1 (]: 25 of 26 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.36s]
[0m16:29:24.516229 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:29:24.516813 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:29:24.516813 [info ] [Thread-1 (]: 26 of 26 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:29:24.517360 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:29:24.517360 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:29:24.520054 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:29:24.521621 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:29:24.525154 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:29:24.526193 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:29:24.526193 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:29:24.527162 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:29:24.527162 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:24.528150 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:29:24.528150 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:29:24.885125 [debug] [Thread-1 (]: SQL status: OK in 0.357 seconds
[0m16:29:24.886651 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:29:24.886651 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:29:24.887659 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:24.890059 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:29:24.890059 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:29:24.891368 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:29:24.894523 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:29:24.894523 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito" rename to "fato_risco_credito__dbt_backup"
[0m16:29:24.895530 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:24.897610 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:29:24.897610 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:29:24.899183 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:29:24.900754 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:29:24.900754 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:29:24.901281 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:29:25.234039 [debug] [Thread-1 (]: SQL status: OK in 0.332 seconds
[0m16:29:25.236091 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:29:25.236091 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:29:25.238387 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:29:25.239915 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:29:25.240948 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0fce1b0e-3bd4-4e8a-8824-59f8f8c306ec', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DF7C13A0>]}
[0m16:29:25.240948 [info ] [Thread-1 (]: 26 of 26 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.72s]
[0m16:29:25.242953 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:29:25.244566 [debug] [MainThread]: Using duckdb connection "master"
[0m16:29:25.244566 [debug] [MainThread]: On master: BEGIN
[0m16:29:25.245577 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:29:25.246160 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:29:25.246678 [debug] [MainThread]: On master: COMMIT
[0m16:29:25.246678 [debug] [MainThread]: Using duckdb connection "master"
[0m16:29:25.246678 [debug] [MainThread]: On master: COMMIT
[0m16:29:25.247214 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:29:25.247749 [debug] [MainThread]: On master: Close
[0m16:29:25.247749 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:29:25.248281 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:29:25.248281 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:29:25.248281 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_risco_credito' was properly closed.
[0m16:29:25.248810 [info ] [MainThread]: 
[0m16:29:25.249337 [info ] [MainThread]: Finished running 26 table models in 0 hours 0 minutes and 13.42 seconds (13.42s).
[0m16:29:25.252585 [debug] [MainThread]: Command end result
[0m16:29:25.297371 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:29:25.300914 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:29:25.307409 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:29:25.307409 [info ] [MainThread]: 
[0m16:29:25.308434 [info ] [MainThread]: [31mCompleted with 1 error, 0 partial successes, and 0 warnings:[0m
[0m16:29:25.308434 [info ] [MainThread]: 
[0m16:29:25.308434 [error] [MainThread]: [31mFailure in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)[0m
[0m16:29:25.309946 [error] [MainThread]:   Runtime Error in model fato_capital_prudencial (models\gold\fato_capital_prudencial.sql)
  Binder Error: Referenced column "rwasp" not found in FROM clause!
  Candidate bindings: "rwaacs", "rwa_risco_operacional", "rwacam", "rwacom", "rwajur"
  
  LINE 66:     rwasp as rwa_servicos_pagamento,
               ^
[0m16:29:25.310536 [info ] [MainThread]: 
[0m16:29:25.310536 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\fato_capital_prudencial.sql
[0m16:29:25.311544 [info ] [MainThread]: 
[0m16:29:25.311544 [info ] [MainThread]: Done. PASS=25 WARN=0 ERROR=1 SKIP=0 NO-OP=0 TOTAL=26
[0m16:29:25.313595 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:29:25.315103 [debug] [MainThread]: Command `dbt run` failed at 16:29:25.313595 after 17.04 seconds
[0m16:29:25.315103 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DC4D80B0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DD0FC6E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000299DD0FC7A0>]}
[0m16:29:25.315639 [debug] [MainThread]: Flushing usage events
[0m16:29:25.918410 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:30:34.977958 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE10324B0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE21A4E30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE14E1FD0>]}


============================== 16:30:34.986047 | 48debbd0-b1f3-42f3-80ad-90d226577454 ==============================
[0m16:30:34.986047 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:30:34.987073 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'False', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt run --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:30:35.369585 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE3663CE0>]}
[0m16:30:35.431040 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE2444B60>]}
[0m16:30:35.435184 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:30:35.796236 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:30:35.797842 [debug] [MainThread]: Partial parsing not enabled
[0m16:30:38.031263 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:30:38.033325 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE3E9B110>]}
[0m16:30:38.663777 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:30:38.681025 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE4052F90>]}
[0m16:30:38.827742 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:30:38.851576 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:30:39.002880 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE3DC5370>]}
[0m16:30:39.004107 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:30:39.004724 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE3C3A390>]}
[0m16:30:39.010653 [info ] [MainThread]: 
[0m16:30:39.012389 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:30:39.012914 [info ] [MainThread]: 
[0m16:30:39.013457 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:30:39.022640 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:30:39.381140 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:30:39.381140 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:30:39.381140 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:30:40.574490 [debug] [ThreadPool]: SQL status: OK in 1.193 seconds
[0m16:30:40.576504 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:30:40.578011 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:30:40.578011 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:30:40.588242 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:30:40.588242 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:30:40.589237 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:30:40.591977 [debug] [ThreadPool]: SQL status: OK in 0.003 seconds
[0m16:30:40.594749 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:30:40.594749 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:30:40.595810 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:30:40.595810 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:30:40.596819 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:30:40.597386 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:30:40.599239 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:30:40.600146 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:30:40.600146 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:30:40.601655 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:30:40.602242 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:30:40.606143 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:30:40.614192 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:30:40.614725 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:30:40.614725 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:30:40.615793 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:30:40.616860 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:30:40.617391 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:30:40.643271 [debug] [ThreadPool]: SQL status: OK in 0.026 seconds
[0m16:30:40.644789 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:30:40.646977 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:30:40.647495 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:30:40.656099 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE3C78320>]}
[0m16:30:40.656635 [debug] [MainThread]: Using duckdb connection "master"
[0m16:30:40.657176 [debug] [MainThread]: On master: BEGIN
[0m16:30:40.657711 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:30:40.658250 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:30:40.658250 [debug] [MainThread]: On master: COMMIT
[0m16:30:40.658250 [debug] [MainThread]: Using duckdb connection "master"
[0m16:30:40.658250 [debug] [MainThread]: On master: COMMIT
[0m16:30:40.658250 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:30:40.659786 [debug] [MainThread]: On master: Close
[0m16:30:40.667025 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:30:40.667574 [info ] [Thread-1 (]: 1 of 26 START sql table model main.dim_atividade ............................... [RUN]
[0m16:30:40.667574 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_atividade'
[0m16:30:40.669483 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:30:40.678234 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:30:40.679251 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:30:40.710137 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:30:40.711695 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:30:40.712713 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:30:40.713222 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:30:40.713222 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.714310 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:30:40.714310 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:30:40.722667 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:30:40.727413 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:30:40.728183 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:30:40.728183 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:40.729804 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:30:40.729804 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:30:40.733953 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:30:40.741174 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:30:40.741174 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade" rename to "dim_atividade__dbt_backup"
[0m16:30:40.742790 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.745094 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:30:40.746628 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:30:40.747265 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:40.786277 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:30:40.787946 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:30:40.789645 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:30:40.796261 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:30:40.806861 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:30:40.807877 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:30:40.810125 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:30:40.815245 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:30:40.820275 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE15502F0>]}
[0m16:30:40.821272 [info ] [Thread-1 (]: 1 of 26 OK created sql table model main.dim_atividade .......................... [[32mOK[0m in 0.15s]
[0m16:30:40.823921 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:30:40.823921 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:30:40.825936 [info ] [Thread-1 (]: 2 of 26 START sql table model main.dim_classe_instituicao ...................... [RUN]
[0m16:30:40.826445 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:30:40.827454 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:30:40.831976 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:30:40.835000 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:30:40.840606 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:30:40.843129 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:30:40.843635 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:30:40.844646 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:40.845648 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.846662 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:30:40.846662 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:30:40.850197 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:30:40.851704 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:30:40.853735 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:30:40.854360 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.857914 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:30:40.858612 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:30:40.859622 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.865167 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:30:40.866678 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao" rename to "dim_classe_instituicao__dbt_backup"
[0m16:30:40.868169 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.872561 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:30:40.873131 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:30:40.874144 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.876145 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:30:40.877145 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:30:40.878145 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:30:40.880000 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.884394 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:30:40.885404 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:30:40.887619 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.889139 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:30:40.890650 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE430E8D0>]}
[0m16:30:40.891661 [info ] [Thread-1 (]: 2 of 26 OK created sql table model main.dim_classe_instituicao ................. [[32mOK[0m in 0.06s]
[0m16:30:40.892716 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:30:40.893480 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:30:40.893480 [info ] [Thread-1 (]: 3 of 26 START sql table model main.dim_consolidado ............................. [RUN]
[0m16:30:40.894993 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:30:40.896008 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:30:40.900838 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:30:40.903790 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:30:40.908748 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:30:40.911559 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:30:40.911559 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:30:40.912568 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:40.913913 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.913913 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:30:40.913913 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:30:40.917164 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:30:40.919683 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:30:40.920694 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:30:40.924225 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.927238 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:30:40.929603 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:30:40.929603 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.941320 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:30:40.942832 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado" rename to "dim_consolidado__dbt_backup"
[0m16:30:40.943845 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:40.955753 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:30:40.956263 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:30:40.959305 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.960927 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:30:40.961928 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:30:40.962930 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:30:40.963439 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.968982 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:30:40.969495 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:30:40.971665 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.974190 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:30:40.975202 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE430F5F0>]}
[0m16:30:40.976595 [info ] [Thread-1 (]: 3 of 26 OK created sql table model main.dim_consolidado ........................ [[32mOK[0m in 0.08s]
[0m16:30:40.977611 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:30:40.978611 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:30:40.979119 [info ] [Thread-1 (]: 4 of 26 START sql table model main.dim_controle ................................ [RUN]
[0m16:30:40.979119 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:30:40.980627 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:30:40.984710 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:30:40.987724 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:30:40.993538 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:30:40.995561 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:30:40.996564 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:30:40.996564 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:40.997563 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:40.998563 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:30:40.998563 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:30:41.000564 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.003071 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:30:41.005600 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:30:41.007613 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.009613 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:30:41.010614 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:30:41.012634 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.017507 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:30:41.018505 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle" rename to "dim_controle__dbt_backup"
[0m16:30:41.019509 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.024051 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:30:41.025051 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:30:41.026060 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.028446 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:30:41.028446 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:30:41.028446 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:30:41.031968 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:30:41.038015 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:30:41.039013 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:30:41.041533 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.044092 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:30:41.045105 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE430F650>]}
[0m16:30:41.046117 [info ] [Thread-1 (]: 4 of 26 OK created sql table model main.dim_controle ........................... [[32mOK[0m in 0.06s]
[0m16:30:41.047114 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:30:41.047114 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:30:41.048115 [info ] [Thread-1 (]: 5 of 26 START sql table model main.dim_faixa_vencimento ........................ [RUN]
[0m16:30:41.050116 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:30:41.050116 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:30:41.056704 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:30:41.058372 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:30:41.067384 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:30:41.069436 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:30:41.070052 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:30:41.070052 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:41.072635 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.073143 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:30:41.074156 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:30:41.075677 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.078601 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:30:41.079132 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:30:41.080292 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.083330 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:30:41.084350 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:30:41.085886 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.091563 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:30:41.092565 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m16:30:41.094084 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.098096 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:30:41.099095 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:30:41.100096 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.103146 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:30:41.103789 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:30:41.104813 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:30:41.106323 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.110679 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:30:41.110679 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:30:41.113189 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.115201 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:30:41.116713 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE435C050>]}
[0m16:30:41.117925 [info ] [Thread-1 (]: 5 of 26 OK created sql table model main.dim_faixa_vencimento ................... [[32mOK[0m in 0.07s]
[0m16:30:41.119340 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:30:41.120354 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:30:41.120863 [info ] [Thread-1 (]: 6 of 26 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:30:41.121878 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_instituicao)
[0m16:30:41.123383 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:30:41.129975 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:30:41.132146 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:30:41.137705 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:30:41.140718 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:30:41.141715 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:30:41.142715 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:41.144234 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.144234 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:30:41.145246 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:30:41.456029 [debug] [Thread-1 (]: SQL status: OK in 0.310 seconds
[0m16:30:41.457593 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:30:41.457593 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:30:41.458607 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.460125 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:30:41.461720 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:30:41.462734 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.465359 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:30:41.466887 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:30:41.467511 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.470150 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:30:41.470150 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:30:41.471743 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.473275 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:30:41.474287 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:30:41.475535 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:30:41.483161 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:30:41.486756 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:30:41.487773 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:30:41.489770 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.491862 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:30:41.491862 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE632F470>]}
[0m16:30:41.492932 [info ] [Thread-1 (]: 6 of 26 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.37s]
[0m16:30:41.494021 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:30:41.494605 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:30:41.494605 [info ] [Thread-1 (]: 7 of 26 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:30:41.496068 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:30:41.496584 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:30:41.504206 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:30:41.506242 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:30:41.510289 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:30:41.513341 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:30:41.513341 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:30:41.513341 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:41.514880 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.514880 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:30:41.515477 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m16:30:41.565679 [debug] [Thread-1 (]: SQL status: OK in 0.050 seconds
[0m16:30:41.567290 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:30:41.568318 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:30:41.569304 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.571434 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:30:41.571973 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:30:41.573125 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.576143 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:30:41.577141 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:30:41.577141 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.579666 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:30:41.581318 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:30:41.581318 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.584005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:30:41.584520 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:30:41.584520 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:30:41.588956 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:30:41.589975 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:30:41.591531 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:30:41.593210 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.594863 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:30:41.595881 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE430F920>]}
[0m16:30:41.595881 [info ] [Thread-1 (]: 7 of 26 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.10s]
[0m16:30:41.608946 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:30:41.609945 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:30:41.610468 [info ] [Thread-1 (]: 8 of 26 START sql table model main.dim_porte ................................... [RUN]
[0m16:30:41.611492 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_porte)
[0m16:30:41.611492 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:30:41.615222 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:30:41.617290 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:30:41.622800 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:30:41.623314 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:30:41.624328 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:30:41.624328 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:41.625337 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.625337 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:30:41.625337 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:30:41.626336 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.627845 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:30:41.629092 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:30:41.629615 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.631198 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:30:41.631198 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:30:41.631198 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.635983 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:30:41.635983 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte" rename to "dim_porte__dbt_backup"
[0m16:30:41.637002 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.639101 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:30:41.640109 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:30:41.640109 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.642681 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:30:41.642681 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:30:41.644256 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:30:41.645450 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.647605 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:30:41.648620 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:30:41.650134 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.651762 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:30:41.652359 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE6318E30>]}
[0m16:30:41.653439 [info ] [Thread-1 (]: 8 of 26 OK created sql table model main.dim_porte .............................. [[32mOK[0m in 0.04s]
[0m16:30:41.654021 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:30:41.654554 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:30:41.655622 [info ] [Thread-1 (]: 9 of 26 START sql table model main.dim_produto_credito ......................... [RUN]
[0m16:30:41.656636 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:30:41.657203 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:30:41.659218 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:30:41.661763 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:30:41.665441 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:30:41.669108 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:30:41.670063 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:30:41.670063 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:41.670063 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.671686 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:30:41.671686 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:30:41.672716 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.674174 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:30:41.675174 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:30:41.676332 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.677841 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:30:41.677841 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:30:41.679410 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.684177 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:30:41.684177 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m16:30:41.685769 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.688310 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:30:41.688310 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:30:41.688310 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.689824 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:30:41.690837 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:30:41.690837 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:30:41.692876 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.694442 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:30:41.694442 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:30:41.695467 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.697768 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:30:41.697768 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE4026C90>]}
[0m16:30:41.697768 [info ] [Thread-1 (]: 9 of 26 OK created sql table model main.dim_produto_credito .................... [[32mOK[0m in 0.04s]
[0m16:30:41.699370 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:30:41.699370 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:30:41.699370 [info ] [Thread-1 (]: 10 of 26 START sql table model main.dim_regiao ................................. [RUN]
[0m16:30:41.701125 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:30:41.701730 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:30:41.704532 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:30:41.707390 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:30:41.709941 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:30:41.711551 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:30:41.712747 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:30:41.712747 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:41.712747 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.713766 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:30:41.713766 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:30:41.714765 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.715272 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:30:41.715272 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:30:41.716791 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.718370 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:30:41.718875 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:30:41.720010 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.722661 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:30:41.723177 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao" rename to "dim_regiao__dbt_backup"
[0m16:30:41.723177 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.727196 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:30:41.728189 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:30:41.728707 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.730228 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:30:41.730228 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:30:41.731222 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:30:41.732817 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.735870 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:30:41.735870 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:30:41.737403 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.739287 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:30:41.739798 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE63AE420>]}
[0m16:30:41.740813 [info ] [Thread-1 (]: 10 of 26 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.04s]
[0m16:30:41.740813 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:30:41.741819 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:30:41.742341 [info ] [Thread-1 (]: 11 of 26 START sql table model main.dim_risco .................................. [RUN]
[0m16:30:41.742880 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:30:41.742880 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:30:41.745992 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:30:41.748014 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:30:41.749531 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:30:41.752925 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:30:41.752925 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:30:41.753935 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:41.755065 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.755065 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:30:41.756076 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:30:41.757614 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.758638 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:30:41.760146 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:30:41.761155 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.762171 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:30:41.762689 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:30:41.763700 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.767618 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:30:41.768128 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco" rename to "dim_risco__dbt_backup"
[0m16:30:41.768128 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.771850 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:30:41.772392 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:30:41.772945 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.773960 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:30:41.774959 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:30:41.774959 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:30:41.776968 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.779762 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:30:41.779762 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:30:41.782954 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.784710 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:30:41.785719 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE435E0C0>]}
[0m16:30:41.785719 [info ] [Thread-1 (]: 11 of 26 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.04s]
[0m16:30:41.787236 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:30:41.787743 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:30:41.789082 [info ] [Thread-1 (]: 12 of 26 START sql table model main.dim_segmento ............................... [RUN]
[0m16:30:41.790091 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:30:41.790091 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:30:41.792619 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:30:41.794698 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:30:41.799250 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:30:41.804149 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:30:41.804712 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:30:41.804712 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:41.806322 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.806322 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:30:41.806322 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:30:41.809198 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:30:41.810207 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:30:41.810207 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:30:41.812590 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.814741 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:30:41.815249 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:30:41.815249 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.819235 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:30:41.819235 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento" rename to "dim_segmento__dbt_backup"
[0m16:30:41.820279 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.824475 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:30:41.825490 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:30:41.826487 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:41.827997 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:30:41.827997 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:30:41.829622 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:30:41.831151 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.832693 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:30:41.834351 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:30:41.835931 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.838057 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:30:41.838057 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE63D6E10>]}
[0m16:30:41.839052 [info ] [Thread-1 (]: 12 of 26 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.05s]
[0m16:30:41.840055 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:30:41.841158 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:30:41.842164 [info ] [Thread-1 (]: 13 of 26 START sql table model main.dim_tempo .................................. [RUN]
[0m16:30:41.843208 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:30:41.844510 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:30:41.851109 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:30:41.852758 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:30:41.857597 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:30:41.860119 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:30:41.860119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:30:41.861830 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:41.862847 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.864279 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:30:41.864794 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:30:41.888623 [debug] [Thread-1 (]: SQL status: OK in 0.022 seconds
[0m16:30:41.890132 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:30:41.890132 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:30:41.892662 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.894721 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:30:41.894721 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:30:41.897392 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.902728 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:30:41.903747 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:30:41.904269 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.908359 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:30:41.909871 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:30:41.910523 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.912708 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:30:41.914252 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:30:41.914801 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:30:41.916423 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.921362 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:30:41.921362 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:30:41.924211 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:30:41.928147 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:30:41.929288 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE431F920>]}
[0m16:30:41.930376 [info ] [Thread-1 (]: 13 of 26 OK created sql table model main.dim_tempo ............................. [[32mOK[0m in 0.09s]
[0m16:30:41.932408 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:30:41.932944 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:30:41.934468 [info ] [Thread-1 (]: 14 of 26 START sql table model main.fato_balanco_patrimonial ................... [RUN]
[0m16:30:41.934978 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:30:41.936487 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:30:41.949011 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:30:41.951984 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:30:41.957795 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:30:41.960670 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:30:41.961178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:30:41.962186 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:41.962710 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:41.964721 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:30:41.965741 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:30:42.751034 [debug] [Thread-1 (]: SQL status: OK in 0.784 seconds
[0m16:30:42.752221 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:30:42.752761 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:30:42.753892 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:42.756066 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:30:42.757079 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:30:42.759495 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:42.765505 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:30:42.766582 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:30:42.768215 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:42.774673 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:30:42.775682 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:30:42.776694 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:42.776694 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:30:42.778212 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:30:42.778212 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:30:42.992218 [debug] [Thread-1 (]: SQL status: OK in 0.214 seconds
[0m16:30:42.994875 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:30:42.994875 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:30:42.998293 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:30:42.999805 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:30:42.999805 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE420C0B0>]}
[0m16:30:43.000812 [info ] [Thread-1 (]: 14 of 26 OK created sql table model main.fato_balanco_patrimonial .............. [[32mOK[0m in 1.06s]
[0m16:30:43.001360 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:30:43.001945 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:30:43.002548 [info ] [Thread-1 (]: 15 of 26 START sql table model main.fato_capital_prudencial .................... [RUN]
[0m16:30:43.003559 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:30:43.004068 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:30:43.008193 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:30:43.009200 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:30:43.013246 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:30:43.015818 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:30:43.016355 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:30:43.017429 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:43.019084 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:43.019084 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:30:43.019634 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:30:43.245054 [debug] [Thread-1 (]: SQL status: OK in 0.225 seconds
[0m16:30:43.249943 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:30:43.250994 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m16:30:43.252248 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:43.255701 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:30:43.256798 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:30:43.257871 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:30:43.331745 [debug] [Thread-1 (]: SQL status: OK in 0.074 seconds
[0m16:30:43.336888 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:30:43.336888 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m16:30:43.337955 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:43.338956 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:30:43.339967 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE633CE90>]}
[0m16:30:43.341069 [info ] [Thread-1 (]: 15 of 26 OK created sql table model main.fato_capital_prudencial ............... [[32mOK[0m in 0.34s]
[0m16:30:43.341069 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:30:43.342068 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:30:43.343100 [info ] [Thread-1 (]: 16 of 26 START sql table model main.fato_carteira_credito_indexador ............ [RUN]
[0m16:30:43.344183 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:30:43.344726 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:30:43.351350 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:30:43.352984 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:30:43.355299 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:30:43.357335 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:30:43.358345 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:30:43.358345 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:43.359346 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:43.359346 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:30:43.359346 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:30:43.451795 [debug] [Thread-1 (]: SQL status: OK in 0.091 seconds
[0m16:30:43.453233 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:30:43.454890 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_indexador'
  
[0m16:30:43.457419 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:43.458478 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:30:43.459005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_indexador'
  
[0m16:30:43.459528 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:43.463206 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:30:43.463206 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador" rename to "fato_carteira_credito_indexador__dbt_backup"
[0m16:30:43.464714 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:43.466355 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:30:43.467402 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m16:30:43.467402 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:43.470400 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:30:43.470400 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:30:43.470400 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:30:43.497212 [debug] [Thread-1 (]: SQL status: OK in 0.026 seconds
[0m16:30:43.499730 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:30:43.501237 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m16:30:43.502390 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:43.504023 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:30:43.504595 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE63C6FC0>]}
[0m16:30:43.505154 [info ] [Thread-1 (]: 16 of 26 OK created sql table model main.fato_carteira_credito_indexador ....... [[32mOK[0m in 0.16s]
[0m16:30:43.506164 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:30:43.506164 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:30:43.507431 [info ] [Thread-1 (]: 17 of 26 START sql table model main.fato_carteira_credito_totais ............... [RUN]
[0m16:30:43.508487 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:30:43.508487 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:30:43.513347 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:30:43.514898 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:30:43.519610 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:30:43.521216 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:30:43.521216 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:30:43.521216 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:43.522695 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:43.523703 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:30:43.524706 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:30:43.578049 [debug] [Thread-1 (]: SQL status: OK in 0.053 seconds
[0m16:30:43.579645 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:30:43.580246 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:30:43.581264 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:43.582983 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:30:43.582983 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:30:43.584536 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:43.590615 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:30:43.591148 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais" rename to "fato_carteira_credito_totais__dbt_backup"
[0m16:30:43.591684 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:43.596792 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:30:43.597329 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:30:43.598388 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:43.599510 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:30:43.600512 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:30:43.600512 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:30:43.708819 [debug] [Thread-1 (]: SQL status: OK in 0.108 seconds
[0m16:30:43.712583 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:30:43.712583 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:30:43.715101 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:30:43.716263 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:30:43.716263 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE63341D0>]}
[0m16:30:43.717280 [info ] [Thread-1 (]: 17 of 26 OK created sql table model main.fato_carteira_credito_totais .......... [[32mOK[0m in 0.21s]
[0m16:30:43.718334 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:30:43.719333 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:30:43.719879 [info ] [Thread-1 (]: 18 of 26 START sql table model main.fato_demonstracao_resultado ................ [RUN]
[0m16:30:43.720401 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:30:43.720943 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:30:43.724737 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:30:43.726695 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:30:43.729214 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:30:43.731779 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:30:43.733202 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:30:43.734694 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:43.735232 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:43.735770 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:30:43.736302 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:30:44.288837 [debug] [Thread-1 (]: SQL status: OK in 0.553 seconds
[0m16:30:44.291352 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:30:44.291352 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:30:44.292927 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:44.294125 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:30:44.294664 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:30:44.295747 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:44.297884 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:30:44.297884 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado" rename to "fato_demonstracao_resultado__dbt_backup"
[0m16:30:44.299400 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:44.302758 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:30:44.303277 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:30:44.303842 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:44.304991 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:30:44.304991 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:30:44.304991 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:30:44.480425 [debug] [Thread-1 (]: SQL status: OK in 0.174 seconds
[0m16:30:44.484277 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:30:44.484878 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:30:44.487061 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:30:44.489070 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:30:44.489070 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE430EF60>]}
[0m16:30:44.490071 [info ] [Thread-1 (]: 18 of 26 OK created sql table model main.fato_demonstracao_resultado ........... [[32mOK[0m in 0.77s]
[0m16:30:44.491144 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:30:44.491745 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:30:44.492793 [info ] [Thread-1 (]: 19 of 26 START sql table model main.fato_movimentacao_cambio ................... [RUN]
[0m16:30:44.493334 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:30:44.493880 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:30:44.497816 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:30:44.498893 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:30:44.501862 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:30:44.504068 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:30:44.505151 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:30:44.505700 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:44.506223 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:44.507233 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:30:44.507233 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:30:44.516776 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:30:44.518911 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:30:44.519443 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:30:44.521580 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:44.523757 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:30:44.524336 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:30:44.526595 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:44.529705 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:30:44.530715 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:30:44.531226 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:44.620100 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:30:44.621639 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:30:44.622651 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:44.624178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:30:44.624178 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:30:44.624178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:30:44.629233 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:30:44.631241 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:30:44.631748 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:30:44.633979 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:44.635992 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:30:44.636503 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FF21F0350>]}
[0m16:30:44.637024 [info ] [Thread-1 (]: 19 of 26 OK created sql table model main.fato_movimentacao_cambio .............. [[32mOK[0m in 0.14s]
[0m16:30:44.637024 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:30:44.638033 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:30:44.638033 [info ] [Thread-1 (]: 20 of 26 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:30:44.639032 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:30:44.639032 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:30:44.642682 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:30:44.644260 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:30:44.646853 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:30:44.647385 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:30:44.647385 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:30:44.648958 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:44.650164 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:44.650164 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:30:44.650164 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:30:44.688126 [debug] [Thread-1 (]: SQL status: OK in 0.037 seconds
[0m16:30:44.689206 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:30:44.689749 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:30:44.691358 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:44.692953 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:30:44.693490 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:30:44.694500 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:44.698171 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:30:44.698171 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:30:44.699680 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:44.701847 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:30:44.703187 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:30:44.703187 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:44.705319 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:30:44.705319 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:30:44.705936 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:30:44.715394 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:30:44.719092 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:30:44.719731 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:30:44.721864 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:30:44.722877 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:30:44.724886 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE63AD700>]}
[0m16:30:44.726620 [info ] [Thread-1 (]: 20 of 26 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.08s]
[0m16:30:44.728165 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:30:44.728165 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:30:44.729776 [info ] [Thread-1 (]: 21 of 26 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:30:44.729776 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:30:44.729776 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:30:44.737315 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:30:44.738408 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:30:44.742822 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:30:44.743905 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:30:44.744428 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:30:44.744428 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:44.744428 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:44.746111 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:30:44.748801 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:30:45.137463 [debug] [Thread-1 (]: SQL status: OK in 0.389 seconds
[0m16:30:45.140464 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:30:45.141472 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:30:45.142988 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:45.146188 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:30:45.146188 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:30:45.148199 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:45.154799 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:30:45.155799 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:30:45.156801 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:45.161453 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:30:45.163979 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:30:45.165976 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:45.166981 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:30:45.168051 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:30:45.170052 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:30:45.587947 [debug] [Thread-1 (]: SQL status: OK in 0.417 seconds
[0m16:30:45.592883 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:30:45.593457 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:30:45.597521 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:30:45.599321 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:30:45.600829 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE633FB60>]}
[0m16:30:45.600829 [info ] [Thread-1 (]: 21 of 26 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.87s]
[0m16:30:45.603542 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:30:45.604434 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:30:45.604953 [info ] [Thread-1 (]: 22 of 26 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:30:45.606851 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:30:45.606851 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:30:45.613661 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:30:45.615670 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:30:45.620852 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:30:45.623395 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:30:45.624406 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:30:45.625426 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:45.626415 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:45.627419 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:30:45.627419 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:30:45.722915 [debug] [Thread-1 (]: SQL status: OK in 0.094 seconds
[0m16:30:45.724926 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:30:45.724926 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m16:30:45.725927 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:45.727899 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:30:45.727899 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m16:30:45.727899 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:45.731094 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:30:45.732633 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade" rename to "fato_carteira_credito_atividade__dbt_backup"
[0m16:30:45.732633 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:45.736818 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:30:45.738094 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:30:45.740097 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:45.741949 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:30:45.741949 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:30:45.742988 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:30:45.744015 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:45.747114 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:30:45.747114 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:30:45.749159 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:45.750175 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:30:45.751172 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE63464E0>]}
[0m16:30:46.739898 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:30:46.742414 [info ] [Thread-1 (]: 22 of 26 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 0.15s]
[0m16:30:46.744007 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:30:46.744718 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:30:46.746084 [info ] [Thread-1 (]: 23 of 26 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:30:46.747256 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:30:46.747900 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:30:46.755949 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:30:46.757466 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:30:46.761731 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:30:46.762740 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:30:46.764195 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:30:46.764195 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:46.764703 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:46.765714 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:30:46.766800 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:30:46.933778 [debug] [Thread-1 (]: SQL status: OK in 0.166 seconds
[0m16:30:46.934792 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:30:46.935799 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m16:30:46.936321 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:46.937844 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:30:46.937844 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m16:30:46.938836 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:46.941926 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:30:46.942970 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte" rename to "fato_carteira_credito_porte__dbt_backup"
[0m16:30:46.944085 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:46.946662 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:30:46.947169 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:30:46.948178 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:46.949688 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:30:46.949688 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:30:46.949688 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:30:46.955124 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:30:46.957342 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:30:46.958977 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:30:46.960493 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:46.961501 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:30:46.962577 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE430E030>]}
[0m16:30:46.962577 [info ] [Thread-1 (]: 23 of 26 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.21s]
[0m16:30:46.963587 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:30:46.963587 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:30:46.965094 [info ] [Thread-1 (]: 24 of 26 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:30:46.965676 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:30:46.966687 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:30:46.971538 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:30:46.972554 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:30:46.975756 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:30:46.976756 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:30:46.977769 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:30:46.977769 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:46.978317 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:46.978317 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:30:46.978317 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:30:47.072601 [debug] [Thread-1 (]: SQL status: OK in 0.093 seconds
[0m16:30:47.073205 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:30:47.074215 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:30:47.074215 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:47.075214 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:30:47.076212 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:30:47.076212 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:47.079285 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:30:47.080295 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto" rename to "fato_carteira_credito_produto__dbt_backup"
[0m16:30:47.080295 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:47.082902 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:30:47.083911 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:30:47.083911 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:47.084948 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:30:47.084948 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:30:47.085948 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:30:47.087001 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:47.091152 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:30:47.091152 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:30:47.092654 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:47.094219 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:30:47.094794 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE63331D0>]}
[0m16:30:47.094794 [info ] [Thread-1 (]: 24 of 26 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 0.13s]
[0m16:30:47.095802 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:30:47.095802 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:30:47.096804 [info ] [Thread-1 (]: 25 of 26 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:30:47.098073 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:30:47.098073 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:30:47.102536 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:30:47.103545 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:30:47.106195 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:30:47.107253 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:30:47.107253 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:30:47.108477 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:47.108477 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:47.108477 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:30:47.109988 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:30:47.408520 [debug] [Thread-1 (]: SQL status: OK in 0.298 seconds
[0m16:30:47.410028 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:30:47.410028 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:30:47.411633 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:47.412684 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:30:47.412684 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:30:47.413826 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:47.416395 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:30:47.417790 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito" rename to "fato_regiao_credito__dbt_backup"
[0m16:30:47.417790 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:47.422919 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:30:47.423471 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:30:47.425099 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:47.426128 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:30:47.427109 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:30:47.428616 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:30:47.436453 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:30:47.438998 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:30:47.438998 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:30:47.439997 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:47.442096 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:30:47.442615 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE43113D0>]}
[0m16:30:47.443154 [info ] [Thread-1 (]: 25 of 26 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.35s]
[0m16:30:47.444164 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:30:47.444747 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:30:47.444747 [info ] [Thread-1 (]: 26 of 26 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:30:47.445764 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:30:47.445764 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:30:47.449389 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:30:47.451412 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:30:47.456702 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:30:47.457760 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:30:47.458293 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:30:47.458293 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:30:47.458840 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:47.458840 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:30:47.458840 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:30:47.813423 [debug] [Thread-1 (]: SQL status: OK in 0.353 seconds
[0m16:30:47.813953 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:30:47.814963 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:30:47.816478 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:47.818103 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:30:47.819129 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:30:47.820260 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:30:47.822388 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:30:47.822924 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito" rename to "fato_risco_credito__dbt_backup"
[0m16:30:47.822924 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:47.828164 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:30:47.828698 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:30:47.829235 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:30:47.830853 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:30:47.831393 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:30:47.831393 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:30:47.899960 [debug] [Thread-1 (]: SQL status: OK in 0.068 seconds
[0m16:30:47.903630 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:30:47.904184 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:30:47.906396 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:30:47.908537 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:30:47.909075 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '48debbd0-b1f3-42f3-80ad-90d226577454', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE6387E90>]}
[0m16:30:47.909617 [info ] [Thread-1 (]: 26 of 26 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.46s]
[0m16:30:47.910688 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:30:47.911743 [debug] [MainThread]: Using duckdb connection "master"
[0m16:30:47.911743 [debug] [MainThread]: On master: BEGIN
[0m16:30:47.911743 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:30:47.912791 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:30:47.912791 [debug] [MainThread]: On master: COMMIT
[0m16:30:47.912791 [debug] [MainThread]: Using duckdb connection "master"
[0m16:30:47.912791 [debug] [MainThread]: On master: COMMIT
[0m16:30:47.913800 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:30:47.913800 [debug] [MainThread]: On master: Close
[0m16:30:47.913800 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:30:47.913800 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:30:47.914800 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:30:47.914800 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_risco_credito' was properly closed.
[0m16:30:47.915308 [info ] [MainThread]: 
[0m16:30:47.915308 [info ] [MainThread]: Finished running 26 table models in 0 hours 0 minutes and 8.90 seconds (8.90s).
[0m16:30:47.917363 [debug] [MainThread]: Command end result
[0m16:30:47.958273 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:30:47.961476 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:30:47.967790 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:30:47.967790 [info ] [MainThread]: 
[0m16:30:47.969323 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:30:47.970332 [info ] [MainThread]: 
[0m16:30:47.970332 [info ] [MainThread]: Done. PASS=26 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=26
[0m16:30:47.971376 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:30:47.973038 [debug] [MainThread]: Command `dbt run` succeeded at 16:30:47.972472 after 13.30 seconds
[0m16:30:47.973038 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE1C27230>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE1C27800>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023FE2108770>]}
[0m16:30:47.973038 [debug] [MainThread]: Flushing usage events
[0m16:30:48.636934 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:31:10.910167 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4B79AF00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4B79B050>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4B625460>]}


============================== 16:31:10.924835 | d09d7764-757d-4713-ad8d-9d57293e88f1 ==============================
[0m16:31:10.924835 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:31:10.926838 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'False', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt test --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:31:11.420257 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'd09d7764-757d-4713-ad8d-9d57293e88f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4D309CD0>]}
[0m16:31:11.544415 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'd09d7764-757d-4713-ad8d-9d57293e88f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4B167CE0>]}
[0m16:31:11.549721 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:31:12.206954 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:31:12.209133 [debug] [MainThread]: Partial parsing not enabled
[0m16:31:15.400038 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:31:15.401045 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': 'd09d7764-757d-4713-ad8d-9d57293e88f1', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4D962BA0>]}
[0m16:31:16.184229 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:31:16.199741 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'd09d7764-757d-4713-ad8d-9d57293e88f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4DC47860>]}
[0m16:31:16.383824 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:31:16.392979 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:31:16.497725 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'd09d7764-757d-4713-ad8d-9d57293e88f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4D9A1190>]}
[0m16:31:16.499251 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:31:16.500916 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'd09d7764-757d-4713-ad8d-9d57293e88f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4D8484A0>]}
[0m16:31:16.510623 [info ] [MainThread]: 
[0m16:31:16.511635 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:31:16.512144 [info ] [MainThread]: 
[0m16:31:16.512652 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:31:16.522686 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:31:16.894585 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:31:16.895590 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:31:16.896584 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:31:17.842203 [debug] [ThreadPool]: SQL status: OK in 0.946 seconds
[0m16:31:17.842714 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:31:17.842714 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:31:17.867604 [debug] [ThreadPool]: SQL status: OK in 0.025 seconds
[0m16:31:17.871630 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:31:17.874247 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:31:17.875245 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:31:17.886691 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'd09d7764-757d-4713-ad8d-9d57293e88f1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4D9E5FA0>]}
[0m16:31:17.887707 [debug] [MainThread]: Using duckdb connection "master"
[0m16:31:17.888706 [debug] [MainThread]: On master: BEGIN
[0m16:31:17.888706 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:31:17.890216 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:31:17.891227 [debug] [MainThread]: On master: COMMIT
[0m16:31:17.891227 [debug] [MainThread]: Using duckdb connection "master"
[0m16:31:17.892228 [debug] [MainThread]: On master: COMMIT
[0m16:31:17.892738 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:31:17.893924 [debug] [MainThread]: On master: Close
[0m16:31:17.904383 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:31:17.905560 [info ] [Thread-1 (]: 1 of 61 START test not_null_dim_classe_instituicao_id_classe ................... [RUN]
[0m16:31:17.906568 [debug] [Thread-1 (]: Acquiring new duckdb connection 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m16:31:17.907075 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:31:17.929334 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:31:17.931433 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:31:17.965839 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:31:17.967511 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:31:17.969811 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m16:31:17.970364 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:31:17.971374 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:17.972394 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:31:17.972917 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m16:31:17.975934 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:31:17.982664 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m16:31:17.984273 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m16:31:17.984273 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m16:31:17.985864 [info ] [Thread-1 (]: 1 of 61 PASS not_null_dim_classe_instituicao_id_classe ......................... [[32mPASS[0m in 0.08s]
[0m16:31:17.988401 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:31:17.989590 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:31:17.990687 [info ] [Thread-1 (]: 2 of 61 START test not_null_dim_consolidado_id_consolidado ..................... [RUN]
[0m16:31:17.991316 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m16:31:17.992619 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:31:18.001833 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:31:18.005641 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:31:18.010243 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:31:18.012831 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:31:18.013840 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m16:31:18.013840 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.015461 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.016475 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:31:18.016475 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.017775 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.021453 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m16:31:18.023419 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m16:31:18.024431 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m16:31:18.025430 [info ] [Thread-1 (]: 2 of 61 PASS not_null_dim_consolidado_id_consolidado ........................... [[32mPASS[0m in 0.03s]
[0m16:31:18.026437 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:31:18.027951 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:31:18.029619 [info ] [Thread-1 (]: 3 of 61 START test not_null_dim_controle_id_controle ........................... [RUN]
[0m16:31:18.029619 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m16:31:18.031252 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:31:18.036811 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:31:18.038906 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:31:18.042953 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:31:18.045212 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:31:18.045721 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m16:31:18.046258 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.047352 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.047352 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:31:18.048364 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.049873 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.051472 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m16:31:18.054475 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m16:31:18.055016 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m16:31:18.055565 [info ] [Thread-1 (]: 3 of 61 PASS not_null_dim_controle_id_controle ................................. [[32mPASS[0m in 0.03s]
[0m16:31:18.057483 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:31:18.057483 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:31:18.058494 [info ] [Thread-1 (]: 4 of 61 START test not_null_dim_instituicao_id_instituicao ..................... [RUN]
[0m16:31:18.060006 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m16:31:18.060586 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:31:18.068121 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:31:18.070355 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:31:18.073165 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:31:18.075176 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:31:18.076178 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m16:31:18.077179 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.078181 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.078181 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:31:18.079474 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.081102 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.084253 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m16:31:18.084253 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m16:31:18.085851 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m16:31:18.086472 [info ] [Thread-1 (]: 4 of 61 PASS not_null_dim_instituicao_id_instituicao ........................... [[32mPASS[0m in 0.03s]
[0m16:31:18.086994 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:31:18.088005 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:31:18.088005 [info ] [Thread-1 (]: 5 of 61 START test not_null_dim_instituicao_id_localizacao ..................... [RUN]
[0m16:31:18.089005 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m16:31:18.090004 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:31:18.095368 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:31:18.098518 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:31:18.102859 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:31:18.105054 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:31:18.106077 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m16:31:18.106077 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.107207 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.107207 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:31:18.108724 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.110238 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.112594 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m16:31:18.113603 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m16:31:18.115114 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m16:31:18.116632 [info ] [Thread-1 (]: 5 of 61 PASS not_null_dim_instituicao_id_localizacao ........................... [[32mPASS[0m in 0.03s]
[0m16:31:18.117772 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:31:18.117772 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:31:18.118317 [info ] [Thread-1 (]: 6 of 61 START test not_null_dim_localizacao_id_localizacao ..................... [RUN]
[0m16:31:18.119837 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m16:31:18.120342 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:31:18.127889 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:31:18.129511 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:31:18.134555 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:31:18.137021 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:31:18.137021 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m16:31:18.138031 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.138031 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.139032 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:31:18.139032 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.141091 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.143119 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m16:31:18.144726 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m16:31:18.144726 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m16:31:18.145738 [info ] [Thread-1 (]: 6 of 61 PASS not_null_dim_localizacao_id_localizacao ........................... [[32mPASS[0m in 0.03s]
[0m16:31:18.147972 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:31:18.147972 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:31:18.149507 [info ] [Thread-1 (]: 7 of 61 START test not_null_dim_segmento_id_segmento ........................... [RUN]
[0m16:31:18.149507 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m16:31:18.151114 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:31:18.155085 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:31:18.157274 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:31:18.161806 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:31:18.163851 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:31:18.163851 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m16:31:18.164870 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.165479 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.166491 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:31:18.166491 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.167784 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.170412 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m16:31:18.171487 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m16:31:18.173049 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m16:31:18.174060 [info ] [Thread-1 (]: 7 of 61 PASS not_null_dim_segmento_id_segmento ................................. [[32mPASS[0m in 0.02s]
[0m16:31:18.175058 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:31:18.175058 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:31:18.176058 [info ] [Thread-1 (]: 8 of 61 START test not_null_dim_tempo_id_data .................................. [RUN]
[0m16:31:18.177057 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m16:31:18.177057 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:31:18.186133 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:31:18.188153 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:31:18.192702 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:31:18.195581 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:31:18.195581 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m16:31:18.196595 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.198197 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.199204 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:31:18.199712 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.201220 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.203899 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m16:31:18.206194 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m16:31:18.206194 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m16:31:18.208281 [info ] [Thread-1 (]: 8 of 61 PASS not_null_dim_tempo_id_data ........................................ [[32mPASS[0m in 0.03s]
[0m16:31:18.209370 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:31:18.210570 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:31:18.211596 [info ] [Thread-1 (]: 9 of 61 START test not_null_fato_balanco_patrimonial_id_data ................... [RUN]
[0m16:31:18.212689 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m16:31:18.212689 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:31:18.217378 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:31:18.220247 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:31:18.223804 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:31:18.226024 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:31:18.227038 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m16:31:18.227038 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.228544 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.228544 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:31:18.229556 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.231191 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.234341 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m16:31:18.236968 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m16:31:18.238020 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m16:31:18.239093 [info ] [Thread-1 (]: 9 of 61 PASS not_null_fato_balanco_patrimonial_id_data ......................... [[32mPASS[0m in 0.03s]
[0m16:31:18.240274 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:31:18.240810 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:31:18.241349 [info ] [Thread-1 (]: 10 of 61 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m16:31:18.242422 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m16:31:18.242944 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:31:18.248224 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:31:18.250957 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:31:18.257709 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:31:18.258720 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:31:18.260229 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m16:31:18.260229 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.261832 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.262701 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:31:18.262701 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.265225 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.267368 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m16:31:18.270229 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m16:31:18.270886 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m16:31:18.271412 [info ] [Thread-1 (]: 10 of 61 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.03s]
[0m16:31:18.273149 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:31:18.274163 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:31:18.274163 [info ] [Thread-1 (]: 11 of 61 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m16:31:18.275159 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m16:31:18.275159 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:31:18.279681 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:31:18.283086 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:31:18.285732 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:31:18.287923 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:31:18.287923 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m16:31:18.287923 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.289799 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.289799 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:31:18.290809 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.293166 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.295388 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m16:31:18.297501 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m16:31:18.298512 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m16:31:18.299511 [info ] [Thread-1 (]: 11 of 61 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:31:18.299511 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:31:18.299511 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:31:18.301745 [info ] [Thread-1 (]: 12 of 61 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m16:31:18.302803 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m16:31:18.303319 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:31:18.308422 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:31:18.311533 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:31:18.315220 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:31:18.317813 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:31:18.318372 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m16:31:18.318372 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.319382 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.319382 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:31:18.320643 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.321653 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.324728 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m16:31:18.326728 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m16:31:18.327505 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m16:31:18.328770 [info ] [Thread-1 (]: 12 of 61 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.03s]
[0m16:31:18.329862 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:31:18.330403 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:31:18.331464 [info ] [Thread-1 (]: 13 of 61 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m16:31:18.332087 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m16:31:18.332622 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:31:18.337827 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:31:18.339827 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:31:18.344102 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:31:18.345728 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:31:18.346731 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m16:31:18.347240 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.347785 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.347785 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:31:18.349307 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.350882 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.352544 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m16:31:18.354153 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m16:31:18.354762 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m16:31:18.356377 [info ] [Thread-1 (]: 13 of 61 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m16:31:18.357537 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:31:18.358549 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:31:18.358549 [info ] [Thread-1 (]: 14 of 61 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m16:31:18.358549 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m16:31:18.360058 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:31:18.366688 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:31:18.369205 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:31:18.371476 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:31:18.373712 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:31:18.373712 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m16:31:18.374715 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.375714 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.376714 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:31:18.376714 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.378835 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.380862 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m16:31:18.382658 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m16:31:18.382658 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m16:31:18.382658 [info ] [Thread-1 (]: 14 of 61 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.02s]
[0m16:31:18.384274 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:31:18.385849 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:31:18.385849 [info ] [Thread-1 (]: 15 of 61 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m16:31:18.386856 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m16:31:18.387896 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:31:18.395066 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:31:18.397601 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:31:18.400265 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:31:18.402443 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:31:18.402969 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m16:31:18.404124 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.404705 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.406301 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:31:18.406301 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.408354 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.410512 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m16:31:18.411598 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m16:31:18.412608 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m16:31:18.413700 [info ] [Thread-1 (]: 15 of 61 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.03s]
[0m16:31:18.415209 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:31:18.416220 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:31:18.417313 [info ] [Thread-1 (]: 16 of 61 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m16:31:18.418327 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m16:31:18.419325 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:31:18.424214 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:31:18.426801 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:31:18.431264 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:31:18.432785 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:31:18.432785 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m16:31:18.434386 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.434386 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.434386 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:31:18.435987 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.436996 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.440114 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m16:31:18.441735 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m16:31:18.442253 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m16:31:18.442798 [info ] [Thread-1 (]: 16 of 61 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:31:18.443353 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:31:18.444363 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:31:18.445422 [info ] [Thread-1 (]: 17 of 61 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m16:31:18.445422 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m16:31:18.446934 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:31:18.452608 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:31:18.454712 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:31:18.457429 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:31:18.458986 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:31:18.460501 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m16:31:18.460501 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.462535 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.462535 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:31:18.463555 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.465642 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.467163 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m16:31:18.469236 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m16:31:18.469755 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m16:31:18.470825 [info ] [Thread-1 (]: 17 of 61 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.02s]
[0m16:31:18.471360 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:31:18.472002 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:31:18.472002 [info ] [Thread-1 (]: 18 of 61 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m16:31:18.473984 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m16:31:18.475056 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:31:18.479719 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:31:18.482808 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:31:18.485866 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:31:18.488841 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:31:18.489465 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m16:31:18.489465 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.490477 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.490477 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:31:18.492584 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.494116 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.497233 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m16:31:18.498240 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m16:31:18.499757 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m16:31:18.499757 [info ] [Thread-1 (]: 18 of 61 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.03s]
[0m16:31:18.501264 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:31:18.503006 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:31:18.503533 [info ] [Thread-1 (]: 19 of 61 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m16:31:18.504717 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m16:31:18.504717 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:31:18.510017 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:31:18.512669 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:31:18.516421 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:31:18.519055 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:31:18.519647 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m16:31:18.520243 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.521312 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.521312 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:31:18.521312 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.523702 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.526704 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m16:31:18.528217 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m16:31:18.529873 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m16:31:18.529873 [info ] [Thread-1 (]: 19 of 61 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.03s]
[0m16:31:18.531622 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:31:18.532634 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:31:18.532634 [info ] [Thread-1 (]: 20 of 61 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m16:31:18.534867 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m16:31:18.534867 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:31:18.545432 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:31:18.547559 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:31:18.551387 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:31:18.553516 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:31:18.554759 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m16:31:18.554759 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.556402 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.556990 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:31:18.557625 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.558634 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.560143 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m16:31:18.560143 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m16:31:18.561756 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m16:31:18.562765 [info ] [Thread-1 (]: 20 of 61 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.03s]
[0m16:31:18.564034 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:31:18.565031 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:31:18.566079 [info ] [Thread-1 (]: 21 of 61 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m16:31:18.566598 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m16:31:18.567614 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:31:18.572778 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:31:18.574793 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:31:18.578127 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:31:18.581497 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:31:18.581497 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m16:31:18.582670 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.583206 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.584220 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:31:18.584220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.586850 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.588377 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m16:31:18.590899 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m16:31:18.592414 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m16:31:18.592925 [info ] [Thread-1 (]: 21 of 61 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.03s]
[0m16:31:18.594525 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:31:18.594525 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:31:18.595535 [info ] [Thread-1 (]: 22 of 61 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m16:31:18.596704 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m16:31:18.597291 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:31:18.603377 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:31:18.605190 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:31:18.609228 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:31:18.610231 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:31:18.611964 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m16:31:18.611964 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.613489 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.613489 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:31:18.615019 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.616623 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.618140 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m16:31:18.619649 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m16:31:18.620238 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m16:31:18.621247 [info ] [Thread-1 (]: 22 of 61 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.03s]
[0m16:31:18.622403 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:31:18.622924 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:31:18.623935 [info ] [Thread-1 (]: 23 of 61 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m16:31:18.623935 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m16:31:18.624937 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:31:18.632105 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:31:18.634242 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:31:18.638052 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:31:18.640052 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:31:18.641145 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m16:31:18.641145 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.642151 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.642676 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:31:18.643284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.644353 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.646871 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m16:31:18.648484 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m16:31:18.649484 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m16:31:18.651127 [info ] [Thread-1 (]: 23 of 61 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.03s]
[0m16:31:18.652373 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:31:18.652932 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:31:18.653457 [info ] [Thread-1 (]: 24 of 61 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m16:31:18.654625 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m16:31:18.655276 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:31:18.660482 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:31:18.662650 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:31:18.669010 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:31:18.670145 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:31:18.671754 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m16:31:18.672506 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.673030 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.674692 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:31:18.676039 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.678051 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.678051 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m16:31:18.681266 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m16:31:18.681773 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m16:31:18.682781 [info ] [Thread-1 (]: 24 of 61 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.03s]
[0m16:31:18.683790 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:31:18.684945 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:31:18.684945 [info ] [Thread-1 (]: 25 of 61 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m16:31:18.685943 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m16:31:18.687062 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:31:18.692103 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:31:18.693144 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:31:18.697178 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:31:18.699190 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:31:18.700533 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m16:31:18.701041 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.701634 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.702201 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:31:18.702728 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.704880 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.707185 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m16:31:18.708853 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m16:31:18.709381 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m16:31:18.710990 [info ] [Thread-1 (]: 25 of 61 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:31:18.712066 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:31:18.712590 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:31:18.713690 [info ] [Thread-1 (]: 26 of 61 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m16:31:18.715236 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m16:31:18.716249 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:31:18.722720 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:31:18.725740 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:31:18.729246 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:31:18.731264 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:31:18.731264 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m16:31:18.732793 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.734420 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.734420 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:31:18.734420 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.737705 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.740231 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m16:31:18.742750 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m16:31:18.742750 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m16:31:18.745019 [info ] [Thread-1 (]: 26 of 61 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.03s]
[0m16:31:18.747033 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:31:18.748102 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:31:18.748102 [info ] [Thread-1 (]: 27 of 61 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m16:31:18.749610 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m16:31:18.749610 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:31:18.756181 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:31:18.758796 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:31:18.762048 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:31:18.763575 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:31:18.763575 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m16:31:18.765678 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.767198 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.767734 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:31:18.767734 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.770264 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.773234 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m16:31:18.775250 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m16:31:18.776246 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m16:31:18.777245 [info ] [Thread-1 (]: 27 of 61 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.03s]
[0m16:31:18.778246 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:31:18.779597 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:31:18.780124 [info ] [Thread-1 (]: 28 of 61 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m16:31:18.781647 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m16:31:18.782656 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:31:18.789165 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:31:18.791228 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:31:18.795749 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:31:18.797899 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:31:18.798737 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m16:31:18.799813 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.800373 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.801894 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:31:18.801894 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.804169 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.806293 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m16:31:18.808386 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m16:31:18.808386 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m16:31:18.809896 [info ] [Thread-1 (]: 28 of 61 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.03s]
[0m16:31:18.810493 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:31:18.810493 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:31:18.811502 [info ] [Thread-1 (]: 29 of 61 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m16:31:18.811502 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m16:31:18.812766 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:31:18.821735 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:31:18.823917 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:31:18.827014 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:31:18.828011 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:31:18.829623 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m16:31:18.830365 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.831378 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.832723 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:31:18.832723 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.835324 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.836923 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m16:31:18.837966 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m16:31:18.838957 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m16:31:18.838957 [info ] [Thread-1 (]: 29 of 61 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.03s]
[0m16:31:18.839950 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:31:18.841040 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:31:18.842554 [info ] [Thread-1 (]: 30 of 61 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m16:31:18.843084 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m16:31:18.844605 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:31:18.851135 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:31:18.852892 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:31:18.858541 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:31:18.862064 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:31:18.862587 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m16:31:18.863128 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.865274 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:31:18.866284 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:31:18.866284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.867321 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.869467 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m16:31:18.870100 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m16:31:18.871714 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m16:31:18.872725 [info ] [Thread-1 (]: 30 of 61 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.03s]
[0m16:31:18.873774 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:31:18.873774 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:31:18.874775 [info ] [Thread-1 (]: 31 of 61 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m16:31:18.875776 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m16:31:18.876470 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:31:18.882798 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:31:18.883812 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:31:18.886905 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:31:18.888939 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:31:18.889915 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m16:31:18.889915 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.891522 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.892045 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:31:18.893087 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.894608 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.896616 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m16:31:18.898135 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m16:31:18.898135 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m16:31:18.899793 [info ] [Thread-1 (]: 31 of 61 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.02s]
[0m16:31:18.900307 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:31:18.901369 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:31:18.901369 [info ] [Thread-1 (]: 32 of 61 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m16:31:18.901904 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m16:31:18.902437 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:31:18.908934 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:31:18.910442 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:31:18.913828 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:31:18.916947 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:31:18.917455 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m16:31:18.918465 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.919578 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.921218 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:31:18.921218 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.923629 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:18.925980 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m16:31:18.927989 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m16:31:18.928498 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m16:31:18.929526 [info ] [Thread-1 (]: 32 of 61 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.03s]
[0m16:31:18.932675 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:31:18.933880 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:31:18.934989 [info ] [Thread-1 (]: 33 of 61 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m16:31:18.935999 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m16:31:18.937088 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:31:18.948120 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:31:18.951262 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:31:18.961848 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:31:18.964896 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:31:18.966118 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m16:31:18.967018 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:18.969154 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:31:18.969599 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:31:18.970497 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:18.976998 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:31:18.980860 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m16:31:18.982982 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m16:31:18.983536 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m16:31:18.985072 [info ] [Thread-1 (]: 33 of 61 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.05s]
[0m16:31:18.987130 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:31:18.987638 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:31:18.988648 [info ] [Thread-1 (]: 34 of 61 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m16:31:18.990157 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m16:31:18.991171 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:31:19.003029 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:31:19.004989 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:31:19.009227 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:31:19.011574 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:31:19.012081 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m16:31:19.012081 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.012596 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.013617 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:31:19.013617 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.018161 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:31:19.020385 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m16:31:19.021912 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m16:31:19.022928 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m16:31:19.024006 [info ] [Thread-1 (]: 34 of 61 PASS relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[32mPASS[0m in 0.03s]
[0m16:31:19.025363 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:31:19.025363 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:31:19.026388 [info ] [Thread-1 (]: 35 of 61 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m16:31:19.027692 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m16:31:19.028200 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:31:19.047414 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:31:19.049897 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:31:19.054246 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:31:19.056953 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:31:19.057971 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m16:31:19.057971 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.060003 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:31:19.061076 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:31:19.062084 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.067559 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:31:19.071232 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m16:31:19.072769 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m16:31:19.072769 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m16:31:19.074787 [info ] [Thread-1 (]: 35 of 61 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.05s]
[0m16:31:19.075800 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:31:19.075800 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:31:19.076801 [info ] [Thread-1 (]: 36 of 61 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m16:31:19.079318 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m16:31:19.079846 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:31:19.088337 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:31:19.089857 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:31:19.095492 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:31:19.096511 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:31:19.098026 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m16:31:19.098026 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.099545 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.099545 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:31:19.101232 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.108346 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:31:19.112319 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m16:31:19.113839 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m16:31:19.114848 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m16:31:19.133811 [error] [Thread-1 (]: 36 of 61 FAIL 1 relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[31mFAIL 1[0m in 0.05s]
[0m16:31:19.153350 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:31:19.154952 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:31:19.156137 [info ] [Thread-1 (]: 37 of 61 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m16:31:19.157790 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m16:31:19.158803 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:31:19.168821 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:31:19.174884 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:31:19.179003 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:31:19.181252 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:31:19.182141 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m16:31:19.182670 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.184687 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:31:19.185410 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:31:19.186475 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.189840 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:31:19.191356 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m16:31:19.195018 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m16:31:19.196033 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m16:31:19.197431 [info ] [Thread-1 (]: 37 of 61 PASS relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[32mPASS[0m in 0.04s]
[0m16:31:19.199031 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:31:19.200026 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:31:19.200838 [info ] [Thread-1 (]: 38 of 61 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:31:19.201349 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m16:31:19.202881 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:31:19.212631 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:31:19.215153 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:31:19.221697 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:31:19.224509 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:31:19.225524 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m16:31:19.226526 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.227523 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.228523 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:31:19.228523 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.236724 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:31:19.239110 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m16:31:19.241128 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m16:31:19.241128 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m16:31:19.242639 [info ] [Thread-1 (]: 38 of 61 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.04s]
[0m16:31:19.244170 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:31:19.245169 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:31:19.246171 [info ] [Thread-1 (]: 39 of 61 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:31:19.246678 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m16:31:19.247296 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:31:19.256593 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:31:19.257824 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:31:19.263054 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:31:19.266090 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:31:19.267127 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m16:31:19.267127 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.269067 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.269067 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:31:19.270522 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.284943 [debug] [Thread-1 (]: SQL status: OK in 0.014 seconds
[0m16:31:19.286976 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m16:31:19.289502 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m16:31:19.290500 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m16:31:19.291501 [info ] [Thread-1 (]: 39 of 61 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:31:19.294026 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:31:19.295031 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:31:19.296437 [info ] [Thread-1 (]: 40 of 61 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:31:19.303004 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m16:31:19.303970 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:31:19.313031 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:31:19.316579 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:31:19.321043 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:31:19.323987 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:31:19.325002 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m16:31:19.327013 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.328529 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.329537 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:31:19.329537 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.338618 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:31:19.341141 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m16:31:19.343665 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m16:31:19.344666 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m16:31:19.346685 [info ] [Thread-1 (]: 40 of 61 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.04s]
[0m16:31:19.347956 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:31:19.348978 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:31:19.351510 [info ] [Thread-1 (]: 41 of 61 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:31:19.355016 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m16:31:19.356013 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:31:19.369240 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:31:19.371242 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:31:19.376772 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:31:19.378801 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:31:19.379799 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m16:31:19.380804 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.381312 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.382827 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:31:19.383850 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.396533 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:31:19.399546 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m16:31:19.401543 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m16:31:19.401543 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m16:31:19.404066 [info ] [Thread-1 (]: 41 of 61 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.05s]
[0m16:31:19.405069 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:31:19.408603 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:31:19.409597 [info ] [Thread-1 (]: 42 of 61 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:31:19.412599 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m16:31:19.413107 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:31:19.427824 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:31:19.431349 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:31:19.439430 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:31:19.441434 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:31:19.444964 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m16:31:19.448047 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.450047 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:31:19.451048 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:31:19.452047 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.459178 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:31:19.462172 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m16:31:19.463693 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m16:31:19.464699 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m16:31:19.465711 [info ] [Thread-1 (]: 42 of 61 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.05s]
[0m16:31:19.475250 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:31:19.477239 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:31:19.477766 [info ] [Thread-1 (]: 43 of 61 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:31:19.478471 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m16:31:19.481004 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:31:19.496238 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:31:19.500235 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:31:19.504814 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:31:19.507377 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:31:19.508830 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m16:31:19.510264 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.511283 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.511283 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:31:19.512795 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.521305 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:31:19.524498 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m16:31:19.525976 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m16:31:19.526994 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m16:31:19.528512 [error] [Thread-1 (]: 43 of 61 FAIL 1 relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mFAIL 1[0m in 0.05s]
[0m16:31:19.531210 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:31:19.531721 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:31:19.532732 [info ] [Thread-1 (]: 44 of 61 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:31:19.533242 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m16:31:19.534252 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:31:19.542913 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:31:19.545347 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:31:19.549361 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:31:19.552889 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:31:19.553399 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m16:31:19.554416 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.555410 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.556425 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:31:19.557423 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.562938 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:31:19.566985 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m16:31:19.567991 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m16:31:19.569793 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m16:31:19.570805 [info ] [Thread-1 (]: 44 of 61 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.04s]
[0m16:31:19.572806 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:31:19.573315 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:31:19.574328 [info ] [Thread-1 (]: 45 of 61 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:31:19.575405 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m16:31:19.576419 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:31:19.585957 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:31:19.592998 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:31:19.597966 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:31:19.600981 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:31:19.601988 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m16:31:19.602980 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.604000 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.604512 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:31:19.605579 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.613350 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:31:19.616889 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m16:31:19.618878 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m16:31:19.619881 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m16:31:19.620877 [error] [Thread-1 (]: 45 of 61 FAIL 1 relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mFAIL 1[0m in 0.05s]
[0m16:31:19.622877 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:31:19.623900 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:31:19.624915 [info ] [Thread-1 (]: 46 of 61 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:31:19.626436 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m16:31:19.628455 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:31:19.637150 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:31:19.641157 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:31:19.645215 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:31:19.648341 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:31:19.649359 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m16:31:19.650363 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.651357 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.652359 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:31:19.652871 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.666256 [debug] [Thread-1 (]: SQL status: OK in 0.013 seconds
[0m16:31:19.670400 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m16:31:19.672930 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m16:31:19.676997 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m16:31:19.679008 [info ] [Thread-1 (]: 46 of 61 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.05s]
[0m16:31:19.680161 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:31:19.681686 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:31:19.682708 [info ] [Thread-1 (]: 47 of 61 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:31:19.684735 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m16:31:19.685748 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:31:19.703682 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:31:19.706697 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:31:19.717522 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:31:19.719722 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:31:19.720338 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m16:31:19.721351 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.722375 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.722910 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:31:19.723920 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.737391 [debug] [Thread-1 (]: SQL status: OK in 0.013 seconds
[0m16:31:19.740923 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m16:31:19.741923 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m16:31:19.742981 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m16:31:19.742981 [info ] [Thread-1 (]: 47 of 61 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.06s]
[0m16:31:19.745611 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:31:19.745611 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:31:19.747123 [info ] [Thread-1 (]: 48 of 61 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:31:19.747639 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m16:31:19.747639 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:31:19.757306 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:31:19.760338 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:31:19.765216 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:31:19.767442 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:31:19.767442 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m16:31:19.769040 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.769614 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.770177 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:31:19.770177 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.774842 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:31:19.775854 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m16:31:19.777854 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m16:31:19.778366 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m16:31:19.780386 [info ] [Thread-1 (]: 48 of 61 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:31:19.781895 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:31:19.782933 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:31:19.783942 [info ] [Thread-1 (]: 49 of 61 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:31:19.784453 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m16:31:19.785965 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:31:19.794768 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:31:19.797140 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:31:19.800863 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:31:19.803526 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:31:19.804255 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m16:31:19.804837 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.806357 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.807372 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:31:19.807372 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.811517 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:31:19.816130 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m16:31:19.817493 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m16:31:19.818924 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m16:31:19.819740 [info ] [Thread-1 (]: 49 of 61 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:31:19.822627 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:31:19.823638 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:31:19.823638 [info ] [Thread-1 (]: 50 of 61 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:31:19.824642 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m16:31:19.825804 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:31:19.834959 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:31:19.838464 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:31:19.842567 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:31:19.845483 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:31:19.846117 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m16:31:19.847121 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.848730 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.849252 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:31:19.850265 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.855522 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:31:19.859453 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m16:31:19.860963 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m16:31:19.861570 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m16:31:19.863091 [info ] [Thread-1 (]: 50 of 61 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.04s]
[0m16:31:19.863995 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:31:19.865202 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:31:19.866486 [info ] [Thread-1 (]: 51 of 61 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:31:19.867498 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m16:31:19.868340 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:31:19.879425 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:31:19.882959 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:31:19.887496 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:31:19.890006 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:31:19.890515 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m16:31:19.891759 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.892771 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.893787 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:31:19.894789 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.903316 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:31:19.906372 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m16:31:19.907883 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m16:31:19.908895 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m16:31:19.912899 [error] [Thread-1 (]: 51 of 61 FAIL 1 relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mFAIL 1[0m in 0.04s]
[0m16:31:19.914417 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:31:19.915433 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:31:19.916444 [info ] [Thread-1 (]: 52 of 61 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m16:31:19.917444 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m16:31:19.918958 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:31:19.931234 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:31:19.933759 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:31:19.939573 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:31:19.942358 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:31:19.943502 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m16:31:19.944028 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.945422 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.945422 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:31:19.946966 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.953998 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:31:19.957195 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m16:31:19.959209 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m16:31:19.959209 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m16:31:19.961733 [info ] [Thread-1 (]: 52 of 61 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.04s]
[0m16:31:19.963258 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:31:19.963258 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:31:19.964770 [info ] [Thread-1 (]: 53 of 61 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:31:19.965362 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m16:31:19.966374 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:31:19.974806 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:31:19.976813 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:31:19.980340 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:31:19.983575 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:31:19.984082 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m16:31:19.985098 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:19.986091 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:19.986091 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:31:19.986091 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:19.991986 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:31:19.994530 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m16:31:19.996542 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m16:31:19.997566 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m16:31:19.998576 [info ] [Thread-1 (]: 53 of 61 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:31:19.999576 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:31:19.999576 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:31:20.001326 [info ] [Thread-1 (]: 54 of 61 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:31:20.002931 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m16:31:20.003438 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:31:20.012892 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:31:20.015848 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:31:20.020055 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:31:20.022938 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:31:20.024454 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m16:31:20.024454 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:20.025462 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:20.026465 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:31:20.026465 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:31:20.042694 [debug] [Thread-1 (]: SQL status: OK in 0.013 seconds
[0m16:31:20.046423 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m16:31:20.048531 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m16:31:20.048531 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m16:31:20.049527 [info ] [Thread-1 (]: 54 of 61 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.05s]
[0m16:31:20.051685 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:31:20.052283 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:31:20.053326 [info ] [Thread-1 (]: 55 of 61 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m16:31:20.053901 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m16:31:20.053901 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:31:20.067422 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:31:20.069672 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:31:20.074168 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:31:20.077743 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:31:20.077743 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m16:31:20.079356 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:20.080370 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:20.080881 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:31:20.081404 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:31:20.086876 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:31:20.090502 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m16:31:20.092645 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m16:31:20.093175 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m16:31:20.094698 [info ] [Thread-1 (]: 55 of 61 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.04s]
[0m16:31:20.095717 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:31:20.096712 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:31:20.097223 [info ] [Thread-1 (]: 56 of 61 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m16:31:20.098237 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m16:31:20.099754 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:31:20.106539 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:31:20.108717 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:31:20.112592 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:31:20.115120 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:31:20.115120 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m16:31:20.116720 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:20.117406 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:20.117406 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:31:20.117406 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:31:20.123169 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:31:20.125690 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m16:31:20.126702 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m16:31:20.128212 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m16:31:20.129847 [info ] [Thread-1 (]: 56 of 61 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.03s]
[0m16:31:20.130862 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:31:20.130862 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:31:20.132496 [info ] [Thread-1 (]: 57 of 61 START test unique_dim_controle_id_controle ............................ [RUN]
[0m16:31:20.134038 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m16:31:20.134549 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:31:20.148688 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:31:20.151686 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:31:20.156895 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:31:20.159993 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:31:20.160630 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m16:31:20.160630 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:20.162818 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:20.163832 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:31:20.165342 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:31:20.169077 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:31:20.171293 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m16:31:20.173238 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m16:31:20.174256 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m16:31:20.176253 [info ] [Thread-1 (]: 57 of 61 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.04s]
[0m16:31:20.177764 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:31:20.179394 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:31:20.181584 [info ] [Thread-1 (]: 58 of 61 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m16:31:20.182612 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m16:31:20.183125 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:31:20.190861 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:31:20.192874 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:31:20.198019 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:31:20.200275 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:31:20.201790 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m16:31:20.202810 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:20.204509 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:31:20.205140 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:31:20.206158 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:31:20.211594 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:31:20.214121 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m16:31:20.215144 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m16:31:20.217364 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m16:31:20.217364 [info ] [Thread-1 (]: 58 of 61 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.04s]
[0m16:31:20.219412 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:31:20.220427 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:31:20.221446 [info ] [Thread-1 (]: 59 of 61 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m16:31:20.223898 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m16:31:20.224451 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:31:20.231697 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:31:20.234240 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:31:20.238366 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:31:20.240892 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:31:20.240892 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m16:31:20.240892 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:20.242962 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:20.242962 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:31:20.244547 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:31:20.248192 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:31:20.250210 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m16:31:20.251222 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m16:31:20.252733 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m16:31:20.253744 [info ] [Thread-1 (]: 59 of 61 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.03s]
[0m16:31:20.254746 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:31:20.255744 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:31:20.255744 [info ] [Thread-1 (]: 60 of 61 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m16:31:20.257439 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m16:31:20.258469 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:31:20.263759 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:31:20.266286 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:31:20.269565 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:31:20.271677 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:31:20.271677 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m16:31:20.272193 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:20.272702 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:20.273712 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:31:20.274712 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:31:20.276711 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:31:20.280194 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m16:31:20.282360 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m16:31:20.282883 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m16:31:20.283894 [info ] [Thread-1 (]: 60 of 61 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.03s]
[0m16:31:20.285642 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:31:20.285642 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:31:20.287160 [info ] [Thread-1 (]: 61 of 61 START test unique_dim_tempo_id_data ................................... [RUN]
[0m16:31:20.287160 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m16:31:20.287160 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:31:20.292711 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:31:20.294970 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:31:20.301036 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:31:20.303573 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:31:20.304575 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m16:31:20.305083 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:31:20.306099 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:20.306099 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:31:20.307355 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:31:20.311596 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:31:20.315231 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m16:31:20.316244 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m16:31:20.316244 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m16:31:20.317687 [info ] [Thread-1 (]: 61 of 61 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.03s]
[0m16:31:20.319287 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:31:20.323039 [debug] [MainThread]: Using duckdb connection "master"
[0m16:31:20.323039 [debug] [MainThread]: On master: BEGIN
[0m16:31:20.323039 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:31:20.324049 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:31:20.325050 [debug] [MainThread]: On master: COMMIT
[0m16:31:20.325564 [debug] [MainThread]: Using duckdb connection "master"
[0m16:31:20.325564 [debug] [MainThread]: On master: COMMIT
[0m16:31:20.326582 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:31:20.328095 [debug] [MainThread]: On master: Close
[0m16:31:20.328095 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:31:20.329710 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:31:20.329710 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e' was properly closed.
[0m16:31:20.329710 [info ] [MainThread]: 
[0m16:31:20.329710 [info ] [MainThread]: Finished running 61 data tests in 0 hours 0 minutes and 3.82 seconds (3.82s).
[0m16:31:20.345402 [debug] [MainThread]: Command end result
[0m16:31:20.506772 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:31:20.511813 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:31:20.525618 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:31:20.526619 [info ] [MainThread]: 
[0m16:31:20.527617 [info ] [MainThread]: [31mCompleted with 4 errors, 0 partial successes, and 0 warnings:[0m
[0m16:31:20.528013 [info ] [MainThread]: 
[0m16:31:20.529539 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)[0m
[0m16:31:20.529539 [error] [MainThread]:   Got 1 result, configured to fail if != 0
[0m16:31:20.531206 [info ] [MainThread]: 
[0m16:31:20.531206 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_446031b84e0fad1bdbfdd1cf73647908.sql
[0m16:31:20.531206 [info ] [MainThread]: 
[0m16:31:20.533257 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m16:31:20.533257 [error] [MainThread]:   Got 1 result, configured to fail if != 0
[0m16:31:20.534265 [info ] [MainThread]: 
[0m16:31:20.534265 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_d80151d1e76d6c8de6ceccc7adebe863.sql
[0m16:31:20.535886 [info ] [MainThread]: 
[0m16:31:20.536897 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m16:31:20.537403 [error] [MainThread]:   Got 1 result, configured to fail if != 0
[0m16:31:20.537403 [info ] [MainThread]: 
[0m16:31:20.537403 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_b00506d5726bd2130bedc66dca5f83d0.sql
[0m16:31:20.538412 [info ] [MainThread]: 
[0m16:31:20.538412 [error] [MainThread]: [31mFailure in test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m16:31:20.539922 [error] [MainThread]:   Got 1 result, configured to fail if != 0
[0m16:31:20.540934 [info ] [MainThread]: 
[0m16:31:20.541938 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_operacoes_c_33521a505ad34b09fd04bb9cb908c25d.sql
[0m16:31:20.541938 [info ] [MainThread]: 
[0m16:31:20.543590 [info ] [MainThread]: Done. PASS=57 WARN=0 ERROR=4 SKIP=0 NO-OP=0 TOTAL=61
[0m16:31:20.544638 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:31:20.547428 [debug] [MainThread]: Command `dbt test` failed at 16:31:20.547428 after 9.97 seconds
[0m16:31:20.547428 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4C027920>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4BC89E80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FC4B166C00>]}
[0m16:31:20.547428 [debug] [MainThread]: Flushing usage events
[0m16:31:21.220314 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:32:59.242838 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39ACE3B30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39ACE1FD0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39B1EC470>]}


============================== 16:32:59.253370 | ce263ffb-a772-43f5-a249-369372740189 ==============================
[0m16:32:59.253370 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:32:59.254567 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:32:59.654912 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39874F020>]}
[0m16:32:59.731619 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39BD00470>]}
[0m16:32:59.737109 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:33:00.107807 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:33:00.399861 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m16:33:00.400369 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m16:33:00.400893 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m16:33:00.412233 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:33:00.468040 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39D189340>]}
[0m16:33:00.598330 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:33:00.602610 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:33:00.802604 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39D42AAB0>]}
[0m16:33:00.803182 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:33:00.809995 [info ] [MainThread]: 
[0m16:33:00.810572 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:33:00.810572 [info ] [MainThread]: 
[0m16:33:00.810572 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:33:00.819091 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:33:01.118328 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:33:01.118860 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:33:01.119396 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:33:01.989348 [debug] [ThreadPool]: SQL status: OK in 0.870 seconds
[0m16:33:01.990857 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:33:01.991867 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:33:01.993374 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:33:02.003638 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:33:02.004214 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:33:02.004214 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:33:02.006342 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:33:02.007869 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:33:02.008723 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:33:02.008723 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:33:02.009731 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:33:02.009731 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:33:02.011240 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:33:02.012764 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:33:02.013274 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:33:02.013274 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:33:02.014793 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:33:02.015302 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:33:02.019095 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:33:02.033348 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:33:02.034526 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:33:02.034526 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:33:02.035846 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:33:02.036595 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:33:02.037104 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:33:02.074793 [debug] [ThreadPool]: SQL status: OK in 0.037 seconds
[0m16:33:02.077326 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:33:02.080327 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:33:02.080327 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:33:02.082050 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39D94A0F0>]}
[0m16:33:02.082560 [debug] [MainThread]: Using duckdb connection "master"
[0m16:33:02.082560 [debug] [MainThread]: On master: BEGIN
[0m16:33:02.083571 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:33:02.084686 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:33:02.084686 [debug] [MainThread]: On master: COMMIT
[0m16:33:02.084686 [debug] [MainThread]: Using duckdb connection "master"
[0m16:33:02.084686 [debug] [MainThread]: On master: COMMIT
[0m16:33:02.084686 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:33:02.086460 [debug] [MainThread]: On master: Close
[0m16:33:02.101837 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:33:02.101837 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:33:02.103360 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:33:02.103360 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:33:02.114980 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:33:02.117637 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:33:02.160694 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:33:02.161700 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:33:02.161700 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:33:02.162722 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:33:02.163272 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:02.163272 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:33:02.163272 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:33:02.385781 [debug] [Thread-1 (]: SQL status: OK in 0.222 seconds
[0m16:33:02.391896 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:33:02.391896 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:33:02.393412 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:02.410442 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:33:02.410442 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:33:02.410442 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:33:02.417592 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:33:02.425933 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:33:02.426932 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:33:02.426932 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:02.431002 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:33:02.434902 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39874E150>]}
[0m16:33:02.436381 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.33s]
[0m16:33:02.437395 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:33:02.438392 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:33:02.439969 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:33:02.440495 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:33:02.441503 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:33:02.447599 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:33:02.449605 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:33:02.461134 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:33:02.463659 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:33:02.465167 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:33:02.465167 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:02.467002 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:02.467584 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:33:02.467584 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m16:33:02.522553 [debug] [Thread-1 (]: SQL status: OK in 0.054 seconds
[0m16:33:02.527549 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:33:02.528545 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:33:02.529557 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:02.531895 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:33:02.532894 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:33:02.532894 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:33:02.536293 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:33:02.540447 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:33:02.541956 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:33:02.542963 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:02.544645 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:33:02.545736 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39DA0E7B0>]}
[0m16:33:02.547750 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.11s]
[0m16:33:02.547750 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:33:02.549323 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:33:02.550339 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m16:33:02.551849 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:33:02.552884 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:33:02.557839 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:33:02.559573 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:33:02.563325 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:33:02.565465 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:33:02.566474 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:33:02.566474 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:02.566474 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:02.567938 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:33:02.567938 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:33:02.586085 [debug] [Thread-1 (]: SQL status: OK in 0.018 seconds
[0m16:33:02.589945 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:33:02.590475 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:33:02.591011 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:02.592019 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:33:02.592525 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:33:02.593042 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:33:02.594554 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:02.597573 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:33:02.598582 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:33:02.599581 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:02.601097 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:33:02.601705 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39D91FAD0>]}
[0m16:33:02.602270 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.05s]
[0m16:33:02.602784 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:33:02.603300 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:33:02.603853 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:33:02.604515 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:33:02.605054 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:33:02.612553 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:33:02.613563 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:33:02.619128 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:33:02.621478 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:33:02.621478 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:33:02.621478 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:02.621478 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:02.621478 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:33:02.623732 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:33:03.155868 [debug] [Thread-1 (]: SQL status: OK in 0.530 seconds
[0m16:33:03.158908 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:33:03.159906 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:33:03.161438 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:03.162981 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:33:03.162981 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:33:03.163990 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:33:03.331214 [debug] [Thread-1 (]: SQL status: OK in 0.168 seconds
[0m16:33:03.336259 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:33:03.337588 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:33:03.338602 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:03.340604 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:33:03.341607 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39DA3F590>]}
[0m16:33:03.343121 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.74s]
[0m16:33:03.343121 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:33:03.344630 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:33:03.345643 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m16:33:03.346644 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:33:03.346644 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:33:03.352270 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:33:03.353791 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:33:03.358025 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:33:03.359035 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:33:03.360498 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:33:03.360498 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:03.362706 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:03.363718 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:33:03.365232 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:33:03.586966 [debug] [Thread-1 (]: SQL status: OK in 0.220 seconds
[0m16:33:03.589632 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:33:03.590151 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m16:33:03.591246 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:03.592777 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:33:03.592777 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:33:03.594341 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:33:03.605248 [debug] [Thread-1 (]: SQL status: OK in 0.011 seconds
[0m16:33:03.608960 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:33:03.608960 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m16:33:03.610266 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:03.611962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:33:03.611962 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39D930A40>]}
[0m16:33:03.612978 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.27s]
[0m16:33:03.613515 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:33:03.613515 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:33:03.613515 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m16:33:03.615061 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:33:03.615061 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:33:03.619319 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:33:03.620334 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:33:03.624120 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:33:03.627152 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:33:03.627658 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:33:03.627658 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:03.629008 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:03.629555 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:33:03.630103 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:33:03.692805 [debug] [Thread-1 (]: SQL status: OK in 0.062 seconds
[0m16:33:03.698347 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:33:03.699858 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m16:33:03.699858 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:03.701995 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:33:03.701995 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:33:03.702833 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:33:03.726692 [debug] [Thread-1 (]: SQL status: OK in 0.023 seconds
[0m16:33:03.729349 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:33:03.729349 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m16:33:03.729888 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:03.730966 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:33:03.731499 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39DA0BE60>]}
[0m16:33:03.731499 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.12s]
[0m16:33:03.731499 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:33:03.731499 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:33:03.733064 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m16:33:03.733064 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:33:03.734082 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:33:03.737224 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:33:03.738871 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:33:03.741107 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:33:03.744435 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:33:03.745005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:33:03.745551 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:03.746625 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:03.746625 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:33:03.747165 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:33:03.802216 [debug] [Thread-1 (]: SQL status: OK in 0.055 seconds
[0m16:33:03.805928 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:33:03.805928 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:33:03.807560 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:03.808569 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:33:03.810082 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:33:03.810082 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:33:03.890514 [debug] [Thread-1 (]: SQL status: OK in 0.081 seconds
[0m16:33:03.893557 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:33:03.894566 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:33:03.894566 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:03.895724 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:33:03.896722 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39D18A6F0>]}
[0m16:33:03.897320 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.16s]
[0m16:33:03.897320 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:33:03.897320 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:33:03.898327 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:33:03.898327 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:33:03.899346 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:33:03.902584 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:33:03.904662 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:33:03.907296 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:33:03.909035 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:33:03.909566 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:33:03.910096 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:03.911180 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:03.911745 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:33:03.911745 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:33:04.367137 [debug] [Thread-1 (]: SQL status: OK in 0.455 seconds
[0m16:33:04.370217 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:33:04.370217 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:33:04.371734 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:04.372756 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:33:04.373374 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:33:04.373374 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:33:04.523268 [debug] [Thread-1 (]: SQL status: OK in 0.149 seconds
[0m16:33:04.529008 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:33:04.529518 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:33:04.530530 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:04.533039 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:33:04.535048 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39DA7F4D0>]}
[0m16:33:04.536365 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.64s]
[0m16:33:04.537458 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:33:04.538549 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:33:04.539080 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m16:33:04.541339 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:33:04.542850 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:33:04.550657 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:33:04.552785 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:33:04.558094 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:33:04.559287 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:33:04.559806 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:33:04.560364 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:04.560364 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:04.560364 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:33:04.561918 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:33:04.569329 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:33:04.573182 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:33:04.574192 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:33:04.574787 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:04.577088 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:33:04.578129 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:33:04.578677 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:33:04.590684 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:33:04.593273 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:33:04.594288 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:33:04.594803 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:04.595822 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:33:04.596819 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39D022180>]}
[0m16:33:04.598136 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.05s]
[0m16:33:04.599147 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:33:04.601165 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:33:04.603722 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:33:04.605718 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:33:04.607359 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:33:04.615053 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:33:04.616643 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:33:04.620939 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:33:04.622696 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:33:04.624711 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:33:04.624711 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:04.626709 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:04.627224 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:33:04.628234 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:33:04.663007 [debug] [Thread-1 (]: SQL status: OK in 0.034 seconds
[0m16:33:04.666862 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:33:04.667399 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:33:04.667966 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:04.668983 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:33:04.669504 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:33:04.669504 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:33:04.677205 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:33:04.679767 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:33:04.680301 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:33:04.681378 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:04.684217 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:33:04.684796 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A3AB80E510>]}
[0m16:33:04.685879 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.08s]
[0m16:33:04.685879 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:33:04.685879 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:33:04.686897 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:33:04.687960 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:33:04.687960 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:33:04.692037 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:33:04.693090 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:33:04.696696 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:33:04.697754 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:33:04.697754 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:33:04.697754 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:04.699283 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:04.700304 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:33:04.700304 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:33:05.226087 [debug] [Thread-1 (]: SQL status: OK in 0.524 seconds
[0m16:33:05.228480 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:33:05.229491 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:33:05.229491 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:05.231080 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:33:05.231080 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:33:05.231080 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:33:05.469099 [debug] [Thread-1 (]: SQL status: OK in 0.237 seconds
[0m16:33:05.472805 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:33:05.473327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:33:05.475336 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.477741 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:33:05.478751 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39D9D0830>]}
[0m16:33:05.479813 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.79s]
[0m16:33:05.480824 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:33:05.481825 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:33:05.483333 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m16:33:05.484159 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m16:33:05.485172 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:33:05.485172 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:33:05.518391 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:33:05.518391 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:33:05.519404 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.520404 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.520404 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:33:05.520404 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m16:33:05.522913 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.540034 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:33:05.540034 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:33:05.551976 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:33:05.552984 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:33:05.552984 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: ROLLBACK
[0m16:33:05.616432 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_atividade'
[0m16:33:05.616955 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:33:05.620266 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_atividade (seeds\seed_dim_atividade.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv"
[0m16:33:05.620266 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39D89E930>]}
[0m16:33:05.621278 [error] [Thread-1 (]: 12 of 97 ERROR loading seed file main.seed_dim_atividade ....................... [[31mERROR[0m in 0.14s]
[0m16:33:05.621278 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:33:05.621278 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:33:05.622617 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_atividade' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_atividade (seeds\seed_dim_atividade.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv".
[0m16:33:05.623325 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m16:33:05.624342 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m16:33:05.625757 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:33:05.626413 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:33:05.632207 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:33:05.632729 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m16:33:05.633269 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.634346 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.634346 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:33:05.634899 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m16:33:05.635428 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:05.636500 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:33:05.637038 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:33:05.638118 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:33:05.638118 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:33:05.638118 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: ROLLBACK
[0m16:33:05.640635 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_classe_instituicao'
[0m16:33:05.640635 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m16:33:05.644394 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv"
[0m16:33:05.645618 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A3AB8AE2A0>]}
[0m16:33:05.646626 [error] [Thread-1 (]: 13 of 97 ERROR loading seed file main.seed_dim_classe_instituicao .............. [[31mERROR[0m in 0.02s]
[0m16:33:05.647211 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:33:05.648235 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:33:05.648235 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_classe_instituicao' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv".
[0m16:33:05.649221 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m16:33:05.650279 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m16:33:05.650279 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:33:05.650279 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:33:05.656270 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:33:05.656814 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m16:33:05.657339 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.658479 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.659007 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:33:05.659542 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m16:33:05.660624 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:05.661701 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:33:05.662236 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:33:05.663309 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:33:05.664509 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:33:05.664509 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: ROLLBACK
[0m16:33:05.668130 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_consolidado'
[0m16:33:05.668130 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m16:33:05.671183 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv"
[0m16:33:05.671183 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A3AB8C1070>]}
[0m16:33:05.671183 [error] [Thread-1 (]: 14 of 97 ERROR loading seed file main.seed_dim_consolidado ..................... [[31mERROR[0m in 0.02s]
[0m16:33:05.671183 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:33:05.672785 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:33:05.672785 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_consolidado' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv".
[0m16:33:05.673417 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m16:33:05.674537 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m16:33:05.674537 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:33:05.674537 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:33:05.682909 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:33:05.683453 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m16:33:05.684001 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.685136 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.685688 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:33:05.686239 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m16:33:05.686818 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.687901 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:33:05.688914 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:33:05.688914 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:33:05.688914 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:33:05.690420 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: ROLLBACK
[0m16:33:05.692997 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_controle'
[0m16:33:05.692997 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m16:33:05.696063 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_controle (seeds\seed_dim_controle.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv"
[0m16:33:05.696571 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A3AB8AE630>]}
[0m16:33:05.697143 [error] [Thread-1 (]: 15 of 97 ERROR loading seed file main.seed_dim_controle ........................ [[31mERROR[0m in 0.02s]
[0m16:33:05.697143 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:33:05.697143 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:33:05.698158 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_controle' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_controle (seeds\seed_dim_controle.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv".
[0m16:33:05.699156 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m16:33:05.700254 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:33:05.700254 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:33:05.700254 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:33:05.705711 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:33:05.706231 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:33:05.706231 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.707245 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.707245 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:33:05.707245 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m16:33:05.708306 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:05.710435 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:33:05.710435 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:33:05.711957 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:33:05.713549 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:33:05.715225 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: ROLLBACK
[0m16:33:05.718475 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento'
[0m16:33:05.719017 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:33:05.721280 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_faixa_vencimento (seeds\seed_dim_faixa_vencimento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv"
[0m16:33:05.721797 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39DA78F50>]}
[0m16:33:05.722340 [error] [Thread-1 (]: 16 of 97 ERROR loading seed file main.seed_dim_faixa_vencimento ................ [[31mERROR[0m in 0.02s]
[0m16:33:05.723393 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:33:05.723393 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:33:05.724400 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_faixa_vencimento (seeds\seed_dim_faixa_vencimento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv".
[0m16:33:05.724400 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m16:33:05.725689 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:33:05.725689 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:33:05.725689 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:33:05.730533 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:33:05.731041 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:33:05.731041 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.731041 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.732569 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:33:05.732569 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m16:33:05.732569 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:05.734175 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:33:05.735763 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:33:05.736916 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:33:05.737769 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:33:05.738279 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: ROLLBACK
[0m16:33:05.742057 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_porte'
[0m16:33:05.742612 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:33:05.745301 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_porte (seeds\seed_dim_porte.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv"
[0m16:33:05.746365 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39DA1AF60>]}
[0m16:33:05.747494 [error] [Thread-1 (]: 17 of 97 ERROR loading seed file main.seed_dim_porte ........................... [[31mERROR[0m in 0.02s]
[0m16:33:05.748507 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:33:05.748507 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:33:05.749510 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_porte' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_porte (seeds\seed_dim_porte.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv".
[0m16:33:05.749510 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m16:33:05.749510 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:33:05.751231 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:33:05.751883 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:33:05.755199 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:33:05.756209 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:33:05.756209 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.756209 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.757461 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:33:05.757461 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m16:33:05.758471 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:05.758471 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:33:05.759977 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:33:05.760565 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:33:05.760565 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:33:05.762087 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: ROLLBACK
[0m16:33:05.767403 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_produto_credito'
[0m16:33:05.768495 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:33:05.772951 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_produto_credito (seeds\seed_dim_produto_credito.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv"
[0m16:33:05.773503 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39D89F8C0>]}
[0m16:33:05.774049 [error] [Thread-1 (]: 18 of 97 ERROR loading seed file main.seed_dim_produto_credito ................. [[31mERROR[0m in 0.02s]
[0m16:33:05.774590 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:33:05.775137 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:33:05.775137 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_produto_credito' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_produto_credito (seeds\seed_dim_produto_credito.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv".
[0m16:33:05.776158 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m16:33:05.777149 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:33:05.777149 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:33:05.778150 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:33:05.781246 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:33:05.783443 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:33:05.783443 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.783972 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.784983 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:33:05.784983 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m16:33:05.785984 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:05.787027 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:33:05.788049 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:33:05.788049 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:33:05.789042 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:33:05.789042 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: ROLLBACK
[0m16:33:05.791950 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_regiao'
[0m16:33:05.791950 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:33:05.794480 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_regiao (seeds\seed_dim_regiao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv"
[0m16:33:05.794480 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39D9FA810>]}
[0m16:33:05.795492 [error] [Thread-1 (]: 19 of 97 ERROR loading seed file main.seed_dim_regiao .......................... [[31mERROR[0m in 0.02s]
[0m16:33:05.795492 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:33:05.795492 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:33:05.797001 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_regiao' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_regiao (seeds\seed_dim_regiao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv".
[0m16:33:05.797001 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m16:33:05.798012 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:33:05.798594 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:33:05.798594 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:33:05.802555 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:33:05.803567 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:33:05.803567 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.804077 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.804616 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:33:05.805163 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m16:33:05.806834 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.808434 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:33:05.808970 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:33:05.810111 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:33:05.810111 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:33:05.810111 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: ROLLBACK
[0m16:33:05.814000 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_risco'
[0m16:33:05.814000 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:33:05.817549 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_risco (seeds\seed_dim_risco.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv"
[0m16:33:05.817549 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39DA0A660>]}
[0m16:33:05.817549 [error] [Thread-1 (]: 20 of 97 ERROR loading seed file main.seed_dim_risco ........................... [[31mERROR[0m in 0.02s]
[0m16:33:05.817549 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:33:05.819118 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:33:05.820294 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_risco' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_risco (seeds\seed_dim_risco.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv".
[0m16:33:05.820294 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m16:33:05.821301 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m16:33:05.821301 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:33:05.821301 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:33:05.825685 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:33:05.827194 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m16:33:05.827194 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.828204 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.828713 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:33:05.828713 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m16:33:05.829721 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:05.831511 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:33:05.831511 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:33:05.834043 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:33:05.834552 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:33:05.834552 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: ROLLBACK
[0m16:33:05.839235 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_segmento'
[0m16:33:05.839747 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m16:33:05.843500 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv"
[0m16:33:05.844598 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ce263ffb-a772-43f5-a249-369372740189', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A3AB8CFD70>]}
[0m16:33:05.845574 [error] [Thread-1 (]: 21 of 97 ERROR loading seed file main.seed_dim_segmento ........................ [[31mERROR[0m in 0.02s]
[0m16:33:05.846837 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:33:05.847373 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:33:05.848505 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_segmento' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv".
[0m16:33:05.849039 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m16:33:05.849569 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m16:33:05.849569 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:33:05.863357 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:33:05.864428 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:33:05.878113 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:33:05.878113 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:33:05.879718 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m16:33:05.879718 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.879718 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.881326 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:33:05.881326 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:33:05.884364 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:33:05.887615 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m16:33:05.888734 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m16:33:05.888734 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m16:33:05.889292 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.04s]
[0m16:33:05.889292 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:33:05.890318 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:33:05.890318 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m16:33:05.890318 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m16:33:05.890318 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:33:05.894573 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:33:05.895677 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:33:05.898197 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:33:05.899201 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:33:05.900480 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m16:33:05.900480 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.901567 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.901567 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:33:05.902157 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:33:05.903228 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.904390 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m16:33:05.905484 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m16:33:05.905484 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m16:33:05.906013 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m16:33:05.906542 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:33:05.907073 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:33:05.907073 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m16:33:05.907682 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m16:33:05.907682 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:33:05.911815 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:33:05.914138 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:33:05.915138 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:33:05.916883 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:33:05.917464 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m16:33:05.917464 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.917464 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:05.917464 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:33:05.919034 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:33:05.922728 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:33:05.925161 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m16:33:05.926235 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m16:33:05.926783 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m16:33:05.927306 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.02s]
[0m16:33:05.927848 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:33:05.927848 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:33:05.928384 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m16:33:05.928917 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m16:33:05.928917 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:33:05.931030 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:33:05.932549 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:33:05.934117 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:33:05.935709 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:33:05.935709 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m16:33:05.936734 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.936734 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:05.936734 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:33:05.936734 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:33:05.938475 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.940003 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m16:33:05.941013 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m16:33:05.941013 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m16:33:05.942015 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.01s]
[0m16:33:05.942522 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:33:05.942522 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:33:05.943043 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m16:33:05.943043 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m16:33:05.943043 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:33:05.951090 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:33:05.952265 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:33:05.955682 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:33:05.956229 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:33:05.957255 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m16:33:05.957255 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.957255 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.958385 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:33:05.958385 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:05.961523 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:33:05.963852 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m16:33:05.965446 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m16:33:05.966538 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m16:33:05.967081 [error] [Thread-1 (]: 26 of 97 FAIL 1 relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[31mFAIL 1[0m in 0.02s]
[0m16:33:05.967657 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:33:05.967657 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:33:05.968194 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42' to be skipped because of status 'fail'.  Reason: Got 1 result, configured to fail if != 0.
[0m16:33:05.968774 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m16:33:05.969838 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m16:33:05.969838 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:33:05.973001 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:33:05.974014 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:33:05.976015 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:33:05.977014 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:33:05.977014 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m16:33:05.977014 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.978015 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:05.978015 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:33:05.978555 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:33:05.979565 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.981354 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m16:33:05.981354 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m16:33:05.983060 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m16:33:05.983060 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.01s]
[0m16:33:05.984580 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:33:05.985055 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:33:05.985562 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m16:33:05.986660 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m16:33:05.987218 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:33:05.990513 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:33:05.991637 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:33:05.992726 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:33:05.994895 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:33:05.995915 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m16:33:05.995915 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:05.995915 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.996920 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:33:05.996920 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:33:05.997427 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:05.999435 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m16:33:05.999945 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m16:33:05.999945 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m16:33:06.000958 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.01s]
[0m16:33:06.001536 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:33:06.002106 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:33:06.002106 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m16:33:06.002633 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m16:33:06.002633 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:33:06.006974 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:33:06.008080 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:33:06.009721 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:33:06.010260 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:33:06.010260 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m16:33:06.010260 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.012287 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:06.012816 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:33:06.012816 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:33:06.015559 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:33:06.017879 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m16:33:06.018889 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m16:33:06.018889 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m16:33:06.019398 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.02s]
[0m16:33:06.019398 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:33:06.020418 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:33:06.020927 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m16:33:06.021436 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m16:33:06.021436 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:33:06.027617 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:33:06.030054 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:33:06.033033 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:33:06.034142 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:33:06.034142 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m16:33:06.034142 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.036711 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.037221 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:33:06.038229 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.039228 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.040232 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m16:33:06.040739 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m16:33:06.040739 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m16:33:06.040739 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:33:06.042247 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:33:06.042773 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:33:06.042773 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m16:33:06.042773 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m16:33:06.042773 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:33:06.049199 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:33:06.051316 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:33:06.052904 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:33:06.054188 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:33:06.054188 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m16:33:06.055199 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.056419 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.056419 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:33:06.057045 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.057614 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.060132 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m16:33:06.060132 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m16:33:06.061719 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m16:33:06.062848 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:33:06.063955 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:33:06.064490 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:33:06.065042 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:33:06.065576 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m16:33:06.066115 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:33:06.073174 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:33:06.074186 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:33:06.077186 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:33:06.079375 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:33:06.079375 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m16:33:06.079375 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.080959 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.081972 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:33:06.082481 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.088275 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:33:06.090436 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m16:33:06.092078 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m16:33:06.093284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m16:33:06.093821 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:33:06.094888 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:33:06.095949 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:33:06.097123 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:33:06.097661 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m16:33:06.097661 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:33:06.103381 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:33:06.104540 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:33:06.107228 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:33:06.108744 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:33:06.108744 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m16:33:06.108744 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.110253 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.110253 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:33:06.110253 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.117163 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:33:06.119679 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m16:33:06.120754 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m16:33:06.121276 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m16:33:06.121811 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:33:06.122340 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:33:06.122340 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:33:06.122856 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m16:33:06.123437 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m16:33:06.123437 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:33:06.127202 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:33:06.128238 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:33:06.130303 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:33:06.131305 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:33:06.131305 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m16:33:06.133099 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.133099 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.134115 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:33:06.134115 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.134115 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.135784 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m16:33:06.137300 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m16:33:06.137300 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m16:33:06.138309 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:33:06.138913 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:33:06.138913 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:33:06.140265 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m16:33:06.140772 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m16:33:06.141307 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:33:06.147296 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:33:06.148384 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:33:06.150446 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:33:06.151532 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:33:06.152119 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m16:33:06.152119 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.152641 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.153652 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:33:06.154701 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.156266 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.158365 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m16:33:06.159875 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m16:33:06.160640 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m16:33:06.160640 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:33:06.162155 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:33:06.162660 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:33:06.162660 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:33:06.163670 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m16:33:06.163670 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:33:06.171591 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:33:06.172640 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:33:06.175380 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:33:06.176443 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:33:06.176443 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m16:33:06.176443 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.178987 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.178987 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:33:06.179986 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.182810 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:33:06.184861 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m16:33:06.186015 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m16:33:06.186015 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m16:33:06.187030 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:33:06.187539 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:33:06.188550 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:33:06.190059 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:33:06.190654 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m16:33:06.190654 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:33:06.196900 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:33:06.198498 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:33:06.202028 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:33:06.203633 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:33:06.204163 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m16:33:06.204698 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.205239 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.205239 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:33:06.205239 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.210639 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:33:06.211651 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m16:33:06.212903 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m16:33:06.213912 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m16:33:06.214494 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:33:06.215015 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:33:06.215555 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:33:06.216734 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m16:33:06.217279 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m16:33:06.218357 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:33:06.223118 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:33:06.224125 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:33:06.226134 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:33:06.228189 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:33:06.228189 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m16:33:06.229203 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.229717 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.229717 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:33:06.229717 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.231228 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.232934 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m16:33:06.233946 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m16:33:06.234961 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m16:33:06.234961 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.02s]
[0m16:33:06.235953 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:33:06.235953 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:33:06.237304 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m16:33:06.237304 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m16:33:06.238314 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:33:06.241442 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:33:06.241994 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:33:06.245616 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:33:06.246624 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:33:06.247132 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m16:33:06.247132 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.247671 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:06.247671 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:33:06.247671 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.249213 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.251222 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m16:33:06.252404 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m16:33:06.252404 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m16:33:06.252929 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m16:33:06.254042 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:33:06.254042 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:33:06.254605 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:33:06.255203 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m16:33:06.255203 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:33:06.260245 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:33:06.261310 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:33:06.265150 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:33:06.266205 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:33:06.266725 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m16:33:06.266725 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.267253 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.267825 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:33:06.267825 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.270060 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:33:06.271738 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m16:33:06.272973 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m16:33:06.272973 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m16:33:06.273991 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:33:06.273991 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:33:06.273991 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:33:06.274983 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:33:06.274983 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m16:33:06.274983 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:33:06.280976 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:33:06.280976 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:33:06.284845 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:33:06.286459 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:33:06.286997 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m16:33:06.287529 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.288061 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.288592 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:33:06.288592 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.293224 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:33:06.294879 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m16:33:06.296933 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m16:33:06.296933 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m16:33:06.297522 [error] [Thread-1 (]: 41 of 97 FAIL 1 relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mFAIL 1[0m in 0.02s]
[0m16:33:06.298537 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:33:06.298537 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:33:06.299554 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29' to be skipped because of status 'fail'.  Reason: Got 1 result, configured to fail if != 0.
[0m16:33:06.300366 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m16:33:06.301464 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m16:33:06.301464 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:33:06.306560 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:33:06.307624 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:33:06.310550 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:33:06.311560 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:33:06.311560 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m16:33:06.311560 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.312648 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.313659 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:33:06.313659 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.314659 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.316222 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m16:33:06.316811 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m16:33:06.317374 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m16:33:06.317374 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.02s]
[0m16:33:06.317374 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:33:06.317374 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:33:06.318944 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m16:33:06.318944 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m16:33:06.319502 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:33:06.323666 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:33:06.326090 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:33:06.329193 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:33:06.330810 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:33:06.331361 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m16:33:06.331361 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.332470 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.332470 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:33:06.333006 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.334110 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.335668 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m16:33:06.335668 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m16:33:06.336708 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m16:33:06.336708 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.02s]
[0m16:33:06.336708 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:33:06.337748 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:33:06.338349 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:33:06.338349 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m16:33:06.338349 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:33:06.342971 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:33:06.345607 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:33:06.348136 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:33:06.349139 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:33:06.349139 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m16:33:06.349139 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.350864 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.350864 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:33:06.351460 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.355215 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:33:06.357373 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m16:33:06.359000 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m16:33:06.359509 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m16:33:06.360580 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:33:06.361114 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:33:06.361652 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:33:06.361652 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:33:06.362219 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m16:33:06.362739 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:33:06.367509 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:33:06.367509 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:33:06.371262 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:33:06.372868 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:33:06.373886 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m16:33:06.373886 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.373886 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.374885 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:33:06.374885 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.380249 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:33:06.381864 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m16:33:06.382912 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m16:33:06.382912 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m16:33:06.383455 [error] [Thread-1 (]: 45 of 97 FAIL 1 relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mFAIL 1[0m in 0.02s]
[0m16:33:06.383979 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:33:06.383979 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:33:06.384529 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33' to be skipped because of status 'fail'.  Reason: Got 1 result, configured to fail if != 0.
[0m16:33:06.384529 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m16:33:06.386122 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m16:33:06.386122 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:33:06.389823 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:33:06.390835 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:33:06.392887 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:33:06.394471 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:33:06.394471 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m16:33:06.395484 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.395484 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.395484 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:33:06.395484 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.397626 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.399159 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m16:33:06.400344 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m16:33:06.400925 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m16:33:06.401450 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.02s]
[0m16:33:06.402006 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:33:06.402006 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:33:06.402792 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m16:33:06.403874 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m16:33:06.404408 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:33:06.407696 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:33:06.408702 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:33:06.410215 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:33:06.411855 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:33:06.412462 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m16:33:06.412462 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.412998 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:06.412998 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:33:06.412998 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.414004 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:06.416100 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m16:33:06.417254 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m16:33:06.417254 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m16:33:06.418272 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.01s]
[0m16:33:06.419272 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:33:06.419272 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:33:06.419272 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:33:06.420307 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m16:33:06.420307 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:33:06.424697 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:33:06.425780 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:33:06.427921 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:33:06.428451 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:33:06.429472 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m16:33:06.429472 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.430000 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:06.430000 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:33:06.430680 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.432724 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:33:06.434293 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m16:33:06.435846 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m16:33:06.435846 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m16:33:06.435846 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:33:06.436854 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:33:06.437360 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:33:06.437360 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:33:06.437360 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m16:33:06.438373 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:33:06.444385 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:33:06.446827 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:33:06.451070 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:33:06.452251 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:33:06.452769 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m16:33:06.453291 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.453842 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.453842 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:33:06.454428 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.462679 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:33:06.464855 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m16:33:06.466472 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m16:33:06.467011 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m16:33:06.468074 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:33:06.468074 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:33:06.469082 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:33:06.469588 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m16:33:06.470144 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m16:33:06.470144 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:33:06.472749 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:33:06.474758 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:33:06.476758 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:33:06.478264 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:33:06.479369 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m16:33:06.480441 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.482076 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:33:06.482597 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:33:06.483133 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.484748 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.486367 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m16:33:06.487380 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m16:33:06.488822 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m16:33:06.489869 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:33:06.489869 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:33:06.490879 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:33:06.490879 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m16:33:06.490879 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m16:33:06.491882 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:33:06.495073 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:33:06.495073 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:33:06.498192 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:33:06.499699 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:33:06.499699 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m16:33:06.499699 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.501279 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:06.501279 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:33:06.501279 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.502404 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.503991 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m16:33:06.505592 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m16:33:06.506161 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m16:33:06.507224 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:33:06.508306 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:33:06.508939 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:33:06.509468 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:33:06.509997 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m16:33:06.509997 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:33:06.513663 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:33:06.515172 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:33:06.517401 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:33:06.517401 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:33:06.518951 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m16:33:06.518951 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.519552 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:06.519552 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:33:06.520123 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.520123 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.523810 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m16:33:06.525550 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m16:33:06.525550 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m16:33:06.526559 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:33:06.526559 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:33:06.528070 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:33:06.528428 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:33:06.529459 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m16:33:06.529459 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:33:06.533951 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:33:06.535021 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:33:06.537130 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:33:06.537675 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:33:06.538673 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m16:33:06.538673 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.539296 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.539823 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:33:06.539823 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.542888 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:33:06.544823 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m16:33:06.545871 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m16:33:06.546872 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m16:33:06.547377 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:33:06.547377 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:33:06.548383 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:33:06.548383 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m16:33:06.549390 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m16:33:06.550081 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:33:06.554202 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:33:06.555942 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:33:06.559729 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:33:06.561833 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:33:06.561833 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m16:33:06.562342 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.562862 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.562862 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:33:06.562862 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.563875 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.565386 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m16:33:06.566397 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m16:33:06.566397 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m16:33:06.566909 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:33:06.567415 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:33:06.567415 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:33:06.567415 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m16:33:06.567415 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m16:33:06.567415 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:33:06.571206 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:33:06.572727 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:33:06.574737 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:33:06.575734 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:33:06.578006 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m16:33:06.578783 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.579294 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.579294 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:33:06.580413 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.581643 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.583254 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m16:33:06.584327 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m16:33:06.584923 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m16:33:06.585447 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:33:06.586013 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:33:06.586013 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:33:06.586544 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:33:06.586544 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m16:33:06.587076 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:33:06.590145 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:33:06.592161 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:33:06.594205 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:33:06.594714 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:33:06.594714 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m16:33:06.594714 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.595804 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.595804 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:33:06.596821 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.599978 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:33:06.601638 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m16:33:06.603405 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m16:33:06.603942 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m16:33:06.604464 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:33:06.604999 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:33:06.604999 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:33:06.605572 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:33:06.606096 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m16:33:06.606629 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:33:06.610759 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:33:06.611764 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:33:06.613883 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:33:06.615398 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:33:06.615936 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m16:33:06.616463 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.617470 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.617470 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:33:06.617470 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.621374 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:33:06.622481 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m16:33:06.623859 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m16:33:06.624947 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m16:33:06.625497 [error] [Thread-1 (]: 57 of 97 FAIL 1 relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[31mFAIL 1[0m in 0.02s]
[0m16:33:06.626571 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:33:06.626571 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:33:06.627115 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871' to be skipped because of status 'fail'.  Reason: Got 1 result, configured to fail if != 0.
[0m16:33:06.627115 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m16:33:06.627662 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m16:33:06.628180 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:33:06.631362 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:33:06.632464 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:33:06.633994 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:33:06.634502 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:33:06.634502 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m16:33:06.634502 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.636011 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:06.636011 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:33:06.636011 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.637020 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:06.638220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m16:33:06.638220 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m16:33:06.638220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m16:33:06.639729 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.01s]
[0m16:33:06.639729 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:33:06.639729 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:33:06.640741 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m16:33:06.640741 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m16:33:06.640741 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:33:06.648235 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:33:06.649293 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:33:06.650896 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:33:06.651959 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:33:06.652491 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m16:33:06.652491 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.653013 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.653539 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:33:06.653539 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.654667 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:33:06.656864 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m16:33:06.657375 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m16:33:06.658415 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m16:33:06.658415 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.02s]
[0m16:33:06.659927 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:33:06.660491 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:33:06.660491 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:33:06.661636 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m16:33:06.661636 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:33:06.665591 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:33:06.666656 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:33:06.668808 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:33:06.669856 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:33:06.669856 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m16:33:06.670390 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.670931 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:06.670931 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:33:06.671455 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.674282 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:33:06.676282 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m16:33:06.676921 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m16:33:06.677931 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m16:33:06.677931 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:33:06.677931 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:33:06.677931 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:33:06.679674 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:33:06.679674 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m16:33:06.679674 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:33:06.685695 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:33:06.687282 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:33:06.689366 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:33:06.690405 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:33:06.690405 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m16:33:06.690405 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:33:06.690405 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:33:06.690405 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:33:06.692237 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:33:06.696946 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:33:06.698539 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m16:33:06.698539 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m16:33:06.699537 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m16:33:06.699537 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:33:06.701298 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:33:06.701843 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:33:06.702380 [info ] [Thread-1 (]: 62 of 97 SKIP relation main.dim_atividade ...................................... [[33mSKIP[0m]
[0m16:33:06.702902 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:33:06.703442 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:33:06.703974 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_atividade' to be skipped because of status 'skipped'. 
[0m16:33:06.703442 [info ] [Thread-1 (]: 63 of 97 SKIP relation main.dim_classe_instituicao ............................. [[33mSKIP[0m]
[0m16:33:06.704510 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:33:06.704510 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:33:06.705051 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_classe_instituicao' to be skipped because of status 'skipped'. 
[0m16:33:06.705051 [info ] [Thread-1 (]: 64 of 97 SKIP relation main.dim_consolidado .................................... [[33mSKIP[0m]
[0m16:33:06.705587 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:33:06.706121 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:33:06.706121 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_consolidado' to be skipped because of status 'skipped'. 
[0m16:33:06.706657 [info ] [Thread-1 (]: 65 of 97 SKIP relation main.dim_controle ....................................... [[33mSKIP[0m]
[0m16:33:06.707193 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:33:06.707848 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:33:06.707848 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_controle' to be skipped because of status 'skipped'. 
[0m16:33:06.707848 [info ] [Thread-1 (]: 66 of 97 SKIP relation main.dim_faixa_vencimento ............................... [[33mSKIP[0m]
[0m16:33:06.708860 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:33:06.708860 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:33:06.708860 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_faixa_vencimento' to be skipped because of status 'skipped'. 
[0m16:33:06.710369 [info ] [Thread-1 (]: 67 of 97 SKIP relation main.dim_porte .......................................... [[33mSKIP[0m]
[0m16:33:06.710369 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:33:06.710369 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:33:06.710369 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_porte' to be skipped because of status 'skipped'. 
[0m16:33:06.710369 [info ] [Thread-1 (]: 68 of 97 SKIP relation main.dim_produto_credito ................................ [[33mSKIP[0m]
[0m16:33:06.711974 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:33:06.711974 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:33:06.711974 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_produto_credito' to be skipped because of status 'skipped'. 
[0m16:33:06.712987 [info ] [Thread-1 (]: 69 of 97 SKIP relation main.dim_regiao ......................................... [[33mSKIP[0m]
[0m16:33:06.712987 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:33:06.712987 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:33:06.713993 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_regiao' to be skipped because of status 'skipped'. 
[0m16:33:06.713993 [info ] [Thread-1 (]: 70 of 97 SKIP relation main.dim_risco .......................................... [[33mSKIP[0m]
[0m16:33:06.713993 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:33:06.714997 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:33:06.714997 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_risco' to be skipped because of status 'skipped'. 
[0m16:33:06.715553 [info ] [Thread-1 (]: 71 of 97 SKIP relation main.dim_segmento ....................................... [[33mSKIP[0m]
[0m16:33:06.715553 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:33:06.716566 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:33:06.718123 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_segmento' to be skipped because of status 'skipped'. 
[0m16:33:06.717614 [info ] [Thread-1 (]: 72 of 97 SKIP test not_null_dim_classe_instituicao_id_classe ................... [[33mSKIP[0m]
[0m16:33:06.718780 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:33:06.719304 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:33:06.719304 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267' to be skipped because of status 'skipped'. 
[0m16:33:06.719831 [info ] [Thread-1 (]: 73 of 97 SKIP test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[33mSKIP[0m]
[0m16:33:06.720930 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:33:06.720930 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:33:06.721516 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0' to be skipped because of status 'skipped'. 
[0m16:33:06.721516 [info ] [Thread-1 (]: 74 of 97 SKIP test unique_dim_classe_instituicao_id_classe ..................... [[33mSKIP[0m]
[0m16:33:06.722569 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:33:06.723086 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:33:06.723596 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19' to be skipped because of status 'skipped'. 
[0m16:33:06.724678 [info ] [Thread-1 (]: 75 of 97 SKIP test not_null_dim_consolidado_id_consolidado ..................... [[33mSKIP[0m]
[0m16:33:06.725220 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:33:06.725755 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:33:06.725755 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340' to be skipped because of status 'skipped'. 
[0m16:33:06.726766 [info ] [Thread-1 (]: 76 of 97 SKIP test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[33mSKIP[0m]
[0m16:33:06.726766 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:33:06.726766 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:33:06.726766 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e' to be skipped because of status 'skipped'. 
[0m16:33:06.728273 [info ] [Thread-1 (]: 77 of 97 SKIP test unique_dim_consolidado_id_consolidado ....................... [[33mSKIP[0m]
[0m16:33:06.728273 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:33:06.728273 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:33:06.728273 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862' to be skipped because of status 'skipped'. 
[0m16:33:06.729279 [info ] [Thread-1 (]: 78 of 97 SKIP test not_null_dim_controle_id_controle ........................... [[33mSKIP[0m]
[0m16:33:06.729279 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:33:06.729279 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:33:06.729279 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21' to be skipped because of status 'skipped'. 
[0m16:33:06.730342 [info ] [Thread-1 (]: 79 of 97 SKIP test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[33mSKIP[0m]
[0m16:33:06.730848 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:33:06.730848 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:33:06.730848 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f' to be skipped because of status 'skipped'. 
[0m16:33:06.731860 [info ] [Thread-1 (]: 80 of 97 SKIP test unique_dim_controle_id_controle ............................. [[33mSKIP[0m]
[0m16:33:06.732367 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:33:06.732367 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:33:06.732906 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c' to be skipped because of status 'skipped'. 
[0m16:33:06.732906 [info ] [Thread-1 (]: 81 of 97 SKIP relation main.fato_carteira_credito_atividade .................... [[33mSKIP[0m]
[0m16:33:06.732906 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:33:06.733927 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:33:06.733927 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_atividade' to be skipped because of status 'skipped'. 
[0m16:33:06.733927 [info ] [Thread-1 (]: 82 of 97 SKIP relation main.fato_carteira_credito_porte ........................ [[33mSKIP[0m]
[0m16:33:06.734983 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:33:06.735983 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:33:06.736494 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_porte' to be skipped because of status 'skipped'. 
[0m16:33:06.737034 [info ] [Thread-1 (]: 83 of 97 SKIP relation main.fato_carteira_credito_produto ...................... [[33mSKIP[0m]
[0m16:33:06.738108 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:33:06.738720 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:33:06.739254 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_produto' to be skipped because of status 'skipped'. 
[0m16:33:06.739774 [info ] [Thread-1 (]: 84 of 97 SKIP relation main.fato_regiao_credito ................................ [[33mSKIP[0m]
[0m16:33:06.740306 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:33:06.740306 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:33:06.740837 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_regiao_credito' to be skipped because of status 'skipped'. 
[0m16:33:06.740837 [info ] [Thread-1 (]: 85 of 97 SKIP relation main.fato_risco_credito ................................. [[33mSKIP[0m]
[0m16:33:06.741366 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:33:06.741890 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:33:06.741890 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_risco_credito' to be skipped because of status 'skipped'. 
[0m16:33:06.742420 [info ] [Thread-1 (]: 86 of 97 SKIP test not_null_dim_segmento_id_segmento ........................... [[33mSKIP[0m]
[0m16:33:06.742938 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:33:06.742938 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:33:06.744508 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e' to be skipped because of status 'skipped'. 
[0m16:33:06.744508 [info ] [Thread-1 (]: 87 of 97 SKIP test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[33mSKIP[0m]
[0m16:33:06.744508 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:33:06.745518 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:33:06.745518 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e' to be skipped because of status 'skipped'. 
[0m16:33:06.745518 [info ] [Thread-1 (]: 88 of 97 SKIP test unique_dim_segmento_id_segmento ............................. [[33mSKIP[0m]
[0m16:33:06.745518 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:33:06.747050 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:33:06.747050 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a' to be skipped because of status 'skipped'. 
[0m16:33:06.747050 [info ] [Thread-1 (]: 89 of 97 SKIP test not_null_fato_carteira_credito_atividade_id_instituicao ..... [[33mSKIP[0m]
[0m16:33:06.748069 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:33:06.748069 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:33:06.748069 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1' to be skipped because of status 'skipped'. 
[0m16:33:06.748069 [info ] [Thread-1 (]: 90 of 97 SKIP test not_null_fato_carteira_credito_porte_id_instituicao ......... [[33mSKIP[0m]
[0m16:33:06.748069 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:33:06.748069 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:33:06.749593 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74' to be skipped because of status 'skipped'. 
[0m16:33:06.749593 [info ] [Thread-1 (]: 91 of 97 SKIP test not_null_fato_carteira_credito_produto_id_data .............. [[33mSKIP[0m]
[0m16:33:06.749593 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:33:06.749593 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:33:06.749593 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5' to be skipped because of status 'skipped'. 
[0m16:33:06.749593 [info ] [Thread-1 (]: 92 of 97 SKIP test not_null_fato_carteira_credito_produto_id_instituicao ....... [[33mSKIP[0m]
[0m16:33:06.751204 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:33:06.751204 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:33:06.751777 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d' to be skipped because of status 'skipped'. 
[0m16:33:06.751777 [info ] [Thread-1 (]: 93 of 97 SKIP test not_null_fato_regiao_credito_id_instituicao ................. [[33mSKIP[0m]
[0m16:33:06.752388 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:33:06.752388 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:33:06.752906 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836' to be skipped because of status 'skipped'. 
[0m16:33:06.752906 [info ] [Thread-1 (]: 94 of 97 SKIP test not_null_fato_regiao_credito_id_regiao ...................... [[33mSKIP[0m]
[0m16:33:06.754031 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:33:06.754031 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:33:06.754562 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21' to be skipped because of status 'skipped'. 
[0m16:33:06.755100 [info ] [Thread-1 (]: 95 of 97 SKIP test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[33mSKIP[0m]
[0m16:33:06.755638 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:33:06.755638 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:33:06.756156 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5' to be skipped because of status 'skipped'. 
[0m16:33:06.756156 [info ] [Thread-1 (]: 96 of 97 SKIP test not_null_fato_risco_credito_id_instituicao .................. [[33mSKIP[0m]
[0m16:33:06.757167 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:33:06.757167 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:33:06.757675 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4' to be skipped because of status 'skipped'. 
[0m16:33:06.758212 [info ] [Thread-1 (]: 97 of 97 SKIP test not_null_fato_risco_credito_id_nivel_risco .................. [[33mSKIP[0m]
[0m16:33:06.759282 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:33:06.759822 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' to be skipped because of status 'skipped'. 
[0m16:33:06.761428 [debug] [MainThread]: Using duckdb connection "master"
[0m16:33:06.761962 [debug] [MainThread]: On master: BEGIN
[0m16:33:06.761962 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:33:06.762511 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:33:06.763059 [debug] [MainThread]: On master: COMMIT
[0m16:33:06.763059 [debug] [MainThread]: Using duckdb connection "master"
[0m16:33:06.763059 [debug] [MainThread]: On master: COMMIT
[0m16:33:06.763593 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:33:06.764127 [debug] [MainThread]: On master: Close
[0m16:33:06.764656 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:33:06.764656 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:33:06.764656 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:33:06.764656 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a' was properly closed.
[0m16:33:06.765195 [info ] [MainThread]: 
[0m16:33:06.765195 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 5.95 seconds (5.95s).
[0m16:33:06.770628 [debug] [MainThread]: Command end result
[0m16:33:06.804598 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:33:06.808077 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:33:06.815012 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:33:06.815012 [info ] [MainThread]: 
[0m16:33:06.815624 [info ] [MainThread]: [31mCompleted with 14 errors, 0 partial successes, and 0 warnings:[0m
[0m16:33:06.815624 [info ] [MainThread]: 
[0m16:33:06.816232 [error] [MainThread]: [31mFailure in seed seed_dim_atividade (seeds\seed_dim_atividade.csv)[0m
[0m16:33:06.816232 [error] [MainThread]:   Runtime Error in seed seed_dim_atividade (seeds\seed_dim_atividade.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv"
[0m16:33:06.816784 [info ] [MainThread]: 
[0m16:33:06.816784 [error] [MainThread]: [31mFailure in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)[0m
[0m16:33:06.817343 [error] [MainThread]:   Runtime Error in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv"
[0m16:33:06.817343 [info ] [MainThread]: 
[0m16:33:06.817343 [error] [MainThread]: [31mFailure in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)[0m
[0m16:33:06.817931 [error] [MainThread]:   Runtime Error in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv"
[0m16:33:06.817931 [info ] [MainThread]: 
[0m16:33:06.817931 [error] [MainThread]: [31mFailure in seed seed_dim_controle (seeds\seed_dim_controle.csv)[0m
[0m16:33:06.817931 [error] [MainThread]:   Runtime Error in seed seed_dim_controle (seeds\seed_dim_controle.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv"
[0m16:33:06.817931 [info ] [MainThread]: 
[0m16:33:06.818947 [error] [MainThread]: [31mFailure in seed seed_dim_faixa_vencimento (seeds\seed_dim_faixa_vencimento.csv)[0m
[0m16:33:06.818947 [error] [MainThread]:   Runtime Error in seed seed_dim_faixa_vencimento (seeds\seed_dim_faixa_vencimento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv"
[0m16:33:06.818947 [info ] [MainThread]: 
[0m16:33:06.819545 [error] [MainThread]: [31mFailure in seed seed_dim_porte (seeds\seed_dim_porte.csv)[0m
[0m16:33:06.819545 [error] [MainThread]:   Runtime Error in seed seed_dim_porte (seeds\seed_dim_porte.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv"
[0m16:33:06.820101 [info ] [MainThread]: 
[0m16:33:06.820101 [error] [MainThread]: [31mFailure in seed seed_dim_produto_credito (seeds\seed_dim_produto_credito.csv)[0m
[0m16:33:06.820101 [error] [MainThread]:   Runtime Error in seed seed_dim_produto_credito (seeds\seed_dim_produto_credito.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv"
[0m16:33:06.820101 [info ] [MainThread]: 
[0m16:33:06.820101 [error] [MainThread]: [31mFailure in seed seed_dim_regiao (seeds\seed_dim_regiao.csv)[0m
[0m16:33:06.820101 [error] [MainThread]:   Runtime Error in seed seed_dim_regiao (seeds\seed_dim_regiao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv"
[0m16:33:06.820101 [info ] [MainThread]: 
[0m16:33:06.820101 [error] [MainThread]: [31mFailure in seed seed_dim_risco (seeds\seed_dim_risco.csv)[0m
[0m16:33:06.821743 [error] [MainThread]:   Runtime Error in seed seed_dim_risco (seeds\seed_dim_risco.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv"
[0m16:33:06.821743 [info ] [MainThread]: 
[0m16:33:06.822398 [error] [MainThread]: [31mFailure in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)[0m
[0m16:33:06.822398 [error] [MainThread]:   Runtime Error in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv"
[0m16:33:06.822920 [info ] [MainThread]: 
[0m16:33:06.822920 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)[0m
[0m16:33:06.822920 [error] [MainThread]:   Got 1 result, configured to fail if != 0
[0m16:33:06.823929 [info ] [MainThread]: 
[0m16:33:06.823929 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_446031b84e0fad1bdbfdd1cf73647908.sql
[0m16:33:06.824941 [info ] [MainThread]: 
[0m16:33:06.825465 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m16:33:06.825465 [error] [MainThread]:   Got 1 result, configured to fail if != 0
[0m16:33:06.825975 [info ] [MainThread]: 
[0m16:33:06.825975 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_d80151d1e76d6c8de6ceccc7adebe863.sql
[0m16:33:06.826515 [info ] [MainThread]: 
[0m16:33:06.827125 [error] [MainThread]: [31mFailure in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m16:33:06.827675 [error] [MainThread]:   Got 1 result, configured to fail if != 0
[0m16:33:06.827675 [info ] [MainThread]: 
[0m16:33:06.828199 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_b00506d5726bd2130bedc66dca5f83d0.sql
[0m16:33:06.828735 [info ] [MainThread]: 
[0m16:33:06.828735 [error] [MainThread]: [31mFailure in test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m16:33:06.829267 [error] [MainThread]:   Got 1 result, configured to fail if != 0
[0m16:33:06.829267 [info ] [MainThread]: 
[0m16:33:06.829805 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_operacoes_c_33521a505ad34b09fd04bb9cb908c25d.sql
[0m16:33:06.829805 [info ] [MainThread]: 
[0m16:33:06.829805 [info ] [MainThread]: Done. PASS=47 WARN=0 ERROR=14 SKIP=36 NO-OP=0 TOTAL=97
[0m16:33:06.830957 [debug] [MainThread]: Command `dbt build` failed at 16:33:06.830957 after 7.77 seconds
[0m16:33:06.831576 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39AD66000>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39AD64EC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001A39AD64EF0>]}
[0m16:33:06.831576 [debug] [MainThread]: Flushing usage events
[0m16:33:07.912683 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:33:40.029639 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022A8A9C6300>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022A8B7FF1A0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022A8DFEC770>]}


============================== 16:33:40.042593 | 6313252e-2642-450a-9614-717ee827a10e ==============================
[0m16:33:40.042593 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:33:40.044164 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'False', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt test --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:33:40.057451 [error] [MainThread]: Encountered an error:
Parsing Error
  Env var required but not provided: 'GOLD_DB_PATH'
[0m16:33:40.060000 [debug] [MainThread]: Command `dbt test` failed at 16:33:40.058471 after 0.26 seconds
[0m16:33:40.060692 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022A8E594B00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022A8E137470>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022A8E8C8140>]}
[0m16:33:40.062750 [debug] [MainThread]: Flushing usage events
[0m16:33:40.778049 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:35:45.907060 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA1FE184D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA1FE18470>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA1FE1B650>]}


============================== 16:35:45.929237 | 0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a ==============================
[0m16:35:45.929237 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:35:45.929830 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'False', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt build --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:35:46.357833 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA1FED6DB0>]}
[0m16:35:46.442718 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA206E91C0>]}
[0m16:35:46.447252 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:35:46.886809 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:35:46.890012 [debug] [MainThread]: Partial parsing not enabled
[0m16:35:49.701923 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:35:49.709751 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA21F70860>]}
[0m16:35:50.579426 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:35:50.602124 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA2200D430>]}
[0m16:35:50.756229 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:35:50.760264 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:35:50.866539 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA21F75EE0>]}
[0m16:35:50.867546 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:35:50.875793 [info ] [MainThread]: 
[0m16:35:50.876795 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:35:50.877793 [info ] [MainThread]: 
[0m16:35:50.878300 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:35:50.885736 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:35:51.160477 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:35:51.161026 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:35:51.161550 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:35:52.217429 [debug] [ThreadPool]: SQL status: OK in 1.055 seconds
[0m16:35:52.220269 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:35:52.221280 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:35:52.223040 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:35:52.231315 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:35:52.231315 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:35:52.231315 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:35:52.233858 [debug] [ThreadPool]: SQL status: OK in 0.002 seconds
[0m16:35:52.234367 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:35:52.235873 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:35:52.237396 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:35:52.237396 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:35:52.237396 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:35:52.238410 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:35:52.239922 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:35:52.239922 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:35:52.240936 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:35:52.240936 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:35:52.241935 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:35:52.247042 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:35:52.253673 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:35:52.254789 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:35:52.254789 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:35:52.257593 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:35:52.257593 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:35:52.258604 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:35:52.294728 [debug] [ThreadPool]: SQL status: OK in 0.035 seconds
[0m16:35:52.296772 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:35:52.299408 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:35:52.299408 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:35:52.303919 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA21FAD100>]}
[0m16:35:52.304529 [debug] [MainThread]: Using duckdb connection "master"
[0m16:35:52.305255 [debug] [MainThread]: On master: BEGIN
[0m16:35:52.305255 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:35:52.307314 [debug] [MainThread]: SQL status: OK in 0.002 seconds
[0m16:35:52.307976 [debug] [MainThread]: On master: COMMIT
[0m16:35:52.308990 [debug] [MainThread]: Using duckdb connection "master"
[0m16:35:52.308990 [debug] [MainThread]: On master: COMMIT
[0m16:35:52.310498 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:35:52.310498 [debug] [MainThread]: On master: Close
[0m16:35:52.318200 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:35:52.319201 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:35:52.320383 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:35:52.320383 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:35:52.331147 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:35:52.334307 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:35:52.373239 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:35:52.375260 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:35:52.376261 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:35:52.376261 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:35:52.377772 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:52.377772 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:35:52.379373 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:35:52.724043 [debug] [Thread-1 (]: SQL status: OK in 0.344 seconds
[0m16:35:52.731613 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:35:52.732627 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:35:52.734144 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:52.735152 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:35:52.736153 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:35:52.739292 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:52.748192 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:35:52.749192 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:35:52.752864 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:52.756713 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:35:52.757795 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:35:52.758808 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:52.780490 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:35:52.781523 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:35:52.782056 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:35:52.792315 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:35:52.798569 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:35:52.798569 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:35:52.802252 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:52.807234 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:35:52.811003 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA1D1DE600>]}
[0m16:35:52.811525 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.49s]
[0m16:35:52.813049 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:35:52.814059 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:35:52.815565 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:35:52.816573 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:35:52.817796 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:35:52.825603 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:35:52.827323 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:35:52.831139 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:35:52.832679 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:35:52.832679 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:35:52.832679 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:52.836071 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:52.836717 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:35:52.837237 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m16:35:52.895433 [debug] [Thread-1 (]: SQL status: OK in 0.057 seconds
[0m16:35:52.897168 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:35:52.898239 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:35:52.899746 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:52.901255 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:35:52.901886 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:35:52.902898 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:52.908366 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:35:52.908366 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:35:52.911720 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:52.916449 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:35:52.918456 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:35:52.919976 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:52.922976 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:35:52.923483 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:35:52.923990 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:35:52.928401 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:52.931259 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:35:52.932785 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:35:52.944771 [debug] [Thread-1 (]: SQL status: OK in 0.011 seconds
[0m16:35:52.946977 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:35:52.947987 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA225FA2D0>]}
[0m16:35:52.948991 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.13s]
[0m16:35:52.949989 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:35:52.951031 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:35:52.951031 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m16:35:52.952553 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:35:52.954568 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:35:52.960566 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:35:52.961585 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:35:52.967420 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:35:52.969332 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:35:52.970396 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:35:52.971407 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:52.973275 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:52.973802 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:35:52.974813 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:35:52.996002 [debug] [Thread-1 (]: SQL status: OK in 0.020 seconds
[0m16:35:52.997031 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:35:52.998041 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:35:52.998041 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:53.001149 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:35:53.001743 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:35:53.003379 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:53.008167 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:35:53.008167 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:35:53.009167 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:53.013685 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:35:53.014690 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:35:53.015777 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:53.017318 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:35:53.017318 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:35:53.017824 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:35:53.019950 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:53.024725 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:35:53.025723 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:35:53.026721 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:53.028230 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:35:53.029909 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA224759D0>]}
[0m16:35:53.030428 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.08s]
[0m16:35:53.030948 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:35:53.030948 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:35:53.030948 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:35:53.032618 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:35:53.032618 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:35:53.040744 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:35:53.042776 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:35:53.047468 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:35:53.049480 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:35:53.049480 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:35:53.049480 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:53.051567 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:53.052076 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:35:53.052595 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:35:54.086212 [debug] [Thread-1 (]: SQL status: OK in 1.032 seconds
[0m16:35:54.089227 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:35:54.090990 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:35:54.093506 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:54.095020 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:35:54.096027 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:35:54.098030 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:54.108653 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:35:54.110050 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:35:54.111062 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:54.121097 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:35:54.122683 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:35:54.125704 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:54.128702 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:35:54.128702 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:35:54.129702 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:35:54.402915 [debug] [Thread-1 (]: SQL status: OK in 0.272 seconds
[0m16:35:54.410291 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:35:54.411166 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:35:54.414864 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:54.417130 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:35:54.419649 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA224D5040>]}
[0m16:35:54.420662 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 1.39s]
[0m16:35:54.423223 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:35:54.423755 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:35:54.425030 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m16:35:54.426044 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:35:54.427040 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:35:54.432808 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:35:54.435342 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:35:54.440367 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:35:54.441877 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:35:54.443396 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:35:54.443903 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:54.444439 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:54.445453 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:35:54.446873 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:35:54.851761 [debug] [Thread-1 (]: SQL status: OK in 0.404 seconds
[0m16:35:54.854120 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:35:54.855710 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_capital_prudencial'
  
[0m16:35:54.857374 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:54.860252 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:35:54.860887 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_capital_prudencial'
  
[0m16:35:54.863423 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:54.870321 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:35:54.870321 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial" rename to "fato_capital_prudencial__dbt_backup"
[0m16:35:54.872650 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:54.878087 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:35:54.878676 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m16:35:54.880354 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:54.883055 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:35:54.884576 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:35:54.885303 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:35:54.917149 [debug] [Thread-1 (]: SQL status: OK in 0.031 seconds
[0m16:35:54.921618 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:35:54.922630 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m16:35:54.926387 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:54.928385 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:35:54.929893 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA224D5910>]}
[0m16:35:54.929893 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.50s]
[0m16:35:54.932639 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:35:54.933556 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:35:54.934574 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m16:35:54.936169 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:35:54.937180 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:35:54.942475 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:35:54.942982 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:35:54.951527 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:35:54.954750 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:35:54.954750 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:35:54.954750 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:54.956313 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:54.956313 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:35:54.957835 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:35:55.067234 [debug] [Thread-1 (]: SQL status: OK in 0.109 seconds
[0m16:35:55.069277 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:35:55.069277 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_indexador'
  
[0m16:35:55.070288 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:55.073121 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:35:55.073121 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_indexador'
  
[0m16:35:55.074130 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:55.078651 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:35:55.079660 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador" rename to "fato_carteira_credito_indexador__dbt_backup"
[0m16:35:55.080908 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:55.086772 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:35:55.087784 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m16:35:55.088784 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:55.089782 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:35:55.091587 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:35:55.092644 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:35:55.122654 [debug] [Thread-1 (]: SQL status: OK in 0.029 seconds
[0m16:35:55.126249 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:35:55.126249 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m16:35:55.128377 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:55.131005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:35:55.131005 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA313A5910>]}
[0m16:35:55.133099 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.20s]
[0m16:35:55.134610 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:35:55.136333 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:35:55.137476 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m16:35:55.138549 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:35:55.139613 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:35:55.148385 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:35:55.149398 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:35:55.154711 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:35:55.156304 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:35:55.156304 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:35:55.157316 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:55.157316 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:55.158622 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:35:55.159307 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:35:55.269535 [debug] [Thread-1 (]: SQL status: OK in 0.109 seconds
[0m16:35:55.271133 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:35:55.271133 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:35:55.273747 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:55.274747 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:35:55.275745 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:35:55.276748 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:55.281239 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:35:55.281239 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais" rename to "fato_carteira_credito_totais__dbt_backup"
[0m16:35:55.282771 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:55.287978 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:35:55.287978 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:35:55.288980 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:55.290484 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:35:55.290484 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:35:55.291491 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:35:55.436989 [debug] [Thread-1 (]: SQL status: OK in 0.145 seconds
[0m16:35:55.439855 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:35:55.441014 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:35:55.443702 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:55.447538 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:35:55.447538 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA313AA6C0>]}
[0m16:35:55.448551 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.31s]
[0m16:35:55.449550 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:35:55.449550 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:35:55.451160 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:35:55.451921 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:35:55.453598 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:35:55.458406 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:35:55.460509 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:35:55.463050 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:35:55.464057 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:35:55.465573 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:35:55.466584 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:55.467095 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:55.467095 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:35:55.468106 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:35:56.399088 [debug] [Thread-1 (]: SQL status: OK in 0.930 seconds
[0m16:35:56.401506 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:35:56.402020 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:35:56.404753 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:56.407903 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:35:56.407903 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:35:56.410436 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.417498 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:35:56.418497 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado" rename to "fato_demonstracao_resultado__dbt_backup"
[0m16:35:56.420681 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.426735 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:35:56.426735 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:35:56.428737 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.431540 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:35:56.432553 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:35:56.433060 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:35:56.650232 [debug] [Thread-1 (]: SQL status: OK in 0.216 seconds
[0m16:35:56.654949 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:35:56.656739 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:35:56.659303 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:56.663353 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:35:56.663918 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA225AEA20>]}
[0m16:35:56.665427 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 1.21s]
[0m16:35:56.667508 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:35:56.669091 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:35:56.670184 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m16:35:56.671193 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:35:56.671193 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:35:56.676762 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:35:56.694692 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:35:56.698224 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:35:56.699736 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:35:56.699736 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:35:56.701245 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:56.701822 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.703350 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:35:56.703915 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:35:56.711583 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:35:56.712860 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:35:56.712860 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:35:56.713870 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.716393 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:35:56.717413 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:35:56.719019 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.724703 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:35:56.726213 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:35:56.727225 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.734161 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:35:56.735761 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:35:56.736770 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.738802 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:35:56.740312 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:35:56.740312 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:35:56.747521 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:35:56.751638 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:35:56.752194 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:35:56.754239 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.755250 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:35:56.756309 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA313EF2F0>]}
[0m16:35:56.757332 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.09s]
[0m16:35:56.758351 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:35:56.759086 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:35:56.760094 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:35:56.760094 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:35:56.761619 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:35:56.767672 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:35:56.769195 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:35:56.773904 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:35:56.774904 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:35:56.775902 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:35:56.775902 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:56.776904 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.776904 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:35:56.777901 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:35:56.821889 [debug] [Thread-1 (]: SQL status: OK in 0.043 seconds
[0m16:35:56.823447 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:35:56.824457 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:35:56.825457 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.826466 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:35:56.828403 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:35:56.829990 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.835625 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:35:56.836991 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:35:56.838003 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:56.840368 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:35:56.841379 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:35:56.842890 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:56.845544 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:35:56.845544 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:35:56.847052 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:35:56.857026 [debug] [Thread-1 (]: SQL status: OK in 0.010 seconds
[0m16:35:56.860133 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:35:56.861774 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:35:56.864828 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.866365 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:35:56.867473 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA225A5D90>]}
[0m16:35:56.868343 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.11s]
[0m16:35:56.869987 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:35:56.869987 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:35:56.871553 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:35:56.873140 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:35:56.873140 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:35:56.879213 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:35:56.881223 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:35:56.886089 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:35:56.887607 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:35:56.889053 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:35:56.889053 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:56.890373 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:56.891075 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:35:56.892586 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:35:57.395225 [debug] [Thread-1 (]: SQL status: OK in 0.502 seconds
[0m16:35:57.399354 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:35:57.399354 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:35:57.401847 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.403851 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:35:57.404377 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:35:57.406032 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.408607 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:35:57.408607 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:35:57.410112 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:57.413713 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:35:57.414715 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:35:57.415289 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:57.416302 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:35:57.417367 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:35:57.417367 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:35:57.632478 [debug] [Thread-1 (]: SQL status: OK in 0.214 seconds
[0m16:35:57.637040 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:35:57.637040 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:35:57.640871 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:57.642894 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:35:57.642894 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA31427D10>]}
[0m16:35:57.642894 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.77s]
[0m16:35:57.644762 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:35:57.645774 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:35:57.647442 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m16:35:57.648455 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m16:35:57.649453 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:35:57.649453 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:35:57.677880 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:35:57.677880 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:35:57.677880 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:57.679470 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.679470 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:35:57.679470 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m16:35:57.681049 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.692943 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:35:57.692943 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:35:57.751915 [debug] [Thread-1 (]: SQL status: OK in 0.058 seconds
[0m16:35:57.786570 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:35:57.790978 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:35:57.791986 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:35:57.792555 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:35:57.794795 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.796122 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:35:57.797205 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA31427D10>]}
[0m16:35:57.797748 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.15s]
[0m16:35:57.797748 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:35:57.797748 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:35:57.799265 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m16:35:57.800274 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m16:35:57.801332 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:35:57.801851 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:35:57.806175 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:35:57.807281 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m16:35:57.808294 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:57.808294 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.809806 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:35:57.810394 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m16:35:57.811985 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.813681 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:35:57.814683 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:35:57.817245 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:57.818258 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:35:57.821315 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:35:57.821315 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:35:57.822646 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:35:57.824362 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.825361 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m16:35:57.825361 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA313A7EF0>]}
[0m16:35:57.826356 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.03s]
[0m16:35:57.826356 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:35:57.826356 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:35:57.827865 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m16:35:57.827865 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m16:35:57.829470 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:35:57.829470 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:35:57.834785 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:35:57.835798 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m16:35:57.835798 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:57.836807 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.837315 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:35:57.837315 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m16:35:57.838318 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:57.838318 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:35:57.839823 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:35:57.841835 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:57.841835 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:35:57.842893 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:35:57.844453 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:35:57.844453 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:35:57.845461 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.846972 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m16:35:57.847577 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA31453E00>]}
[0m16:35:57.849588 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.02s]
[0m16:35:57.850653 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:35:57.851718 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:35:57.852841 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m16:35:57.853857 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m16:35:57.854948 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:35:57.855959 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:35:57.860091 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:35:57.861725 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m16:35:57.862737 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:57.863254 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.864772 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:35:57.864772 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m16:35:57.866297 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:57.867352 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:35:57.867352 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:35:57.870079 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:57.870079 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:35:57.874769 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:35:57.875764 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:35:57.875764 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:35:57.877764 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.877764 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m16:35:57.877764 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA31454380>]}
[0m16:35:57.879331 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.02s]
[0m16:35:57.879331 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:35:57.880889 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:35:57.881508 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m16:35:57.881508 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:35:57.883031 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:35:57.884045 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:35:57.888593 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:35:57.888593 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:35:57.891114 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:57.892619 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.893136 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:35:57.893136 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m16:35:57.894144 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:57.895665 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:35:57.896663 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:35:57.899695 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:57.899695 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:35:57.903505 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:35:57.904077 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:35:57.904738 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:35:57.906347 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.907356 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:35:57.907869 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA31456540>]}
[0m16:35:57.907869 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.03s]
[0m16:35:57.908871 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:35:57.909879 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:35:57.910479 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m16:35:57.911492 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:35:57.912610 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:35:57.913906 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:35:57.917476 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:35:57.919204 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:35:57.920265 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:57.920265 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.921276 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:35:57.921785 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m16:35:57.922791 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:57.923802 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:35:57.924802 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:35:57.928319 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:57.928856 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:35:57.933273 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:35:57.934282 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:35:57.934282 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:35:57.936884 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:57.938402 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:35:57.939910 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA225DEF60>]}
[0m16:35:57.940927 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.03s]
[0m16:35:57.942936 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:35:57.943444 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:35:57.944454 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m16:35:57.945680 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:35:57.946691 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:35:57.947199 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:35:57.955354 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:35:57.955354 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:35:57.956367 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:57.957380 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.957380 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:35:57.958391 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m16:35:57.960043 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.962564 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:35:57.963377 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:35:57.967604 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:35:57.969604 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:35:57.974575 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:35:57.975194 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:35:57.975702 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:35:57.977716 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:57.979644 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:35:57.981208 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA225A5F70>]}
[0m16:35:57.981753 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.04s]
[0m16:35:57.983164 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:35:57.984174 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:35:57.985185 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m16:35:57.986651 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:35:57.987158 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:35:57.988175 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:35:57.995584 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:35:57.996595 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:35:57.997595 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:57.998595 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:57.999863 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:35:57.999863 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m16:35:58.001389 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.003829 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:35:58.003829 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:35:58.008871 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:35:58.009927 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:35:58.013957 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:35:58.014959 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:35:58.015471 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:35:58.018057 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.019565 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:35:58.020577 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA21DFD130>]}
[0m16:35:58.021577 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.03s]
[0m16:35:58.023087 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:35:58.024097 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:35:58.025774 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m16:35:58.026787 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:35:58.026787 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:35:58.027799 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:35:58.034845 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:35:58.035861 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:35:58.037860 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.039334 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:58.039844 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:35:58.040860 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m16:35:58.042168 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.043212 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:35:58.044225 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:35:58.048412 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:58.049922 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:35:58.056999 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:35:58.057999 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:35:58.059001 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:35:58.060999 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.063000 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:35:58.063508 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA225BA8D0>]}
[0m16:35:58.063508 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.04s]
[0m16:35:58.067963 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:35:58.068975 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:35:58.069975 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m16:35:58.071974 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m16:35:58.072979 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:35:58.073492 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:35:58.080054 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:35:58.080054 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m16:35:58.081061 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.081061 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.081061 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:35:58.082567 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m16:35:58.084397 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.087216 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:35:58.088303 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:35:58.090445 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:58.093013 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:35:58.094770 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:35:58.096294 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:35:58.096827 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:35:58.099938 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:58.101029 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m16:35:58.102122 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA313BB3B0>]}
[0m16:35:58.102651 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.03s]
[0m16:35:58.104172 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:35:58.104733 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:35:58.104733 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m16:35:58.107300 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m16:35:58.107300 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:35:58.123095 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:35:58.126107 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:35:58.274129 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:35:58.276139 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:35:58.277142 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m16:35:58.278140 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.278140 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.280226 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:35:58.281235 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.282761 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:58.288134 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m16:35:58.290134 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m16:35:58.290134 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m16:35:58.290645 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.18s]
[0m16:35:58.290645 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:35:58.290645 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:35:58.292154 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m16:35:58.292673 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m16:35:58.292673 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:35:58.299341 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:35:58.302748 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:35:58.305030 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:35:58.307602 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:35:58.307602 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m16:35:58.308615 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.308615 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.310125 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:35:58.310125 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.311717 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.313237 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m16:35:58.316351 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m16:35:58.317983 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m16:35:58.318996 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.03s]
[0m16:35:58.320067 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:35:58.321632 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:35:58.322649 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m16:35:58.323697 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m16:35:58.324705 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:35:58.334572 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:35:58.336094 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:35:58.338626 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:35:58.340133 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:35:58.340133 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m16:35:58.341152 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.341152 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.342655 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:35:58.342655 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:35:58.348349 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:35:58.351486 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m16:35:58.353004 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m16:35:58.353004 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m16:35:58.354101 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.03s]
[0m16:35:58.354655 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:35:58.356225 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:35:58.357243 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m16:35:58.357243 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m16:35:58.358251 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:35:58.361903 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:35:58.363663 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:35:58.368317 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:35:58.371369 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:35:58.371369 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m16:35:58.371369 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.373492 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.374036 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:35:58.375214 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.376277 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.378984 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m16:35:58.381285 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m16:35:58.381839 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m16:35:58.384492 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.03s]
[0m16:35:58.387036 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:35:58.387544 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:35:58.388556 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m16:35:58.388556 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m16:35:58.391083 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:35:58.399336 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:35:58.402045 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:35:58.408391 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:35:58.409900 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:35:58.411092 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m16:35:58.411619 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.412635 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.413800 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:35:58.413800 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.420818 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:35:58.422936 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m16:35:58.424557 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m16:35:58.425568 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m16:35:58.426986 [warn ] [Thread-1 (]: 26 of 97 WARN 1 relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[33mWARN 1[0m in 0.04s]
[0m16:35:58.426986 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:35:58.428212 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:35:58.428212 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m16:35:58.429222 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m16:35:58.429222 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:35:58.435789 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:35:58.437307 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:35:58.440836 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:35:58.442975 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:35:58.443487 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m16:35:58.443487 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.444495 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.444495 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:35:58.444495 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:35:58.447012 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:58.448025 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m16:35:58.449532 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m16:35:58.449532 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m16:35:58.451147 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.02s]
[0m16:35:58.451881 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:35:58.451881 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:35:58.454110 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m16:35:58.454777 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m16:35:58.454777 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:35:58.463329 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:35:58.464962 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:35:58.468679 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:35:58.469678 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:35:58.470303 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m16:35:58.470303 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.471332 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.471332 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:35:58.471332 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.473647 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.474658 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m16:35:58.475655 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m16:35:58.475655 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m16:35:58.476658 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.02s]
[0m16:35:58.476658 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:35:58.476658 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:35:58.478166 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m16:35:58.478166 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m16:35:58.479764 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:35:58.486380 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:35:58.487435 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:35:58.491138 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:35:58.492644 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:35:58.492644 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m16:35:58.493173 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.494464 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.494993 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:35:58.496007 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:35:58.499872 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:58.503047 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m16:35:58.504796 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m16:35:58.505317 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m16:35:58.506397 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.03s]
[0m16:35:58.507511 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:35:58.508521 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:35:58.508521 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m16:35:58.510032 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m16:35:58.510032 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:35:58.515209 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:35:58.517294 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:35:58.546716 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:35:58.548548 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:35:58.549568 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m16:35:58.551252 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.552877 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.553419 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:35:58.553929 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.558009 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:58.561540 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m16:35:58.565068 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m16:35:58.565068 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m16:35:58.569070 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.06s]
[0m16:35:58.593167 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:35:58.593167 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:35:58.594180 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m16:35:58.596699 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m16:35:58.597597 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:35:58.605069 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:35:58.608242 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:35:58.615144 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:35:58.617920 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:35:58.618937 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m16:35:58.619937 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.620937 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.621944 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:35:58.623449 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.626482 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:58.628339 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m16:35:58.631541 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m16:35:58.632217 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m16:35:58.633288 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.04s]
[0m16:35:58.636991 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:35:58.638478 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:35:58.638989 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:35:58.640363 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m16:35:58.641382 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:35:58.655119 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:35:58.657140 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:35:58.659927 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:35:58.661501 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:35:58.662639 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m16:35:58.662639 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.664653 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.664653 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:35:58.665852 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.671175 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:35:58.673333 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m16:35:58.675180 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m16:35:58.676407 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m16:35:58.677579 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.04s]
[0m16:35:58.678770 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:35:58.679872 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:35:58.679872 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:35:58.680884 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m16:35:58.681391 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:35:58.688056 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:35:58.691091 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:35:58.693304 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:35:58.695348 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:35:58.695348 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m16:35:58.696873 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.697472 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.698483 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:35:58.698483 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.707193 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:35:58.709828 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m16:35:58.711407 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m16:35:58.711915 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m16:35:58.712421 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:35:58.712941 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:35:58.713953 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:35:58.713953 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m16:35:58.714953 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m16:35:58.715462 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:35:58.720736 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:35:58.722782 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:35:58.728510 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:35:58.730523 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:35:58.731526 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m16:35:58.731526 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.733037 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.734051 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:35:58.735376 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.737603 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.740622 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m16:35:58.742694 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m16:35:58.743333 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m16:35:58.745148 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.03s]
[0m16:35:58.747370 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:35:58.747907 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:35:58.747907 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m16:35:58.747907 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m16:35:58.749428 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:35:58.757577 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:35:58.760106 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:35:58.762749 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:35:58.764944 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:35:58.766254 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m16:35:58.766779 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.767871 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.767871 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:35:58.768884 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.770095 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.773251 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m16:35:58.775759 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m16:35:58.776845 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m16:35:58.777374 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.03s]
[0m16:35:58.778384 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:35:58.778890 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:35:58.780157 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:35:58.781368 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m16:35:58.782443 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:35:58.791873 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:35:58.793401 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:35:58.797450 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:35:58.799462 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:35:58.799972 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m16:35:58.800984 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.801610 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.802187 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:35:58.802187 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.805966 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:58.807521 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m16:35:58.808533 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m16:35:58.808533 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m16:35:58.810040 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:35:58.810040 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:35:58.811625 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:35:58.812248 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:35:58.813340 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m16:35:58.814866 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:35:58.820113 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:35:58.822746 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:35:58.826185 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:35:58.828697 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:35:58.828697 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m16:35:58.829708 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.829708 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.829708 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:35:58.831359 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.839160 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:35:58.840164 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m16:35:58.842571 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m16:35:58.843103 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m16:35:58.843103 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:35:58.844698 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:35:58.846228 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:35:58.846755 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m16:35:58.847343 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m16:35:58.848353 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:35:58.853644 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:35:58.856161 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:35:58.860551 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:35:58.861560 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:35:58.862822 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m16:35:58.863367 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.864976 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.865567 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:35:58.865567 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.867773 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.871991 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m16:35:58.873703 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m16:35:58.874243 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m16:35:58.875359 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.03s]
[0m16:35:58.876448 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:35:58.877679 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:35:58.878213 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m16:35:58.879280 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m16:35:58.879842 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:35:58.884552 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:35:58.886061 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:35:58.890217 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:35:58.892422 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:35:58.892952 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m16:35:58.892952 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.894517 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.894517 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:35:58.894517 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.895529 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.898457 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m16:35:58.899460 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m16:35:58.901145 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m16:35:58.901739 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m16:35:58.903427 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:35:58.903971 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:35:58.905479 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:35:58.907339 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m16:35:58.907880 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:35:58.913365 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:35:58.914887 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:35:58.921431 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:35:58.923855 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:35:58.923855 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m16:35:58.923855 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.925867 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.926866 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:35:58.926866 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.929384 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:58.930963 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m16:35:58.932761 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m16:35:58.932761 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m16:35:58.935409 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:35:58.936951 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:35:58.936951 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:35:58.938250 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:35:58.939760 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m16:35:58.940860 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:35:58.946902 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:35:58.947969 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:35:58.952766 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:35:58.955027 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:35:58.955027 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m16:35:58.955027 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.956547 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.956547 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:35:58.957052 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.960156 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:35:58.962423 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m16:35:58.962940 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m16:35:58.963948 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m16:35:58.963948 [warn ] [Thread-1 (]: 41 of 97 WARN 1 relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[33mWARN 1[0m in 0.02s]
[0m16:35:58.965456 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:35:58.966001 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:35:58.966520 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m16:35:58.967533 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m16:35:58.967533 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:35:58.972878 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:35:58.976285 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:35:58.979513 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:35:58.982894 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:35:58.983445 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m16:35:58.983445 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:58.983969 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.984982 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:35:58.984982 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:35:58.986503 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:58.989037 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m16:35:58.991145 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m16:35:58.991145 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m16:35:58.992223 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.03s]
[0m16:35:58.993296 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:35:58.993296 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:35:58.994816 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m16:35:58.995830 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m16:35:58.996869 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:35:58.999437 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:35:59.002237 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:35:59.004429 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:35:59.006032 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:35:59.006032 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m16:35:59.006032 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.007088 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.007596 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:35:59.008132 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.009145 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.010143 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m16:35:59.012438 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m16:35:59.012965 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m16:35:59.013510 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.02s]
[0m16:35:59.013510 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:35:59.013510 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:35:59.015030 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:35:59.020139 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m16:35:59.020938 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:35:59.029220 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:35:59.031324 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:35:59.034386 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:35:59.034386 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:35:59.035893 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m16:35:59.036910 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.038444 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:59.038444 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:35:59.038444 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.042474 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:59.044565 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m16:35:59.046579 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m16:35:59.047087 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m16:35:59.047597 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:35:59.048607 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:35:59.048607 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:35:59.049607 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:35:59.051191 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m16:35:59.051869 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:35:59.063782 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:35:59.065304 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:35:59.069143 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:35:59.071857 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:35:59.071857 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m16:35:59.073524 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.073524 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.074791 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:35:59.074791 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.081095 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:35:59.082622 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m16:35:59.084262 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m16:35:59.086905 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m16:35:59.086905 [warn ] [Thread-1 (]: 45 of 97 WARN 1 relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[33mWARN 1[0m in 0.04s]
[0m16:35:59.088800 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:35:59.090047 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:35:59.090047 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m16:35:59.092059 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m16:35:59.093105 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:35:59.100978 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:35:59.102929 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:35:59.105787 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:35:59.108477 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:35:59.108477 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m16:35:59.109989 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.110573 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.110573 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:35:59.110573 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.111586 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.115049 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m16:35:59.116579 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m16:35:59.117088 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m16:35:59.118099 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.03s]
[0m16:35:59.121363 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:35:59.122427 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:35:59.123495 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m16:35:59.124568 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m16:35:59.125711 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:35:59.130661 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:35:59.132800 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:35:59.136840 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:35:59.138257 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:35:59.139767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m16:35:59.141143 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.142154 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.142676 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:35:59.142676 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.144203 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.145723 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m16:35:59.148241 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m16:35:59.148241 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m16:35:59.150529 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.03s]
[0m16:35:59.152086 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:35:59.152607 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:35:59.152607 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:35:59.153550 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m16:35:59.155784 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:35:59.162407 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:35:59.164629 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:35:59.168426 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:35:59.170167 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:35:59.170167 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m16:35:59.171177 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.171177 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.171177 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:35:59.172742 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.176765 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:35:59.178278 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m16:35:59.180415 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m16:35:59.180923 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m16:35:59.182995 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:35:59.185297 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:35:59.186010 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:35:59.186597 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:35:59.187685 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m16:35:59.188801 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:35:59.198511 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:35:59.204693 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:35:59.210400 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:35:59.215492 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:35:59.216816 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m16:35:59.217140 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.217645 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.219172 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:35:59.219172 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.232504 [debug] [Thread-1 (]: SQL status: OK in 0.011 seconds
[0m16:35:59.235106 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m16:35:59.237717 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m16:35:59.239861 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m16:35:59.241561 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.05s]
[0m16:35:59.242624 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:35:59.243730 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:35:59.244870 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m16:35:59.245410 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m16:35:59.246676 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:35:59.255166 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:35:59.256687 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:35:59.260971 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:35:59.263078 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:35:59.263624 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m16:35:59.264164 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.266432 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:59.267565 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:35:59.268651 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.270829 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.273587 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m16:35:59.275140 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m16:35:59.275140 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m16:35:59.276135 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.03s]
[0m16:35:59.277140 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:35:59.278138 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:35:59.278138 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m16:35:59.278138 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m16:35:59.279797 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:35:59.286995 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:35:59.289020 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:35:59.292092 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:35:59.294991 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:35:59.295499 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m16:35:59.296022 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.296558 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.297088 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:35:59.297623 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.298690 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.300280 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m16:35:59.301364 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m16:35:59.301906 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m16:35:59.302442 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:35:59.302964 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:35:59.304485 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:35:59.305027 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:35:59.306094 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m16:35:59.306094 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:35:59.311699 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:35:59.313219 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:35:59.316373 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:35:59.318883 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:35:59.319722 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m16:35:59.321430 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.322975 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:59.323990 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:35:59.323990 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.325987 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:59.328506 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m16:35:59.331087 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m16:35:59.331087 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m16:35:59.332620 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:35:59.334192 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:35:59.336943 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:35:59.338556 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:35:59.338556 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m16:35:59.340067 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:35:59.348341 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:35:59.351027 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:35:59.355848 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:35:59.358256 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:35:59.358849 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m16:35:59.359880 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.360981 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.361496 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:35:59.362032 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.366285 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:59.371409 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m16:35:59.373441 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m16:35:59.374403 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m16:35:59.375449 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:35:59.378368 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:35:59.379431 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:35:59.380037 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m16:35:59.381614 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m16:35:59.382835 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:35:59.390400 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:35:59.391399 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:35:59.398408 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:35:59.401509 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:35:59.402696 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m16:35:59.403226 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.404844 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.404844 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:35:59.405896 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.408827 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.411545 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m16:35:59.413246 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m16:35:59.414535 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m16:35:59.415777 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.03s]
[0m16:35:59.417611 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:35:59.419267 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:35:59.420824 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m16:35:59.421931 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m16:35:59.422975 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:35:59.429707 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:35:59.431754 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:35:59.436391 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:35:59.438997 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:35:59.440010 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m16:35:59.441011 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.441011 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.442862 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:35:59.442862 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.444891 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.447500 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m16:35:59.449510 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m16:35:59.450020 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m16:35:59.451626 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.03s]
[0m16:35:59.452798 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:35:59.454328 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:35:59.455341 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:35:59.455898 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m16:35:59.457406 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:35:59.464969 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:35:59.467068 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:35:59.471742 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:35:59.476383 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:35:59.477398 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m16:35:59.477398 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.478904 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.479410 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:35:59.479410 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.484434 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:35:59.486737 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m16:35:59.488581 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m16:35:59.490104 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m16:35:59.491316 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:35:59.492856 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:35:59.493385 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:35:59.494613 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:35:59.495624 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m16:35:59.496627 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:35:59.505932 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:35:59.508556 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:35:59.513100 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:35:59.515132 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:35:59.516470 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m16:35:59.517493 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.520475 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:59.520475 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:35:59.521483 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.529201 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:35:59.532746 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m16:35:59.534761 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m16:35:59.535774 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m16:35:59.536775 [warn ] [Thread-1 (]: 57 of 97 WARN 1 relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[33mWARN 1[0m in 0.04s]
[0m16:35:59.538770 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:35:59.539447 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:35:59.540455 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m16:35:59.540455 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m16:35:59.542153 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:35:59.549257 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:35:59.552296 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:35:59.556527 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:35:59.559542 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:35:59.559542 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m16:35:59.561054 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.561054 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.562595 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:35:59.563835 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.564848 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.568407 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m16:35:59.570091 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m16:35:59.570091 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m16:35:59.572635 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.03s]
[0m16:35:59.574154 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:35:59.575156 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:35:59.575156 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m16:35:59.576166 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m16:35:59.576166 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:35:59.589077 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:35:59.591096 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:35:59.595665 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:35:59.598191 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:35:59.599190 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m16:35:59.600190 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.601434 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.602030 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:35:59.603041 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.605070 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.607094 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m16:35:59.609093 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m16:35:59.610092 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m16:35:59.611628 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.03s]
[0m16:35:59.612558 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:35:59.613571 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:35:59.614572 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:35:59.616084 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m16:35:59.617146 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:35:59.624466 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:35:59.627507 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:35:59.632049 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:35:59.633969 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:35:59.635465 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m16:35:59.635465 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.636700 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.637707 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:35:59.638718 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.645576 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:35:59.648783 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m16:35:59.651875 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m16:35:59.653403 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m16:35:59.655428 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.04s]
[0m16:35:59.657682 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:35:59.658693 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:35:59.658693 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:35:59.660154 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m16:35:59.660154 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:35:59.669004 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:35:59.670176 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:35:59.674369 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:35:59.676505 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:35:59.678015 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m16:35:59.678015 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.678015 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.679614 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:35:59.679614 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:35:59.693717 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:35:59.696731 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m16:35:59.698575 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m16:35:59.699583 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m16:35:59.699583 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:35:59.701924 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:35:59.702935 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:35:59.704459 [info ] [Thread-1 (]: 62 of 97 START sql table model main.dim_atividade .............................. [RUN]
[0m16:35:59.705994 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m16:35:59.707005 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:35:59.711885 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:35:59.713898 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:35:59.720705 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:35:59.724217 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:35:59.725221 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:35:59.726235 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.727229 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.727229 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:35:59.728236 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:35:59.731747 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:59.736901 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:35:59.737534 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:35:59.738546 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.741864 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:35:59.742873 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:35:59.742873 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:35:59.745685 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:59.752865 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:35:59.754619 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:35:59.755890 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.758579 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:35:59.760093 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA313E7EC0>]}
[0m16:35:59.760093 [info ] [Thread-1 (]: 62 of 97 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.06s]
[0m16:35:59.762736 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:35:59.763242 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:35:59.764751 [info ] [Thread-1 (]: 63 of 97 START sql table model main.dim_classe_instituicao ..................... [RUN]
[0m16:35:59.765343 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:35:59.767056 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:35:59.772768 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:35:59.774291 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:35:59.780382 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:35:59.782015 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:35:59.783027 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:35:59.784354 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:35:59.785442 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.786546 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:35:59.787828 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:35:59.790882 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:35:59.794635 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:35:59.795643 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:35:59.795643 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:59.797220 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:35:59.797220 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:35:59.798228 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:35:59.799743 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:35:59.804128 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:35:59.804703 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:35:59.804703 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:35:59.809373 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:35:59.810369 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA31455F40>]}
[0m16:36:00.776799 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:36:00.780800 [info ] [Thread-1 (]: 63 of 97 OK created sql table model main.dim_classe_instituicao ................ [[32mOK[0m in 0.05s]
[0m16:36:00.781797 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:36:00.782802 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:36:00.784323 [info ] [Thread-1 (]: 64 of 97 START sql table model main.dim_consolidado ............................ [RUN]
[0m16:36:00.789850 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:36:00.790849 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:36:00.795369 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:36:00.797367 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:36:00.802992 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:36:00.805468 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:36:00.806478 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:36:00.807470 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:00.808468 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:00.809468 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:36:00.810092 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:36:00.811505 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:00.816175 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:36:00.817327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:36:00.818360 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:00.821888 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:36:00.822904 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:36:00.822904 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:36:00.824936 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:36:00.829724 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:36:00.830851 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:36:00.831862 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:00.834403 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:36:00.835401 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA313C2630>]}
[0m16:36:00.837418 [info ] [Thread-1 (]: 64 of 97 OK created sql table model main.dim_consolidado ....................... [[32mOK[0m in 0.05s]
[0m16:36:00.838413 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:36:00.839616 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:36:00.840631 [info ] [Thread-1 (]: 65 of 97 START sql table model main.dim_controle ............................... [RUN]
[0m16:36:00.840631 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:36:00.842677 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:36:00.852722 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:36:00.858742 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:36:00.866306 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:36:00.875359 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:36:00.875359 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:36:00.876371 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:00.877374 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:00.878745 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:36:00.878745 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:36:00.881248 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:00.886468 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:36:00.887482 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:36:00.889478 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:00.893203 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:36:00.898659 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:36:00.900678 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:36:00.903181 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:00.907544 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:36:00.907544 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:36:00.909546 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:00.911546 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:36:00.913058 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA3141A330>]}
[0m16:36:00.913058 [info ] [Thread-1 (]: 65 of 97 OK created sql table model main.dim_controle .......................... [[32mOK[0m in 0.07s]
[0m16:36:00.915495 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:36:00.916497 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:36:00.917496 [info ] [Thread-1 (]: 66 of 97 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m16:36:00.921498 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:36:00.922504 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:36:00.926437 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:36:00.928352 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:36:00.933883 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:36:00.936889 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:36:00.937890 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:36:00.939891 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:00.940894 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:00.941889 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:36:00.942887 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:36:00.945425 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:00.950722 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:36:00.950722 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:36:00.953786 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:00.955794 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:36:00.956911 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:36:00.956911 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:36:00.958390 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:00.963303 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:36:00.963303 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:36:00.964315 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:00.967314 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:36:00.968316 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA220C5490>]}
[0m16:36:00.969906 [info ] [Thread-1 (]: 66 of 97 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.05s]
[0m16:36:00.975761 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:36:00.976774 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:36:00.977774 [info ] [Thread-1 (]: 67 of 97 START sql table model main.dim_porte .................................. [RUN]
[0m16:36:00.980640 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m16:36:00.981654 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:36:00.987184 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:36:00.990914 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:36:00.998985 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:36:01.001983 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:36:01.003497 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:36:01.003497 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.004507 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.005965 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:36:01.005965 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:36:01.007782 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.022004 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:36:01.023003 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:36:01.024530 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.026530 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:36:01.027683 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:36:01.028695 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:36:01.030692 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.034792 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:36:01.034792 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:36:01.035788 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:01.038301 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:36:01.039314 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA313E18E0>]}
[0m16:36:01.041320 [info ] [Thread-1 (]: 67 of 97 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.06s]
[0m16:36:01.043841 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:36:01.044843 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:36:01.045846 [info ] [Thread-1 (]: 68 of 97 START sql table model main.dim_produto_credito ........................ [RUN]
[0m16:36:01.046858 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:36:01.047855 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:36:01.052905 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:36:01.054927 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:36:01.061928 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:36:01.071118 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:36:01.071631 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:36:01.072640 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.073651 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.074656 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:36:01.075659 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:36:01.077672 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.083185 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:36:01.084198 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:36:01.085210 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.087725 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:36:01.088745 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:36:01.088745 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:36:01.091248 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.094856 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:36:01.095868 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:36:01.096870 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:01.100587 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:36:01.100587 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA313B4200>]}
[0m16:36:01.101600 [info ] [Thread-1 (]: 68 of 97 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.05s]
[0m16:36:01.103643 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:36:01.103643 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:36:01.104656 [info ] [Thread-1 (]: 69 of 97 START sql table model main.dim_regiao ................................. [RUN]
[0m16:36:01.107189 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:36:01.108185 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:36:01.113217 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:36:01.115229 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:36:01.123776 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:36:01.127548 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:36:01.129056 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:36:01.131068 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.132072 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:36:01.133070 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:36:01.133580 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:36:01.135590 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.143118 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:36:01.144129 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:36:01.145137 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.148311 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:36:01.148942 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:36:01.148942 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:36:01.151574 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.156649 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:36:01.156649 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:36:01.158647 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:01.160645 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:36:01.164176 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA314264E0>]}
[0m16:36:01.166184 [info ] [Thread-1 (]: 69 of 97 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.06s]
[0m16:36:01.170494 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:36:01.171487 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:36:01.199180 [info ] [Thread-1 (]: 70 of 97 START sql table model main.dim_risco .................................. [RUN]
[0m16:36:01.201182 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:36:01.201182 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:36:01.207252 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:36:01.209782 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:36:01.216436 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:36:01.218438 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:36:01.219455 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:36:01.219455 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.223538 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:36:01.224551 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:36:01.225882 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:36:01.228059 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.236096 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:36:01.238123 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:36:01.239210 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.242849 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:36:01.244712 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:36:01.245249 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:36:01.247356 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.249369 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:36:01.249369 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:36:01.249369 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:01.253717 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:36:01.254227 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA225EC7D0>]}
[0m16:36:01.256250 [info ] [Thread-1 (]: 70 of 97 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.05s]
[0m16:36:01.257770 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:36:01.258781 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:36:01.260291 [info ] [Thread-1 (]: 71 of 97 START sql table model main.dim_segmento ............................... [RUN]
[0m16:36:01.261304 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:36:01.261824 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:36:01.264776 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:36:01.267716 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:36:01.271346 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:36:01.274121 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:36:01.274121 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:36:01.275123 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.275123 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.275123 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:36:01.275123 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:36:01.276632 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.281691 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:36:01.282700 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:36:01.283219 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.284230 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:36:01.285854 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:36:01.286865 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:36:01.288381 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.291899 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:36:01.291899 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:36:01.293416 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:01.295434 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:36:01.295434 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA317DB800>]}
[0m16:36:01.296940 [info ] [Thread-1 (]: 71 of 97 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.03s]
[0m16:36:01.297562 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:36:01.298084 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:36:01.298084 [info ] [Thread-1 (]: 72 of 97 START test not_null_dim_classe_instituicao_id_classe .................. [RUN]
[0m16:36:01.298084 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m16:36:01.299601 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:36:01.305309 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:36:01.307502 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:36:01.310969 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:36:01.316182 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:36:01.316639 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m16:36:01.317647 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.318234 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.318234 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:36:01.319244 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m16:36:01.321575 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.323194 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m16:36:01.325203 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m16:36:01.325203 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m16:36:01.326208 [info ] [Thread-1 (]: 72 of 97 PASS not_null_dim_classe_instituicao_id_classe ........................ [[32mPASS[0m in 0.03s]
[0m16:36:01.326714 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:36:01.326714 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:36:01.329196 [info ] [Thread-1 (]: 73 of 97 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m16:36:01.329706 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m16:36:01.329706 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:36:01.338623 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:36:01.340146 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:36:01.343192 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:36:01.345727 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:36:01.346725 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m16:36:01.347232 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.347232 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.348257 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:36:01.349246 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:36:01.351855 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:36:01.355220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m16:36:01.357248 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m16:36:01.358263 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m16:36:01.358771 [info ] [Thread-1 (]: 73 of 97 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:36:01.360277 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:36:01.360277 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:36:01.361633 [info ] [Thread-1 (]: 74 of 97 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m16:36:01.361633 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m16:36:01.362642 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:36:01.367456 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:36:01.370308 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:36:01.372849 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:36:01.373860 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:36:01.375380 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m16:36:01.375380 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.376401 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.377124 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:36:01.377124 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:36:01.379723 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:36:01.381313 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m16:36:01.382835 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m16:36:01.382835 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m16:36:01.384959 [info ] [Thread-1 (]: 74 of 97 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.02s]
[0m16:36:01.386021 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:36:01.387032 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:36:01.387547 [info ] [Thread-1 (]: 75 of 97 START test not_null_dim_consolidado_id_consolidado .................... [RUN]
[0m16:36:01.389230 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m16:36:01.389738 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:36:01.395447 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:36:01.396954 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:36:01.399624 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:36:01.401205 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:36:01.401777 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m16:36:01.401777 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.402786 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.403291 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:36:01.403861 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m16:36:01.404980 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.407297 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m16:36:01.408923 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m16:36:01.408923 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m16:36:01.409931 [info ] [Thread-1 (]: 75 of 97 PASS not_null_dim_consolidado_id_consolidado .......................... [[32mPASS[0m in 0.02s]
[0m16:36:01.410514 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:36:01.411524 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:36:01.412535 [info ] [Thread-1 (]: 76 of 97 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m16:36:01.413055 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m16:36:01.414065 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:36:01.421823 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:36:01.422847 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:36:01.425886 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:36:01.427883 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:36:01.428391 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m16:36:01.428391 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.429411 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.429411 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:36:01.431068 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:36:01.432928 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:36:01.436074 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m16:36:01.437593 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m16:36:01.437593 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m16:36:01.438604 [info ] [Thread-1 (]: 76 of 97 PASS relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[32mPASS[0m in 0.03s]
[0m16:36:01.440115 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:36:01.441126 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:36:01.441126 [info ] [Thread-1 (]: 77 of 97 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m16:36:01.441126 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m16:36:01.442713 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:36:01.448417 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:36:01.449925 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:36:01.452700 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:36:01.455740 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:36:01.456260 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m16:36:01.456260 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.457269 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.458388 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:36:01.458388 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:36:01.462022 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:36:01.464061 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m16:36:01.465573 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m16:36:01.466096 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m16:36:01.466616 [info ] [Thread-1 (]: 77 of 97 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.03s]
[0m16:36:01.467729 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:36:01.468691 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:36:01.468691 [info ] [Thread-1 (]: 78 of 97 START test not_null_dim_controle_id_controle .......................... [RUN]
[0m16:36:01.470200 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m16:36:01.470200 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:36:01.476738 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:36:01.478260 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:36:01.480849 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:36:01.482635 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:36:01.482635 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m16:36:01.484325 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.484325 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.484325 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:36:01.484325 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m16:36:01.486924 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.488441 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m16:36:01.490961 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m16:36:01.490961 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m16:36:01.492165 [info ] [Thread-1 (]: 78 of 97 PASS not_null_dim_controle_id_controle ................................ [[32mPASS[0m in 0.02s]
[0m16:36:01.492688 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:36:01.492688 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:36:01.492688 [info ] [Thread-1 (]: 79 of 97 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m16:36:01.494821 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m16:36:01.494821 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:36:01.502618 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:36:01.504461 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:36:01.507451 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:36:01.508464 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:36:01.508464 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m16:36:01.509975 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.510547 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.510547 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:36:01.510547 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:36:01.512701 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.513712 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m16:36:01.515221 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m16:36:01.516232 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m16:36:01.517630 [info ] [Thread-1 (]: 79 of 97 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.02s]
[0m16:36:01.519666 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:36:01.520217 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:36:01.520217 [info ] [Thread-1 (]: 80 of 97 START test unique_dim_controle_id_controle ............................ [RUN]
[0m16:36:01.521879 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m16:36:01.523024 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:36:01.527033 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:36:01.528047 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:36:01.531291 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:36:01.534364 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:36:01.535390 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m16:36:01.535900 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.538431 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:36:01.539435 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:36:01.539435 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:36:01.540431 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:36:01.544412 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m16:36:01.545932 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m16:36:01.546440 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m16:36:01.546946 [info ] [Thread-1 (]: 80 of 97 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.03s]
[0m16:36:01.547525 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:36:01.548534 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:36:01.548534 [info ] [Thread-1 (]: 81 of 97 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:36:01.550044 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:36:01.550044 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:36:01.555825 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:36:01.557630 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:36:01.561696 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:36:01.562708 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:36:01.563912 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:36:01.564914 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.565776 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:36:01.566784 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:36:01.567401 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:36:01.629360 [debug] [Thread-1 (]: SQL status: OK in 0.062 seconds
[0m16:36:01.635451 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:36:01.636266 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:36:01.637778 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.640791 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:36:01.641792 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:36:01.643300 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:36:01.645988 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:36:01.649522 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:36:01.651181 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:36:01.652086 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:01.654621 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:36:01.656632 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA2245FF80>]}
[0m16:36:01.657630 [info ] [Thread-1 (]: 81 of 97 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 0.11s]
[0m16:36:01.660391 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:36:01.662710 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:36:01.664229 [info ] [Thread-1 (]: 82 of 97 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:36:01.665551 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:36:01.666562 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:36:01.671677 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:36:01.675101 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:36:01.681659 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:36:01.684715 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:36:01.685725 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:36:01.686933 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:01.687944 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:01.687944 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:36:01.688946 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:36:02.015469 [debug] [Thread-1 (]: SQL status: OK in 0.325 seconds
[0m16:36:02.021550 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:36:02.022627 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:36:02.024386 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:02.026585 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:36:02.027674 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:36:02.028303 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:36:02.034248 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:36:02.039985 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:36:02.040593 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:36:02.040593 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:02.044551 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:36:02.046003 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA3180D0D0>]}
[0m16:36:02.047064 [info ] [Thread-1 (]: 82 of 97 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.38s]
[0m16:36:02.048157 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:36:02.049225 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:36:02.050537 [info ] [Thread-1 (]: 83 of 97 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:36:02.051647 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:36:02.052867 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:36:02.063921 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:36:02.067495 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:36:02.073998 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:36:02.075677 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:36:02.076673 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:36:02.076673 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:02.078184 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:02.078923 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:36:02.079934 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:36:02.210811 [debug] [Thread-1 (]: SQL status: OK in 0.130 seconds
[0m16:36:02.214936 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:36:02.215532 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:36:02.215532 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:02.217569 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:36:02.219228 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:36:02.220242 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:36:02.221331 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:02.226110 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:36:02.227108 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:36:02.227705 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:02.229284 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:36:02.230293 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA317E6360>]}
[0m16:36:02.231294 [info ] [Thread-1 (]: 83 of 97 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 0.18s]
[0m16:36:02.231294 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:36:02.233235 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:36:02.234250 [info ] [Thread-1 (]: 84 of 97 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:36:02.234250 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:36:02.235876 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:36:02.240491 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:36:02.242005 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:36:02.245665 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:36:02.248187 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:36:02.249188 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:36:02.250396 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:02.251543 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:02.252965 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:36:02.254100 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:36:02.590120 [debug] [Thread-1 (]: SQL status: OK in 0.335 seconds
[0m16:36:02.594178 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:36:02.594686 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:36:02.595694 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:02.597388 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:36:02.598412 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:36:02.599920 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:36:02.613412 [debug] [Thread-1 (]: SQL status: OK in 0.013 seconds
[0m16:36:02.616177 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:36:02.616707 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:36:02.617256 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:36:02.617792 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:36:02.619314 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA313B5C10>]}
[0m16:36:02.620834 [info ] [Thread-1 (]: 84 of 97 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.39s]
[0m16:36:02.622382 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:36:02.622901 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:36:02.623912 [info ] [Thread-1 (]: 85 of 97 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:36:02.624913 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:36:02.625921 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:36:02.632093 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:36:02.633742 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:36:02.644417 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:36:02.645427 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:36:02.645427 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:36:02.646938 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:02.647513 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:02.648525 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:36:02.650046 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:36:03.110159 [debug] [Thread-1 (]: SQL status: OK in 0.460 seconds
[0m16:36:03.117581 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:36:03.119783 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:36:03.121876 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.123848 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:36:03.124710 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:36:03.124710 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:36:03.296346 [debug] [Thread-1 (]: SQL status: OK in 0.170 seconds
[0m16:36:03.301532 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:36:03.302562 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:36:03.303578 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.305089 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:36:03.306103 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0da6ec0b-b9d8-496d-8dca-3bbe5d5a120a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA318461E0>]}
[0m16:36:03.307103 [info ] [Thread-1 (]: 85 of 97 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.68s]
[0m16:36:03.309108 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:36:03.310105 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:36:03.310615 [info ] [Thread-1 (]: 86 of 97 START test not_null_dim_segmento_id_segmento .......................... [RUN]
[0m16:36:03.311909 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m16:36:03.312923 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:36:03.321920 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:36:03.325955 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:36:03.331116 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:36:03.333664 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:36:03.334668 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m16:36:03.334668 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:03.335820 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.336831 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:36:03.337830 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m16:36:03.338835 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.344373 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m16:36:03.346566 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m16:36:03.347588 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m16:36:03.348581 [info ] [Thread-1 (]: 86 of 97 PASS not_null_dim_segmento_id_segmento ................................ [[32mPASS[0m in 0.04s]
[0m16:36:03.352094 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:36:03.353638 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:36:03.361396 [info ] [Thread-1 (]: 87 of 97 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m16:36:03.365827 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m16:36:03.368836 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:36:03.381415 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:36:03.383938 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:36:03.390092 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:36:03.392887 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:36:03.394361 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m16:36:03.395382 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:03.396880 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.397893 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:36:03.398892 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:36:03.401735 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:36:03.404519 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m16:36:03.406648 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m16:36:03.407658 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m16:36:03.408817 [info ] [Thread-1 (]: 87 of 97 PASS relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[32mPASS[0m in 0.04s]
[0m16:36:03.409828 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:36:03.410828 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:36:03.411828 [info ] [Thread-1 (]: 88 of 97 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m16:36:03.412836 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m16:36:03.413344 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:36:03.420397 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:36:03.421479 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:36:03.425003 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:36:03.428530 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:36:03.428530 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m16:36:03.429954 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:03.430966 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.430966 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:36:03.432680 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:36:03.435609 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:36:03.439160 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m16:36:03.441159 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m16:36:03.441159 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m16:36:03.442671 [info ] [Thread-1 (]: 88 of 97 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.03s]
[0m16:36:03.443683 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:36:03.444685 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:36:03.445013 [info ] [Thread-1 (]: 89 of 97 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m16:36:03.445684 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m16:36:03.445684 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:36:03.454595 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:36:03.457189 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:36:03.461447 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:36:03.462998 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:36:03.464010 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m16:36:03.464010 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:03.465516 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.465516 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:36:03.466528 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:36:03.469190 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:36:03.471473 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m16:36:03.476300 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m16:36:03.477303 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m16:36:03.477303 [info ] [Thread-1 (]: 89 of 97 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.03s]
[0m16:36:03.479287 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:36:03.481263 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:36:03.481773 [info ] [Thread-1 (]: 90 of 97 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m16:36:03.482590 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m16:36:03.484355 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:36:03.489535 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:36:03.491055 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:36:03.495279 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:36:03.497853 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:36:03.497853 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m16:36:03.499310 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:03.500324 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.500834 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:36:03.500834 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:36:03.502797 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.505088 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m16:36:03.506099 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m16:36:03.507200 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m16:36:03.508217 [info ] [Thread-1 (]: 90 of 97 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.03s]
[0m16:36:03.510259 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:36:03.510259 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:36:03.510259 [info ] [Thread-1 (]: 91 of 97 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m16:36:03.512972 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m16:36:03.513622 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:36:03.519262 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:36:03.520275 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:36:03.525584 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:36:03.526584 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:36:03.526584 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m16:36:03.526584 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:03.528095 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.528095 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:36:03.528095 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:36:03.529319 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.530868 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m16:36:03.532572 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m16:36:03.534148 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m16:36:03.534148 [info ] [Thread-1 (]: 91 of 97 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.02s]
[0m16:36:03.536733 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:36:03.536733 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:36:03.538724 [info ] [Thread-1 (]: 92 of 97 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m16:36:03.539736 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m16:36:03.539736 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:36:03.542832 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:36:03.546384 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:36:03.550504 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:36:03.552506 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:36:03.553704 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m16:36:03.553704 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:03.555217 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.555217 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:36:03.555217 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:36:03.557327 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.558337 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m16:36:03.559844 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m16:36:03.560517 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m16:36:03.560517 [info ] [Thread-1 (]: 92 of 97 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.02s]
[0m16:36:03.561526 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:36:03.561526 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:36:03.562654 [info ] [Thread-1 (]: 93 of 97 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m16:36:03.562654 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m16:36:03.563663 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:36:03.569042 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:36:03.570194 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:36:03.574069 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:36:03.576554 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:36:03.577086 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m16:36:03.577086 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:03.578138 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.578675 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:36:03.578675 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:36:03.580293 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.581340 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m16:36:03.582919 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m16:36:03.582919 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m16:36:03.583929 [info ] [Thread-1 (]: 93 of 97 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.02s]
[0m16:36:03.585759 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:36:03.585759 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:36:03.586770 [info ] [Thread-1 (]: 94 of 97 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m16:36:03.588107 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m16:36:03.589104 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:36:03.597831 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:36:03.599969 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:36:03.603748 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:36:03.604884 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:36:03.605430 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m16:36:03.605956 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:03.607475 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.608184 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:36:03.608184 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m16:36:03.609199 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.610196 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m16:36:03.611813 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m16:36:03.611813 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m16:36:03.613325 [info ] [Thread-1 (]: 94 of 97 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.02s]
[0m16:36:03.613325 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:36:03.613325 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:36:03.614948 [info ] [Thread-1 (]: 95 of 97 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m16:36:03.615514 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m16:36:03.615514 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:36:03.621776 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:36:03.623464 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:36:03.626827 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:36:03.629550 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:36:03.630084 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m16:36:03.630084 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:03.631157 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.631690 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:36:03.632233 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:36:03.635820 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:36:03.637386 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m16:36:03.638398 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m16:36:03.638398 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m16:36:03.639916 [info ] [Thread-1 (]: 95 of 97 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.02s]
[0m16:36:03.640934 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:36:03.641937 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:36:03.643044 [info ] [Thread-1 (]: 96 of 97 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m16:36:03.644057 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m16:36:03.644565 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:36:03.649688 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:36:03.651785 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:36:03.655768 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:36:03.659111 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:36:03.659646 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m16:36:03.660170 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:03.661242 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.661773 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:36:03.662334 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:36:03.663424 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.664949 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m16:36:03.665578 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m16:36:03.665578 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m16:36:03.666588 [info ] [Thread-1 (]: 96 of 97 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.02s]
[0m16:36:03.667709 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:36:03.668217 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:36:03.669736 [info ] [Thread-1 (]: 97 of 97 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m16:36:03.670243 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m16:36:03.671763 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:36:03.676810 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:36:03.677812 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:36:03.682583 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:36:03.684988 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:36:03.685520 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m16:36:03.685520 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:36:03.686591 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.687651 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:36:03.688240 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m16:36:03.688776 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:36:03.692305 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m16:36:03.692812 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m16:36:03.692812 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m16:36:03.694374 [info ] [Thread-1 (]: 97 of 97 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.02s]
[0m16:36:03.695382 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:36:03.697591 [debug] [MainThread]: Using duckdb connection "master"
[0m16:36:03.697591 [debug] [MainThread]: On master: BEGIN
[0m16:36:03.697591 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:36:03.699779 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:36:03.699779 [debug] [MainThread]: On master: COMMIT
[0m16:36:03.699779 [debug] [MainThread]: Using duckdb connection "master"
[0m16:36:03.701325 [debug] [MainThread]: On master: COMMIT
[0m16:36:03.701849 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:36:03.701849 [debug] [MainThread]: On master: Close
[0m16:36:03.703392 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:36:03.703978 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:36:03.704931 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:36:03.704931 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m16:36:03.705940 [info ] [MainThread]: 
[0m16:36:03.707022 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 12.83 seconds (12.83s).
[0m16:36:03.730429 [debug] [MainThread]: Command end result
[0m16:36:03.789819 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:36:03.793121 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:36:03.806872 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:36:03.808414 [info ] [MainThread]: 
[0m16:36:03.809467 [info ] [MainThread]: [33mCompleted with 4 warnings:[0m
[0m16:36:03.810011 [info ] [MainThread]: 
[0m16:36:03.811070 [warn ] [MainThread]: [33mWarning in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)[0m
[0m16:36:03.811628 [warn ] [MainThread]: Got 1 result, configured to warn if != 0
[0m16:36:03.812179 [info ] [MainThread]: 
[0m16:36:03.812699 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_446031b84e0fad1bdbfdd1cf73647908.sql
[0m16:36:03.813238 [info ] [MainThread]: 
[0m16:36:03.813773 [warn ] [MainThread]: [33mWarning in test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m16:36:03.814306 [warn ] [MainThread]: Got 1 result, configured to warn if != 0
[0m16:36:03.815367 [info ] [MainThread]: 
[0m16:36:03.816385 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_d80151d1e76d6c8de6ceccc7adebe863.sql
[0m16:36:03.816892 [info ] [MainThread]: 
[0m16:36:03.817398 [warn ] [MainThread]: [33mWarning in test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m16:36:03.817398 [warn ] [MainThread]: Got 1 result, configured to warn if != 0
[0m16:36:03.817398 [info ] [MainThread]: 
[0m16:36:03.818951 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_carteira_cr_b00506d5726bd2130bedc66dca5f83d0.sql
[0m16:36:03.819547 [info ] [MainThread]: 
[0m16:36:03.820164 [warn ] [MainThread]: [33mWarning in test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_ (models\gold\schema.yml)[0m
[0m16:36:03.823016 [warn ] [MainThread]: Got 1 result, configured to warn if != 0
[0m16:36:03.824099 [info ] [MainThread]: 
[0m16:36:03.825117 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_fato_operacoes_c_33521a505ad34b09fd04bb9cb908c25d.sql
[0m16:36:03.826361 [info ] [MainThread]: 
[0m16:36:03.826361 [info ] [MainThread]: Done. PASS=93 WARN=4 ERROR=0 SKIP=0 NO-OP=0 TOTAL=97
[0m16:36:03.829781 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:36:03.831939 [debug] [MainThread]: Command `dbt build` succeeded at 16:36:03.831402 after 18.52 seconds
[0m16:36:03.832498 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA206B7B60>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA20664D70>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001EA206667E0>]}
[0m16:36:03.833025 [debug] [MainThread]: Flushing usage events
[0m16:36:04.565274 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:37:53.477031 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E901AF920>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E8FB502F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E8FB51700>]}


============================== 16:37:53.485644 | 12a5d466-65c4-4aad-9a28-3be7dd2369f7 ==============================
[0m16:37:53.485644 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:37:53.488359 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'False', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt build --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:37:53.928420 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E8FA17E90>]}
[0m16:37:54.139648 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E8FBC6270>]}
[0m16:37:54.166263 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:37:55.031527 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:37:55.034563 [debug] [MainThread]: Partial parsing not enabled
[0m16:37:57.771323 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:37:57.772850 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E921200B0>]}
[0m16:37:58.591687 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:37:58.634620 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E923D12E0>]}
[0m16:37:59.039830 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:37:59.044900 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:37:59.169959 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E921F2F60>]}
[0m16:37:59.169959 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:37:59.184480 [info ] [MainThread]: 
[0m16:37:59.184480 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:37:59.185985 [info ] [MainThread]: 
[0m16:37:59.186993 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:37:59.194766 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:37:59.595737 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:37:59.596724 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:37:59.597230 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:38:00.495009 [debug] [ThreadPool]: SQL status: OK in 0.898 seconds
[0m16:38:00.499020 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:38:00.501153 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:38:00.502276 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:38:00.524856 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:38:00.526365 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:38:00.526365 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:38:00.528878 [debug] [ThreadPool]: SQL status: OK in 0.002 seconds
[0m16:38:00.531033 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:38:00.532045 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:38:00.534058 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:38:00.534058 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:38:00.535067 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:38:00.536885 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:38:00.538590 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:38:00.540102 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:38:00.541114 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:38:00.542627 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:38:00.542627 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:38:00.551252 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:38:00.563866 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:38:00.563866 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:38:00.564869 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:38:00.566382 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:38:00.566382 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:38:00.567481 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:38:00.601221 [debug] [ThreadPool]: SQL status: OK in 0.033 seconds
[0m16:38:00.603345 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:38:00.605985 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:38:00.606996 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:38:00.615353 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E921E3320>]}
[0m16:38:00.616398 [debug] [MainThread]: Using duckdb connection "master"
[0m16:38:00.617414 [debug] [MainThread]: On master: BEGIN
[0m16:38:00.617414 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:38:00.617414 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:38:00.617414 [debug] [MainThread]: On master: COMMIT
[0m16:38:00.619220 [debug] [MainThread]: Using duckdb connection "master"
[0m16:38:00.619220 [debug] [MainThread]: On master: COMMIT
[0m16:38:00.620749 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:38:00.621760 [debug] [MainThread]: On master: Close
[0m16:38:00.632683 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:38:00.632683 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:38:00.634309 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:38:00.634309 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:38:00.652588 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:38:00.654830 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:38:00.699763 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:38:00.701270 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:38:00.701270 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:38:00.702355 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:38:00.704676 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:00.704676 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:38:00.706477 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
    UNION ALL
    SELECT * FROM portfolio_fallback
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:38:01.027054 [debug] [Thread-1 (]: SQL status: OK in 0.320 seconds
[0m16:38:01.034322 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:38:01.035839 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:38:01.036886 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.039894 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:38:01.039894 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:38:01.043279 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.054417 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:38:01.055034 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:38:01.057105 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.063327 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:38:01.063327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:38:01.064835 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.084298 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:38:01.084298 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:38:01.084298 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:38:01.096087 [debug] [Thread-1 (]: SQL status: OK in 0.010 seconds
[0m16:38:01.105794 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:38:01.105794 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:38:01.108381 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:01.111530 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:38:01.115565 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E9205ED20>]}
[0m16:38:01.117085 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.48s]
[0m16:38:01.117596 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:38:01.119191 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:38:01.120970 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:38:01.123034 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:38:01.124044 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:38:01.128064 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:38:01.129785 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:38:01.137097 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:38:01.137632 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:38:01.138641 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:38:01.138641 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:01.138641 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.138641 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:38:01.140147 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m16:38:01.197994 [debug] [Thread-1 (]: SQL status: OK in 0.057 seconds
[0m16:38:01.199517 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:38:01.199517 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:38:01.201083 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.202697 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:38:01.202697 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:38:01.204963 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.210222 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:38:01.210222 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:38:01.211739 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:01.215355 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:38:01.216364 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:38:01.217381 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:01.220338 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:38:01.220338 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:38:01.221350 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:38:01.225506 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:38:01.229317 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:38:01.229855 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:38:01.232550 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:01.234590 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:38:01.236096 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E92850830>]}
[0m16:38:01.236096 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.11s]
[0m16:38:01.237613 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:38:01.237613 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:38:01.238621 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m16:38:01.241141 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:38:01.241141 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:38:01.246846 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:38:01.248453 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:38:01.252480 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:38:01.254716 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:38:01.256234 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:38:01.256234 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:01.257241 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.258315 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:38:01.258315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:38:01.278480 [debug] [Thread-1 (]: SQL status: OK in 0.020 seconds
[0m16:38:01.279488 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:38:01.281092 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:38:01.283003 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.284520 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:38:01.286027 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:38:01.288089 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.293858 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:38:01.294377 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:38:01.295904 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.300960 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:38:01.302706 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:38:01.303714 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.305232 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:38:01.305232 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:38:01.306288 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:38:01.307800 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.311836 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:38:01.312844 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:38:01.313348 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.316439 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:38:01.317451 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E92079040>]}
[0m16:38:01.317451 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.08s]
[0m16:38:01.319021 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:38:01.319608 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:38:01.320146 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:38:01.320146 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:38:01.321732 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:38:01.329270 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:38:01.331280 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:38:01.339820 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:38:01.341837 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:38:01.341837 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:38:01.341837 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:01.343352 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:01.344360 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:38:01.345372 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:38:02.010206 [debug] [Thread-1 (]: SQL status: OK in 0.664 seconds
[0m16:38:02.011728 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:38:02.011728 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:38:02.012735 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.014626 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:38:02.016144 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:38:02.019602 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:02.025770 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:38:02.026769 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:38:02.026769 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.031323 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:38:02.033558 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:38:02.034079 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:02.035089 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:38:02.036090 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:38:02.036090 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:38:02.271533 [debug] [Thread-1 (]: SQL status: OK in 0.236 seconds
[0m16:38:02.277472 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:38:02.277989 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:38:02.280094 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:02.282773 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:38:02.283497 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E928AFA10>]}
[0m16:38:02.284019 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.96s]
[0m16:38:02.286034 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:38:02.287045 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:38:02.287045 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m16:38:02.289053 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:38:02.289053 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:38:02.293109 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:38:02.294624 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:38:02.299388 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:38:02.300965 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:38:02.301520 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:38:02.302213 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:02.303250 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.303839 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:38:02.304405 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:38:02.592350 [debug] [Thread-1 (]: SQL status: OK in 0.287 seconds
[0m16:38:02.595623 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:38:02.597150 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_capital_prudencial'
  
[0m16:38:02.598161 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.599669 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:38:02.599669 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_capital_prudencial'
  
[0m16:38:02.602774 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.606042 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:38:02.607056 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial" rename to "fato_capital_prudencial__dbt_backup"
[0m16:38:02.608502 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.614971 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:38:02.615739 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m16:38:02.616297 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.618585 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:38:02.619092 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:38:02.619694 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:38:02.671259 [debug] [Thread-1 (]: SQL status: OK in 0.051 seconds
[0m16:38:02.677152 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:38:02.677152 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m16:38:02.679677 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:02.683019 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:38:02.684535 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E928A1820>]}
[0m16:38:02.684535 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.40s]
[0m16:38:02.687099 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:38:02.687606 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:38:02.688612 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m16:38:02.688612 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:38:02.690119 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:38:02.698953 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:38:02.700632 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:38:02.706227 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:38:02.708762 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:38:02.708762 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:38:02.708762 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:02.710270 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.711897 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:38:02.712908 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:38:02.786792 [debug] [Thread-1 (]: SQL status: OK in 0.073 seconds
[0m16:38:02.789801 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:38:02.790695 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_indexador'
  
[0m16:38:02.792746 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.794881 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:38:02.795998 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_indexador'
  
[0m16:38:02.797605 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.799646 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:38:02.801223 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador" rename to "fato_carteira_credito_indexador__dbt_backup"
[0m16:38:02.801783 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.804688 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:38:02.806964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m16:38:02.808021 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:02.810036 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:38:02.810036 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:38:02.810036 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:38:02.844203 [debug] [Thread-1 (]: SQL status: OK in 0.031 seconds
[0m16:38:02.847828 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:38:02.849347 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m16:38:02.850924 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.853551 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:38:02.854620 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E928A1910>]}
[0m16:38:02.856222 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.17s]
[0m16:38:02.857235 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:38:02.858244 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:38:02.859247 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m16:38:02.860253 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:38:02.860253 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:38:02.869853 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:38:02.871871 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:38:02.874909 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:38:02.876915 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:38:02.878419 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:38:02.879429 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:02.879429 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.881089 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:38:02.881089 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:38:02.958749 [debug] [Thread-1 (]: SQL status: OK in 0.077 seconds
[0m16:38:02.958749 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:38:02.960258 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:38:02.962895 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.965418 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:38:02.966945 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:38:02.967454 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.973947 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:38:02.975018 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais" rename to "fato_carteira_credito_totais__dbt_backup"
[0m16:38:02.978165 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.981305 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:38:02.982321 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:38:02.982842 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:02.985970 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:38:02.986988 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:38:02.987505 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:38:03.126915 [debug] [Thread-1 (]: SQL status: OK in 0.139 seconds
[0m16:38:03.134427 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:38:03.134427 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:38:03.138470 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:03.143569 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:38:03.144578 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E928AB650>]}
[0m16:38:03.147095 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.28s]
[0m16:38:03.148672 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:38:03.149731 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:38:03.151826 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:38:03.152837 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:38:03.153907 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:38:03.161778 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:38:03.165692 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:38:03.170239 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:38:03.174346 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:38:03.175346 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:38:03.175346 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:03.179074 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:03.181223 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:38:03.183112 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:38:03.740087 [debug] [Thread-1 (]: SQL status: OK in 0.556 seconds
[0m16:38:03.742294 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:38:03.742294 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:38:03.742799 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:03.742799 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:38:03.744963 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:38:03.745969 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:03.752966 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:38:03.755097 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado" rename to "fato_demonstracao_resultado__dbt_backup"
[0m16:38:03.756723 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:03.761566 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:38:03.762999 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:38:03.764008 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:03.766716 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:38:03.766716 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:38:03.767329 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:38:03.930857 [debug] [Thread-1 (]: SQL status: OK in 0.163 seconds
[0m16:38:03.933250 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:38:03.934258 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:38:03.937384 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:03.938395 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:38:03.939907 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E926F0B90>]}
[0m16:38:03.940917 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.79s]
[0m16:38:03.941921 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:38:03.943012 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:38:03.943012 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m16:38:03.945643 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:38:03.945643 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:38:03.949376 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:38:03.951659 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:38:03.957183 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:38:03.958772 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:38:03.958772 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:38:03.958772 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:03.959771 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:03.960276 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:38:03.960276 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:38:03.967561 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:38:03.969690 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:38:03.970294 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:38:03.971303 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:03.972865 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:38:03.972865 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:38:03.973871 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:03.976891 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:38:03.977885 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:38:03.981035 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:03.984601 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:38:03.984601 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:38:03.986110 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:03.988641 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:38:03.988641 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:38:03.990150 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:38:03.997046 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:38:03.999568 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:38:03.999568 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:38:04.001747 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:04.003379 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:38:04.004983 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024EA0666F90>]}
[0m16:38:04.005990 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.06s]
[0m16:38:04.007201 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:38:04.007935 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:38:04.008945 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:38:04.008945 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:38:04.009946 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:38:04.017058 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:38:04.019764 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:38:04.025455 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:38:04.026457 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:38:04.027968 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:38:04.027968 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:04.029580 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:04.029580 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:38:04.029580 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:38:04.072788 [debug] [Thread-1 (]: SQL status: OK in 0.041 seconds
[0m16:38:04.074329 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:38:04.075330 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:38:04.076331 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:04.077841 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:38:04.077841 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:38:04.081074 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:04.084322 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:38:04.086184 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:38:04.087903 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:04.094467 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:38:04.095476 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:38:04.096985 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:04.098579 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:38:04.099577 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:38:04.100083 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:38:04.110031 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:38:04.114860 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:38:04.115481 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:38:04.118475 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:04.120120 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:38:04.121124 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E92751FD0>]}
[0m16:38:04.121124 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.11s]
[0m16:38:04.123902 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:38:04.123902 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:38:04.125278 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:38:04.126290 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:38:04.127286 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:38:04.133997 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:38:04.134565 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:38:04.142719 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:38:04.144872 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:38:04.145878 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:38:04.145878 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:04.145878 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:04.146877 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:38:04.147380 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:38:04.605210 [debug] [Thread-1 (]: SQL status: OK in 0.458 seconds
[0m16:38:04.606220 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:38:04.606220 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:38:04.608226 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:04.609899 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:38:04.610497 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:38:04.611507 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:04.616505 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:38:04.616505 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:38:04.617743 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:04.623821 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:38:04.624835 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:38:04.625831 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:04.627351 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:38:04.628351 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:38:04.629386 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:38:04.897575 [debug] [Thread-1 (]: SQL status: OK in 0.268 seconds
[0m16:38:04.901678 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:38:04.901678 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:38:04.907658 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:38:04.910882 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:38:04.910882 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024EA06A0EF0>]}
[0m16:38:04.911898 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.78s]
[0m16:38:04.912746 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:38:04.913756 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:38:04.913756 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m16:38:04.915406 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m16:38:04.915406 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:38:04.915406 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:38:04.949857 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:38:04.949857 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:38:04.949857 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:04.951953 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:04.952841 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:38:04.953422 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */
truncate table "gold_warehouse"."main"."seed_dim_atividade"
[0m16:38:04.958236 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:04.976477 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:38:04.977984 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:38:04.992452 [debug] [Thread-1 (]: SQL status: OK in 0.013 seconds
[0m16:38:04.998073 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:38:05.001201 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:38:05.001828 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:38:05.001828 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:38:05.007440 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:38:05.007983 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:38:05.008992 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024EA0681BE0>]}
[0m16:38:05.011508 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.09s]
[0m16:38:05.013043 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:38:05.014049 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:38:05.015052 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m16:38:05.015563 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m16:38:05.017076 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:38:05.017583 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:38:05.026714 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:38:05.028225 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m16:38:05.028225 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.029743 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.029743 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:38:05.031253 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */
truncate table "gold_warehouse"."main"."seed_dim_classe_instituicao"
[0m16:38:05.033801 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.035897 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:38:05.036914 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:38:05.039923 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:05.041137 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:38:05.042641 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:38:05.044204 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:38:05.044803 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:38:05.049440 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:38:05.052181 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m16:38:05.052700 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E928A17C0>]}
[0m16:38:05.054213 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.04s]
[0m16:38:05.056607 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:38:05.058117 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:38:05.059128 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m16:38:05.060641 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m16:38:05.060641 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:38:05.061655 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:38:05.070080 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:38:05.070080 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m16:38:05.070080 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.071622 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.071622 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:38:05.073138 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */
truncate table "gold_warehouse"."main"."seed_dim_consolidado"
[0m16:38:05.075158 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.077158 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:38:05.077158 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:38:05.079762 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:05.081837 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:38:05.083943 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:38:05.084461 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:38:05.084461 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:38:05.090020 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:38:05.091028 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m16:38:05.092532 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024EA06D2330>]}
[0m16:38:05.093036 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.03s]
[0m16:38:05.095074 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:38:05.096087 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:38:05.097200 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m16:38:05.097763 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m16:38:05.099288 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:38:05.099288 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:38:05.109396 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:38:05.110483 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m16:38:05.110483 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.111717 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.113236 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:38:05.113879 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */
truncate table "gold_warehouse"."main"."seed_dim_controle"
[0m16:38:05.115397 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.117177 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:38:05.117693 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:38:05.121901 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:05.123924 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:38:05.127529 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:38:05.128047 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:38:05.128047 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:38:05.132747 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:38:05.135921 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m16:38:05.135921 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E92850140>]}
[0m16:38:05.136936 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.04s]
[0m16:38:05.137449 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:38:05.138455 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:38:05.138455 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m16:38:05.138455 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:38:05.139962 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:38:05.139962 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:38:05.147539 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:38:05.148549 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:38:05.148549 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.150055 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.151063 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:38:05.151665 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */
truncate table "gold_warehouse"."main"."seed_dim_faixa_vencimento"
[0m16:38:05.152765 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.154420 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:38:05.155007 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:38:05.158552 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:05.158552 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:38:05.160073 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:38:05.161676 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:38:05.161676 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:38:05.166816 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:38:05.167322 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:38:05.167322 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E92857B60>]}
[0m16:38:05.167322 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.03s]
[0m16:38:05.169450 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:38:05.169450 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:38:05.170041 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m16:38:05.172261 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:38:05.172843 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:38:05.173383 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:38:05.181237 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:38:05.182758 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:38:05.182758 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.184340 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.184340 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:38:05.184340 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */
truncate table "gold_warehouse"."main"."seed_dim_porte"
[0m16:38:05.185949 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.188014 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:38:05.188673 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:38:05.191201 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:05.192200 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:38:05.194267 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:38:05.194850 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:38:05.194850 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:38:05.200886 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:38:05.202108 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:38:05.202632 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E927752E0>]}
[0m16:38:05.202632 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.03s]
[0m16:38:05.204148 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:38:05.204148 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:38:05.205221 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m16:38:05.206739 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:38:05.207245 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:38:05.207245 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:38:05.216515 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:38:05.217589 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:38:05.217589 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.217589 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.217589 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:38:05.219178 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */
truncate table "gold_warehouse"."main"."seed_dim_produto_credito"
[0m16:38:05.220882 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.221392 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:38:05.221392 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:38:05.225928 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:05.226923 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:38:05.227946 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:38:05.229558 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:38:05.229558 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:38:05.235933 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:38:05.237012 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:38:05.239022 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024EA06FB9E0>]}
[0m16:38:05.240020 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.03s]
[0m16:38:05.241253 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:38:05.242254 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:38:05.242765 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m16:38:05.244341 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:38:05.244911 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:38:05.244911 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:38:05.252523 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:38:05.253038 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:38:05.253549 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.254716 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.254716 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:38:05.254716 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */
truncate table "gold_warehouse"."main"."seed_dim_regiao"
[0m16:38:05.256317 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.257826 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:38:05.258963 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:38:05.262518 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:05.263043 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:38:05.265572 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:38:05.266296 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:38:05.266816 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:38:05.275170 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:38:05.276169 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:38:05.277170 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E927743B0>]}
[0m16:38:05.278172 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.03s]
[0m16:38:05.278683 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:38:05.279693 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:38:05.279693 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m16:38:05.281719 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:38:05.282867 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:38:05.283951 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:38:05.292662 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:38:05.293185 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:38:05.293185 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.295194 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.295890 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:38:05.295890 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */
truncate table "gold_warehouse"."main"."seed_dim_risco"
[0m16:38:05.297983 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.299537 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:38:05.299537 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:38:05.303325 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:05.304838 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:38:05.307356 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:38:05.308366 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:38:05.310569 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:38:05.315463 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:38:05.317494 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:38:05.319134 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E922F01D0>]}
[0m16:38:05.320380 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.04s]
[0m16:38:05.321392 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:38:05.323847 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:38:05.325846 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m16:38:05.326846 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m16:38:05.326846 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:38:05.328354 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:38:05.336852 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:38:05.337363 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m16:38:05.337363 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.338365 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:05.338365 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:38:05.338365 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */
truncate table "gold_warehouse"."main"."seed_dim_segmento"
[0m16:38:05.338365 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:05.340882 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:38:05.340882 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:38:05.342884 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:05.345120 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:38:05.349297 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:38:05.349808 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:38:05.350818 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:38:05.355236 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:05.356759 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m16:38:05.357268 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E92892DB0>]}
[0m16:38:05.358283 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.03s]
[0m16:38:05.360434 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:38:05.360990 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:38:05.361512 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m16:38:05.361512 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m16:38:05.361512 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:38:05.378060 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:38:05.379690 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:38:05.511723 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:38:05.514758 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:38:05.515461 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m16:38:05.515998 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.516524 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.517539 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:38:05.518055 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:05.520208 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.524800 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m16:38:05.526815 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m16:38:05.527812 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m16:38:05.529687 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.17s]
[0m16:38:05.531306 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:38:05.532326 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:38:05.532842 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m16:38:05.534365 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m16:38:05.536800 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:38:05.544377 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:38:05.547468 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:38:05.551005 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:38:05.554703 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:38:05.555221 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m16:38:05.556231 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.556231 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.557913 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:38:05.558926 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:38:05.561590 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.565147 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m16:38:05.567326 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m16:38:05.567326 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m16:38:05.568335 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.03s]
[0m16:38:05.569841 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:38:05.570347 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:38:05.570347 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m16:38:05.571861 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m16:38:05.572367 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:38:05.583117 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:38:05.584650 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:38:05.587743 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:38:05.590261 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:38:05.590261 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m16:38:05.591277 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.591277 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.592280 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:38:05.592794 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:38:05.603924 [debug] [Thread-1 (]: SQL status: OK in 0.010 seconds
[0m16:38:05.606108 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m16:38:05.607714 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m16:38:05.608724 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m16:38:05.610246 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.04s]
[0m16:38:05.612619 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:38:05.613632 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:38:05.616261 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m16:38:05.617781 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m16:38:05.617781 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:38:05.628655 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:38:05.630835 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:38:05.635574 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:38:05.637098 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:38:05.638113 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m16:38:05.638113 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.639109 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.640108 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:38:05.640616 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:38:05.646005 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:05.651257 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m16:38:05.654101 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m16:38:05.654714 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m16:38:05.657241 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.04s]
[0m16:38:05.658816 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:38:05.658816 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:38:05.660324 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m16:38:05.660324 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m16:38:05.661968 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:38:05.670188 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:38:05.673044 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:38:05.676627 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:38:05.679647 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:38:05.681222 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m16:38:05.681222 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.682750 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.682750 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:38:05.682750 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:05.692000 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:38:05.694641 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m16:38:05.695654 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m16:38:05.696654 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m16:38:05.697166 [error] [Thread-1 (]: 26 of 97 FAIL 2 relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[31mFAIL 2[0m in 0.04s]
[0m16:38:05.698176 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:38:05.699177 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:38:05.700661 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42' to be skipped because of status 'fail'.  Reason: Got 2 results, configured to fail if != 0.
[0m16:38:05.701168 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m16:38:05.702298 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m16:38:05.703442 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:38:05.710213 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:38:05.712493 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:38:05.715539 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:38:05.717070 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:38:05.717581 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m16:38:05.717581 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.719163 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.719807 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:38:05.720363 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:38:05.724890 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:05.726899 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m16:38:05.728408 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m16:38:05.729421 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m16:38:05.729928 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.03s]
[0m16:38:05.731681 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:38:05.732692 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:38:05.734309 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m16:38:05.734918 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m16:38:05.735933 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:38:05.741984 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:38:05.742995 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:38:05.747631 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:38:05.747631 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:38:05.749204 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m16:38:05.749204 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.750211 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:05.750925 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:38:05.750925 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:38:05.752521 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.753537 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m16:38:05.754670 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m16:38:05.754670 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m16:38:05.756269 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.02s]
[0m16:38:05.757288 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:38:05.757288 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:38:05.758588 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m16:38:05.758588 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m16:38:05.760099 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:38:05.764056 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:38:05.766137 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:38:05.769242 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:38:05.771266 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:38:05.771266 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m16:38:05.771266 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.771266 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:05.772790 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:38:05.772790 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:38:05.776807 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:05.777805 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m16:38:05.777805 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m16:38:05.779378 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m16:38:05.779378 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.02s]
[0m16:38:05.779378 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:38:05.782632 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:38:05.783139 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m16:38:05.783139 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m16:38:05.784144 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:38:05.786717 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:38:05.788984 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:38:05.792012 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:38:05.794055 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:38:05.794613 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m16:38:05.794613 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.795618 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.797128 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:38:05.797660 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:38:05.799177 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.801184 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m16:38:05.802773 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m16:38:05.802773 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m16:38:05.804394 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:38:05.805972 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:38:05.806986 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:38:05.807559 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m16:38:05.808566 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m16:38:05.808566 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:38:05.813329 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:38:05.815456 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:38:05.817609 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:38:05.820428 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:38:05.821445 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m16:38:05.821445 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.821445 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.821445 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:38:05.823885 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:05.825915 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.829072 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m16:38:05.831355 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m16:38:05.832891 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m16:38:05.833909 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.03s]
[0m16:38:05.835098 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:38:05.836101 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:38:05.837123 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:38:05.838133 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m16:38:05.839133 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:38:05.854465 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:38:05.856825 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:38:05.861446 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:38:05.863973 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:38:05.863973 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m16:38:05.865479 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.867508 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:05.869786 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:38:05.870379 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:05.877742 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:38:05.880377 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m16:38:05.882739 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m16:38:05.882739 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m16:38:05.884327 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.05s]
[0m16:38:05.885885 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:38:05.885885 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:38:05.886893 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:38:05.887397 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m16:38:05.888406 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:38:05.894355 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:38:05.895361 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:38:05.898509 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:38:05.901031 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:38:05.902043 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m16:38:05.902552 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.904398 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.905483 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:38:05.906551 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:05.915480 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:38:05.916498 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m16:38:05.917608 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m16:38:05.917608 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m16:38:05.917608 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:38:05.919774 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:38:05.919774 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:38:05.920309 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m16:38:05.921352 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m16:38:05.921352 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:38:05.927127 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:38:05.929646 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:38:05.932795 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:38:05.933806 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:38:05.935026 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m16:38:05.936131 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.937142 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.938155 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:38:05.939154 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:38:05.940662 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.943233 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m16:38:05.944862 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m16:38:05.944862 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m16:38:05.945877 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.03s]
[0m16:38:05.947383 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:38:05.948391 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:38:05.949396 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m16:38:05.951679 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m16:38:05.952230 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:38:05.955935 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:38:05.957303 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:38:05.960389 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:38:05.961400 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:38:05.962839 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m16:38:05.962839 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.964852 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.965487 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:38:05.965487 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:05.967003 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.967522 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m16:38:05.969716 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m16:38:05.970306 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m16:38:05.970306 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:38:05.972332 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:38:05.972854 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:38:05.972854 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:38:05.974871 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m16:38:05.974871 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:38:05.980985 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:38:05.982585 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:38:05.989992 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:38:05.992059 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:38:05.992059 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m16:38:05.992059 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:05.993112 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:05.994128 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:38:05.994128 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:05.997337 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:05.999500 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m16:38:06.001081 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m16:38:06.001700 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m16:38:06.002256 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:38:06.003879 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:38:06.005087 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:38:06.006096 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:38:06.007108 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m16:38:06.007835 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:38:06.017677 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:38:06.020518 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:38:06.027056 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:38:06.029348 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:38:06.030866 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m16:38:06.031876 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.032906 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.032906 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:38:06.034420 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.043083 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:38:06.047296 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m16:38:06.049819 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m16:38:06.050831 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m16:38:06.053111 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:38:06.055243 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:38:06.056256 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:38:06.057264 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m16:38:06.058784 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m16:38:06.059784 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:38:06.065569 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:38:06.068151 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:38:06.073885 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:38:06.076404 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:38:06.077415 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m16:38:06.077415 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.078413 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.079481 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:38:06.081389 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.081389 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.084170 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m16:38:06.085729 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m16:38:06.086737 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m16:38:06.087896 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.03s]
[0m16:38:06.088893 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:38:06.088893 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:38:06.089892 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m16:38:06.090399 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m16:38:06.090399 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:38:06.094590 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:38:06.096633 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:38:06.099746 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:38:06.102176 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:38:06.102693 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m16:38:06.103700 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.104206 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.104206 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:38:06.105215 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.107288 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.110338 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m16:38:06.111887 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m16:38:06.111887 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m16:38:06.112898 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m16:38:06.113905 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:38:06.114905 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:38:06.115483 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:38:06.117007 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m16:38:06.117766 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:38:06.125611 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:38:06.126614 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:38:06.129721 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:38:06.132852 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:38:06.133861 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m16:38:06.133861 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.135917 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.135917 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:38:06.135917 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.140043 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:06.142051 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m16:38:06.144412 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m16:38:06.144412 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m16:38:06.145487 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:38:06.147003 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:38:06.147003 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:38:06.148016 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:38:06.148016 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m16:38:06.149520 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:38:06.156027 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:38:06.158084 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:38:06.160090 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:38:06.161881 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:38:06.161881 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m16:38:06.161881 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.162892 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:06.162892 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:38:06.163901 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.169133 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:38:06.171362 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m16:38:06.174121 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m16:38:06.174121 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m16:38:06.175121 [info ] [Thread-1 (]: 41 of 97 PASS relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:38:06.176120 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:38:06.177121 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:38:06.178120 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m16:38:06.180302 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m16:38:06.181312 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:38:06.187006 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:38:06.187516 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:38:06.190028 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:38:06.193461 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:38:06.195130 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m16:38:06.195637 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.197333 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.198577 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:38:06.200166 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.201781 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.203897 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m16:38:06.206655 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m16:38:06.207260 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m16:38:06.207260 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.03s]
[0m16:38:06.208273 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:38:06.209786 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:38:06.210378 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m16:38:06.210378 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m16:38:06.213480 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:38:06.220811 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:38:06.222846 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:38:06.225863 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:38:06.227862 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:38:06.227862 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m16:38:06.229530 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.230199 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.230199 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:38:06.231216 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.231725 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.234346 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m16:38:06.234346 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m16:38:06.234346 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m16:38:06.235948 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.03s]
[0m16:38:06.236954 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:38:06.238003 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:38:06.238003 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:38:06.239007 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m16:38:06.240009 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:38:06.248320 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:38:06.249830 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:38:06.254777 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:38:06.257247 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:38:06.257247 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m16:38:06.257247 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.258835 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.258835 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:38:06.259540 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.262887 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:06.265003 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m16:38:06.266647 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m16:38:06.267275 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m16:38:06.268285 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:38:06.270324 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:38:06.270834 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:38:06.271341 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:38:06.271341 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m16:38:06.271341 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:38:06.281098 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:38:06.282624 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:38:06.287364 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:38:06.288374 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:38:06.289888 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m16:38:06.290903 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.292411 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.292915 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:38:06.292915 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.299860 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:38:06.302525 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m16:38:06.304482 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m16:38:06.305108 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m16:38:06.307132 [info ] [Thread-1 (]: 45 of 97 PASS relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:38:06.308264 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:38:06.308264 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:38:06.310494 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m16:38:06.311585 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m16:38:06.312596 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:38:06.317814 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:38:06.319376 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:38:06.321393 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:38:06.324918 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:38:06.325500 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m16:38:06.326519 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.326519 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.326519 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:38:06.328060 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.328060 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.329657 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m16:38:06.331271 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m16:38:06.332799 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m16:38:06.332799 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.02s]
[0m16:38:06.333804 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:38:06.335204 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:38:06.335716 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m16:38:06.336724 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m16:38:06.337947 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:38:06.345962 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:38:06.347468 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:38:06.353360 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:38:06.355184 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:38:06.355184 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m16:38:06.355184 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.356189 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.357261 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:38:06.357864 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.360383 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.361953 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m16:38:06.363876 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m16:38:06.363876 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m16:38:06.365393 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.03s]
[0m16:38:06.366404 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:38:06.367814 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:38:06.369377 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:38:06.369377 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m16:38:06.370387 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:38:06.380344 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:38:06.382545 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:38:06.385754 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:38:06.387901 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:38:06.388904 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m16:38:06.390097 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.391108 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.391108 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:38:06.392110 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.399336 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:38:06.402676 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m16:38:06.404202 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m16:38:06.404839 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m16:38:06.405379 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.04s]
[0m16:38:06.406901 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:38:06.407408 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:38:06.408415 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:38:06.408415 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m16:38:06.409925 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:38:06.416685 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:38:06.417196 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:38:06.420828 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:38:06.422870 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:38:06.423886 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m16:38:06.424882 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.425882 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.426896 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:38:06.426896 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.439093 [debug] [Thread-1 (]: SQL status: OK in 0.011 seconds
[0m16:38:06.442300 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m16:38:06.442808 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m16:38:06.444390 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m16:38:06.445402 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:38:06.446915 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:38:06.447547 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:38:06.448557 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m16:38:06.450699 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m16:38:06.451217 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:38:06.455091 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:38:06.457114 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:38:06.463748 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:38:06.465788 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:38:06.466883 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m16:38:06.467407 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.467407 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.468994 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:38:06.470266 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.472290 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.473838 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m16:38:06.474830 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m16:38:06.475831 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m16:38:06.476827 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.03s]
[0m16:38:06.477828 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:38:06.477828 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:38:06.477828 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m16:38:06.479434 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m16:38:06.479434 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:38:06.486754 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:38:06.487760 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:38:06.490801 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:38:06.492833 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:38:06.492833 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m16:38:06.492833 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.494432 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.494432 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:38:06.495438 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.497982 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.500497 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m16:38:06.501601 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m16:38:06.502165 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m16:38:06.502690 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:38:06.505049 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:38:06.506575 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:38:06.507670 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:38:06.508684 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m16:38:06.508684 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:38:06.518305 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:38:06.520426 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:38:06.525026 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:38:06.526697 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:38:06.527210 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m16:38:06.527772 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.528911 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.529982 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:38:06.530509 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.533750 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:06.535924 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m16:38:06.536965 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m16:38:06.537526 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m16:38:06.538535 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:38:06.540048 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:38:06.541065 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:38:06.541065 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:38:06.543083 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m16:38:06.543798 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:38:06.555251 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:38:06.556261 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:38:06.561842 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:38:06.564085 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:38:06.564085 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m16:38:06.564085 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.565616 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.567128 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:38:06.568138 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.572628 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:06.575297 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m16:38:06.577812 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m16:38:06.577812 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m16:38:06.577812 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:38:06.579419 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:38:06.581052 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:38:06.581052 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m16:38:06.582834 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m16:38:06.582834 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:38:06.585905 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:38:06.587481 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:38:06.589999 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:38:06.593165 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:38:06.594975 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m16:38:06.594975 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.596986 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.597496 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:38:06.598506 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.599505 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.602779 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m16:38:06.603885 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m16:38:06.604479 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m16:38:06.605113 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:38:06.607160 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:38:06.608759 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:38:06.610269 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m16:38:06.610269 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m16:38:06.610269 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:38:06.622528 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:38:06.624610 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:38:06.628627 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:38:06.629636 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:38:06.631236 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m16:38:06.631236 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.632762 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.632762 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:38:06.632762 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.634422 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.636031 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m16:38:06.638554 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m16:38:06.638554 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m16:38:06.640060 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.03s]
[0m16:38:06.641071 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:38:06.643091 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:38:06.644109 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:38:06.645798 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m16:38:06.645798 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:38:06.655029 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:38:06.658722 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:38:06.660236 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:38:06.661820 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:38:06.663303 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m16:38:06.665092 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.666229 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.666862 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:38:06.666862 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.671619 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:38:06.673276 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m16:38:06.675284 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m16:38:06.675284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m16:38:06.676292 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:38:06.677798 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:38:06.679397 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:38:06.679397 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:38:06.680998 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m16:38:06.680998 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:38:06.688334 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:38:06.692885 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:38:06.696992 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:38:06.700105 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:38:06.701118 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m16:38:06.701118 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.702377 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.702895 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:38:06.703414 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.710281 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:38:06.713592 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m16:38:06.716918 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m16:38:06.718178 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m16:38:06.719751 [info ] [Thread-1 (]: 57 of 97 PASS relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:38:06.721386 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:38:06.722470 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:38:06.722982 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m16:38:06.724068 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m16:38:06.724068 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:38:06.731237 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:38:06.732847 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:38:06.735985 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:38:06.738052 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:38:06.738052 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m16:38:06.738052 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.740045 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.740045 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:38:06.742010 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.744029 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.745608 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m16:38:06.747513 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m16:38:06.748526 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m16:38:06.749524 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.03s]
[0m16:38:06.751047 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:38:06.751651 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:38:06.752228 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m16:38:06.753780 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m16:38:06.754292 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:38:06.759853 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:38:06.762806 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:38:06.767350 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:38:06.770107 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:38:06.770107 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m16:38:06.771667 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.772680 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.773188 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:38:06.775216 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.777617 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.779959 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m16:38:06.780969 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m16:38:06.782791 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m16:38:06.784415 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.03s]
[0m16:38:06.787050 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:38:06.787559 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:38:06.788568 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:38:06.788568 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m16:38:06.790086 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:38:06.796300 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:38:06.797426 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:38:06.802750 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:38:06.804857 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:38:06.805866 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m16:38:06.805866 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.805866 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.808469 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:38:06.808469 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.818352 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:38:06.821412 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m16:38:06.823474 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m16:38:06.823982 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m16:38:06.824992 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.04s]
[0m16:38:06.825992 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:38:06.825992 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:38:06.826988 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:38:06.826988 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m16:38:06.827992 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:38:06.833925 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:38:06.836028 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:38:06.840676 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:38:06.842717 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:38:06.844335 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m16:38:06.845351 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.846857 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.847931 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:38:06.847931 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:06.860732 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:38:06.863254 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m16:38:06.864762 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m16:38:06.864762 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m16:38:06.866548 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:38:06.867562 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:38:06.868071 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:38:06.869077 [info ] [Thread-1 (]: 62 of 97 START sql table model main.dim_atividade .............................. [RUN]
[0m16:38:06.870242 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m16:38:06.870785 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:38:06.874718 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:38:06.875727 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:38:06.879752 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:38:06.881264 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:38:06.882796 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:38:06.882796 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.882796 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.884511 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:38:06.885186 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:38:06.888248 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.888248 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:38:06.889755 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:38:06.890762 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.890762 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:38:06.892272 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:38:06.894408 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.899998 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:38:06.901061 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade" rename to "dim_atividade__dbt_backup"
[0m16:38:06.909489 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.915725 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:38:06.916802 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:38:06.917869 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.921696 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:38:06.922725 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:38:06.922725 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:38:06.947433 [debug] [Thread-1 (]: SQL status: OK in 0.023 seconds
[0m16:38:06.954731 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:38:06.954731 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:38:06.957717 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:06.960240 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:38:06.960240 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E92762120>]}
[0m16:38:06.961861 [info ] [Thread-1 (]: 62 of 97 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.09s]
[0m16:38:06.962916 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:38:06.963470 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:38:06.963470 [info ] [Thread-1 (]: 63 of 97 START sql table model main.dim_classe_instituicao ..................... [RUN]
[0m16:38:06.965669 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:38:06.965669 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:38:06.970547 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:38:06.972572 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:38:06.977111 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:38:06.978548 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:38:06.978548 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:38:06.979557 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:06.979557 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.981182 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:38:06.981182 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:38:06.982714 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.984350 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:38:06.985961 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:38:06.986973 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.990001 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:38:06.991017 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:38:06.993520 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:06.997528 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:38:06.998539 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao" rename to "dim_classe_instituicao__dbt_backup"
[0m16:38:06.999536 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:07.002204 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:38:07.002729 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:38:07.004250 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:07.007603 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:38:07.007603 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:38:07.008609 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:38:07.010820 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:07.015369 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:38:07.016886 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:38:07.019413 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:07.023054 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:38:07.024062 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E9283F110>]}
[0m16:38:08.123117 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:38:08.127137 [info ] [Thread-1 (]: 63 of 97 OK created sql table model main.dim_classe_instituicao ................ [[32mOK[0m in 0.06s]
[0m16:38:08.128650 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:38:08.129657 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:38:08.129657 [info ] [Thread-1 (]: 64 of 97 START sql table model main.dim_consolidado ............................ [RUN]
[0m16:38:08.131436 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:38:08.131436 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:38:08.134481 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:38:08.137004 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:38:08.143155 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:38:08.145548 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:38:08.147079 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:38:08.148092 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.150025 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.150617 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:38:08.152125 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:38:08.153775 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.155432 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:38:08.155990 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:38:08.158201 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.159856 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:38:08.161065 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:38:08.162716 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.168116 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:38:08.168116 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado" rename to "dim_consolidado__dbt_backup"
[0m16:38:08.169124 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:08.174058 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:38:08.174058 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:38:08.175804 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.177817 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:38:08.177817 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:38:08.179695 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:38:08.181314 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:08.187783 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:38:08.188774 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:38:08.190831 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:08.192861 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:38:08.194509 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024EA06863C0>]}
[0m16:38:08.194509 [info ] [Thread-1 (]: 64 of 97 OK created sql table model main.dim_consolidado ....................... [[32mOK[0m in 0.06s]
[0m16:38:08.197034 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:38:08.198052 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:38:08.198052 [info ] [Thread-1 (]: 65 of 97 START sql table model main.dim_controle ............................... [RUN]
[0m16:38:08.201221 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:38:08.201800 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:38:08.206137 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:38:08.207659 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:38:08.215124 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:38:08.216767 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:38:08.217926 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:38:08.217926 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.220460 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:08.222972 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:38:08.223618 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:38:08.228159 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:08.229760 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:38:08.231392 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:38:08.234952 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:08.238415 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:38:08.239416 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:38:08.240416 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.244705 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:38:08.246236 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle" rename to "dim_controle__dbt_backup"
[0m16:38:08.248338 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.252552 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:38:08.253074 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:38:08.254219 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.256668 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:38:08.257261 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:38:08.258272 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:38:08.261422 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:08.265379 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:38:08.265379 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:38:08.269716 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:08.271352 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:38:08.272369 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E8D575520>]}
[0m16:38:08.272897 [info ] [Thread-1 (]: 65 of 97 OK created sql table model main.dim_controle .......................... [[32mOK[0m in 0.07s]
[0m16:38:08.273904 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:38:08.274907 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:38:08.274907 [info ] [Thread-1 (]: 66 of 97 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m16:38:08.276904 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:38:08.276904 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:38:08.279425 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:38:08.281015 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:38:08.286937 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:38:08.288946 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:38:08.289948 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:38:08.290463 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.290463 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.291972 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:38:08.292985 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:38:08.294502 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.297021 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:38:08.298600 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:38:08.299609 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.299609 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:38:08.301521 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:38:08.302622 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.308523 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:38:08.310031 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m16:38:08.310031 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.314879 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:38:08.315409 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:38:08.315948 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:08.318119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:38:08.319131 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:38:08.319131 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:38:08.322255 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:08.324781 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:38:08.325786 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:38:08.328290 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:08.330980 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:38:08.331876 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024EA1720B60>]}
[0m16:38:08.333400 [info ] [Thread-1 (]: 66 of 97 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.06s]
[0m16:38:08.335641 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:38:08.336796 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:38:08.338461 [info ] [Thread-1 (]: 67 of 97 START sql table model main.dim_porte .................................. [RUN]
[0m16:38:08.339604 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m16:38:08.340709 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:38:08.346992 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:38:08.348074 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:38:08.353366 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:38:08.356299 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:38:08.356299 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:38:08.357316 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.358603 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.358603 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:38:08.360116 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:38:08.362265 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.363782 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:38:08.365291 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:38:08.367412 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.369291 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:38:08.370309 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:38:08.371394 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.378378 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:38:08.379390 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte" rename to "dim_porte__dbt_backup"
[0m16:38:08.381911 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.385994 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:38:08.387006 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:38:08.387513 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.388520 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:38:08.390028 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:38:08.390028 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:38:08.392212 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:08.395395 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:38:08.396903 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:38:08.398513 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.401436 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:38:08.402057 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E92792BA0>]}
[0m16:38:08.403579 [info ] [Thread-1 (]: 67 of 97 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.06s]
[0m16:38:08.404777 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:38:08.406376 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:38:08.407610 [info ] [Thread-1 (]: 68 of 97 START sql table model main.dim_produto_credito ........................ [RUN]
[0m16:38:08.408177 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:38:08.409187 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:38:08.411837 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:38:08.412900 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:38:08.419620 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:38:08.420168 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:38:08.420168 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:38:08.421800 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.423002 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.423779 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:38:08.423779 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:38:08.425795 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.426787 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:38:08.428296 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:38:08.429816 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.431331 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:38:08.431331 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:38:08.433053 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.435998 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:38:08.437008 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m16:38:08.437516 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:08.441044 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:38:08.442564 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:38:08.444083 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.445603 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:38:08.445603 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:38:08.446600 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:38:08.448112 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:08.452114 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:38:08.452635 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:38:08.455258 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:08.457317 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:38:08.457317 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024EA173D8E0>]}
[0m16:38:08.458544 [info ] [Thread-1 (]: 68 of 97 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.05s]
[0m16:38:08.458544 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:38:08.460055 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:38:08.461613 [info ] [Thread-1 (]: 69 of 97 START sql table model main.dim_regiao ................................. [RUN]
[0m16:38:08.462626 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:38:08.463867 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:38:08.469471 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:38:08.470030 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:38:08.474184 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:38:08.477189 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:38:08.478190 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:38:08.478704 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.479715 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.479715 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:38:08.479715 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:38:08.481338 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.484572 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:38:08.486098 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:38:08.487108 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.490142 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:38:08.491155 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:38:08.493189 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.501717 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:38:08.502852 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao" rename to "dim_regiao__dbt_backup"
[0m16:38:08.505074 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.511366 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:38:08.512957 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:38:08.514660 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.517438 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:38:08.517960 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:38:08.518514 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:38:08.521306 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:08.526352 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:38:08.526352 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:38:08.532644 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:38:08.533662 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:38:08.534655 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E9283DD60>]}
[0m16:38:08.535657 [info ] [Thread-1 (]: 69 of 97 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.07s]
[0m16:38:08.536653 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:38:08.536653 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:38:08.537655 [info ] [Thread-1 (]: 70 of 97 START sql table model main.dim_risco .................................. [RUN]
[0m16:38:08.538653 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:38:08.539656 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:38:08.544043 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:38:08.547242 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:38:08.551277 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:38:08.554226 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:38:08.555238 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:38:08.555238 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.556628 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.556628 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:38:08.557215 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:38:08.558224 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.560224 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:38:08.561472 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:38:08.562990 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.565513 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:38:08.566523 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:38:08.568069 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.573858 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:38:08.574856 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco" rename to "dim_risco__dbt_backup"
[0m16:38:08.576438 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.581152 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:38:08.581152 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:38:08.582675 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.584235 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:38:08.584235 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:38:08.584235 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:38:08.589905 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:38:08.593040 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:38:08.593040 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:38:08.600079 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:38:08.602331 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:38:08.603360 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E92802510>]}
[0m16:38:08.603919 [info ] [Thread-1 (]: 70 of 97 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.07s]
[0m16:38:08.604488 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:38:08.605080 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:38:08.605080 [info ] [Thread-1 (]: 71 of 97 START sql table model main.dim_segmento ............................... [RUN]
[0m16:38:08.606088 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:38:08.606774 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:38:08.610411 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:38:08.612448 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:38:08.616604 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:38:08.618147 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:38:08.618147 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:38:08.620264 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.621275 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.621785 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:38:08.622796 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:38:08.625087 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.626097 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:38:08.627094 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:38:08.628096 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:08.628602 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:38:08.629609 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:38:08.631194 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.634320 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:38:08.634320 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento" rename to "dim_segmento__dbt_backup"
[0m16:38:08.636919 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.639949 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:38:08.639949 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:38:08.640955 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:08.641955 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:38:08.641955 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:38:08.641955 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:38:08.644719 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:08.649245 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:38:08.650523 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:38:08.653850 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:08.654970 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:38:08.655978 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024EA172D6D0>]}
[0m16:38:08.657743 [info ] [Thread-1 (]: 71 of 97 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.05s]
[0m16:38:08.659266 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:38:08.659266 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:38:08.660778 [info ] [Thread-1 (]: 72 of 97 START test not_null_dim_classe_instituicao_id_classe .................. [RUN]
[0m16:38:08.661793 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m16:38:08.662805 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:38:08.669264 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:38:08.671287 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:38:08.676795 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:38:08.678943 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:38:08.679483 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m16:38:08.680032 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.681104 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.681640 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:38:08.681640 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m16:38:08.683408 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.686228 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m16:38:08.687832 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m16:38:08.687832 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m16:38:08.688842 [info ] [Thread-1 (]: 72 of 97 PASS not_null_dim_classe_instituicao_id_classe ........................ [[32mPASS[0m in 0.03s]
[0m16:38:08.689841 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:38:08.689841 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:38:08.689841 [info ] [Thread-1 (]: 73 of 97 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m16:38:08.691016 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m16:38:08.692015 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:38:08.699549 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:38:08.702310 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:38:08.706137 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:38:08.708697 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:38:08.710207 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m16:38:08.710207 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.710207 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.711868 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:38:08.712656 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:08.716415 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:08.718448 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m16:38:08.719574 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m16:38:08.720196 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m16:38:08.721207 [info ] [Thread-1 (]: 73 of 97 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:38:08.721716 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:38:08.722727 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:38:08.722727 [info ] [Thread-1 (]: 74 of 97 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m16:38:08.723735 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m16:38:08.723735 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:38:08.730337 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:38:08.731978 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:38:08.737622 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:38:08.740144 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:38:08.741156 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m16:38:08.741156 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.743187 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.743187 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:38:08.743187 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:38:08.747775 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:38:08.749374 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m16:38:08.750985 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m16:38:08.751565 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m16:38:08.752131 [info ] [Thread-1 (]: 74 of 97 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.03s]
[0m16:38:08.753663 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:38:08.755094 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:38:08.756108 [info ] [Thread-1 (]: 75 of 97 START test not_null_dim_consolidado_id_consolidado .................... [RUN]
[0m16:38:08.757365 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m16:38:08.758379 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:38:08.765057 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:38:08.766638 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:38:08.772687 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:38:08.774696 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:38:08.775700 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m16:38:08.776351 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.777362 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.778364 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:38:08.778874 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m16:38:08.780390 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.782958 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m16:38:08.783969 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m16:38:08.785227 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m16:38:08.785736 [info ] [Thread-1 (]: 75 of 97 PASS not_null_dim_consolidado_id_consolidado .......................... [[32mPASS[0m in 0.03s]
[0m16:38:08.786746 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:38:08.786746 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:38:08.786746 [info ] [Thread-1 (]: 76 of 97 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m16:38:08.788778 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m16:38:08.788778 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:38:08.800115 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:38:08.803725 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:38:08.807997 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:38:08.810515 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:38:08.811528 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m16:38:08.811528 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.812731 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.813738 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:38:08.813738 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:08.816592 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:08.819732 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m16:38:08.820286 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m16:38:08.820286 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m16:38:08.821291 [info ] [Thread-1 (]: 76 of 97 PASS relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[32mPASS[0m in 0.03s]
[0m16:38:08.821797 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:38:08.822900 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:38:08.822900 [info ] [Thread-1 (]: 77 of 97 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m16:38:08.824023 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m16:38:08.824023 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:38:08.828048 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:38:08.828048 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:38:08.831242 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:38:08.832773 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:38:08.834379 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m16:38:08.834379 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.836006 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.836006 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:38:08.837019 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:38:08.840049 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:08.843078 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m16:38:08.845605 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m16:38:08.845605 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m16:38:08.846604 [info ] [Thread-1 (]: 77 of 97 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.02s]
[0m16:38:08.847115 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:38:08.848123 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:38:08.848123 [info ] [Thread-1 (]: 78 of 97 START test not_null_dim_controle_id_controle .......................... [RUN]
[0m16:38:08.849631 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m16:38:08.849631 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:38:08.857730 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:38:08.859359 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:38:08.862043 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:38:08.863560 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:38:08.864098 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m16:38:08.864098 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.865686 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.866222 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:38:08.867339 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m16:38:08.868893 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.869956 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m16:38:08.871567 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m16:38:08.871567 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m16:38:08.873085 [info ] [Thread-1 (]: 78 of 97 PASS not_null_dim_controle_id_controle ................................ [[32mPASS[0m in 0.02s]
[0m16:38:08.875095 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:38:08.876100 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:38:08.877099 [info ] [Thread-1 (]: 79 of 97 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m16:38:08.878100 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m16:38:08.878100 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:38:08.887111 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:38:08.889123 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:38:08.892738 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:38:08.894948 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:38:08.894948 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m16:38:08.895958 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.895958 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.896956 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:38:08.897463 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:08.898471 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.901687 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m16:38:08.903328 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m16:38:08.904543 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m16:38:08.905117 [info ] [Thread-1 (]: 79 of 97 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.03s]
[0m16:38:08.907222 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:38:08.908313 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:38:08.908313 [info ] [Thread-1 (]: 80 of 97 START test unique_dim_controle_id_controle ............................ [RUN]
[0m16:38:08.910455 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m16:38:08.910455 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:38:08.916258 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:38:08.917309 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:38:08.924823 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:38:08.926827 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:38:08.928336 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m16:38:08.928336 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.929852 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.929852 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:38:08.929852 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:38:08.931370 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.932890 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m16:38:08.933900 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m16:38:08.934409 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m16:38:08.934409 [info ] [Thread-1 (]: 80 of 97 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.02s]
[0m16:38:08.934409 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:38:08.935916 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:38:08.935916 [info ] [Thread-1 (]: 81 of 97 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:38:08.936922 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:38:08.937429 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:38:08.941957 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:38:08.943299 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:38:08.946870 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:38:08.948452 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:38:08.949456 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:38:08.949456 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:08.949456 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:08.951092 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:38:08.951714 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:38:08.995488 [debug] [Thread-1 (]: SQL status: OK in 0.044 seconds
[0m16:38:08.997659 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:38:08.997659 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m16:38:09.000249 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.001757 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:38:09.002846 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m16:38:09.004615 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.009982 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:38:09.011046 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade" rename to "fato_carteira_credito_atividade__dbt_backup"
[0m16:38:09.012653 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.015900 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:38:09.016908 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:38:09.018423 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.019901 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:38:09.020404 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:38:09.020404 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:38:09.022939 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:09.025471 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:38:09.026480 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:38:09.029591 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:09.031172 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:38:09.031172 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E9287C080>]}
[0m16:38:09.032694 [info ] [Thread-1 (]: 81 of 97 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 0.09s]
[0m16:38:09.032694 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:38:09.034283 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:38:09.034283 [info ] [Thread-1 (]: 82 of 97 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:38:09.035856 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:38:09.035856 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:38:09.041920 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:38:09.042955 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:38:09.049572 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:38:09.051161 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:38:09.052563 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:38:09.053631 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:09.054959 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.054959 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:38:09.055968 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:38:09.267421 [debug] [Thread-1 (]: SQL status: OK in 0.212 seconds
[0m16:38:09.271377 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:38:09.272909 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m16:38:09.275930 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:09.276927 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:38:09.277927 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m16:38:09.278434 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.281028 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:38:09.281028 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte" rename to "fato_carteira_credito_porte__dbt_backup"
[0m16:38:09.283167 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.288712 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:38:09.289711 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:38:09.291039 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:09.292541 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:38:09.293053 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:38:09.293053 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:38:09.307318 [debug] [Thread-1 (]: SQL status: OK in 0.013 seconds
[0m16:38:09.312666 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:38:09.313203 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:38:09.315873 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:09.319489 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:38:09.320010 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024EA17264E0>]}
[0m16:38:09.321090 [info ] [Thread-1 (]: 82 of 97 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.28s]
[0m16:38:09.322158 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:38:09.322676 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:38:09.323216 [info ] [Thread-1 (]: 83 of 97 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:38:09.325224 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:38:09.325224 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:38:09.329299 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:38:09.331827 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:38:09.335786 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:38:09.336791 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:38:09.336791 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:38:09.337863 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:09.338866 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.338866 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:38:09.338866 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:38:09.444554 [debug] [Thread-1 (]: SQL status: OK in 0.105 seconds
[0m16:38:09.445564 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:38:09.446560 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:38:09.447064 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:09.448069 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:38:09.448069 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:38:09.449581 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.453349 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:38:09.453906 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto" rename to "fato_carteira_credito_produto__dbt_backup"
[0m16:38:09.455050 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:09.458720 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:38:09.458720 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:38:09.460230 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:09.461806 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:38:09.461806 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:38:09.462815 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:38:09.470866 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:38:09.472903 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:38:09.473912 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:38:09.478430 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:38:09.479450 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:38:09.481273 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E9207A030>]}
[0m16:38:09.481273 [info ] [Thread-1 (]: 83 of 97 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 0.16s]
[0m16:38:09.483811 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:38:09.483811 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:38:09.485893 [info ] [Thread-1 (]: 84 of 97 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:38:09.486941 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:38:09.486941 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:38:09.491893 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:38:09.492945 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:38:09.497297 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:38:09.498970 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:38:09.499493 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:38:09.499493 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:09.501118 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.502346 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:38:09.502346 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:38:09.835921 [debug] [Thread-1 (]: SQL status: OK in 0.333 seconds
[0m16:38:09.837921 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:38:09.837921 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:38:09.840437 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.842961 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:38:09.843986 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:38:09.845985 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.855005 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:38:09.855005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito" rename to "fato_regiao_credito__dbt_backup"
[0m16:38:09.857006 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:09.861010 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:38:09.862007 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:38:09.863172 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:09.865193 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:38:09.866194 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:38:09.866194 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:38:09.962574 [debug] [Thread-1 (]: SQL status: OK in 0.096 seconds
[0m16:38:09.966429 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:38:09.967442 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:38:09.972937 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:38:09.975461 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:38:09.976459 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024EA17CFE90>]}
[0m16:38:09.977967 [info ] [Thread-1 (]: 84 of 97 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.49s]
[0m16:38:09.979569 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:38:09.981266 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:38:09.982793 [info ] [Thread-1 (]: 85 of 97 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:38:09.984634 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:38:09.985828 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:38:09.988867 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:38:09.991893 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:38:09.999980 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:38:10.000996 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:38:10.001991 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:38:10.001991 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:10.003499 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.004510 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:38:10.006157 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:38:10.423900 [debug] [Thread-1 (]: SQL status: OK in 0.417 seconds
[0m16:38:10.425905 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:38:10.425905 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:38:10.426904 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:10.428410 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:38:10.428410 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:38:10.429418 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.435099 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:38:10.435626 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito" rename to "fato_risco_credito__dbt_backup"
[0m16:38:10.437215 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:10.439729 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:38:10.440735 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:38:10.440735 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:10.444424 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:38:10.444424 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:38:10.445431 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:38:10.678897 [debug] [Thread-1 (]: SQL status: OK in 0.233 seconds
[0m16:38:10.682416 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:38:10.682933 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:38:10.690229 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:38:10.692751 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:38:10.692751 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '12a5d466-65c4-4aad-9a28-3be7dd2369f7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024EA17312E0>]}
[0m16:38:10.694895 [info ] [Thread-1 (]: 85 of 97 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.71s]
[0m16:38:10.695900 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:38:10.695900 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:38:10.696900 [info ] [Thread-1 (]: 86 of 97 START test not_null_dim_segmento_id_segmento .......................... [RUN]
[0m16:38:10.697404 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m16:38:10.698410 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:38:10.704718 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:38:10.706314 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:38:10.710344 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:38:10.712908 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:38:10.713416 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m16:38:10.713416 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:10.715592 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.715592 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:38:10.716599 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m16:38:10.717614 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.718149 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m16:38:10.720238 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m16:38:10.721274 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m16:38:10.721274 [info ] [Thread-1 (]: 86 of 97 PASS not_null_dim_segmento_id_segmento ................................ [[32mPASS[0m in 0.02s]
[0m16:38:10.722790 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:38:10.722790 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:38:10.723801 [info ] [Thread-1 (]: 87 of 97 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m16:38:10.724800 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m16:38:10.724800 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:38:10.730335 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:38:10.731336 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:38:10.735163 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:38:10.738691 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:38:10.738691 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m16:38:10.738691 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:10.741216 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:10.741216 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:38:10.742724 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:10.744908 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:10.748599 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m16:38:10.750450 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m16:38:10.751058 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m16:38:10.752117 [info ] [Thread-1 (]: 87 of 97 PASS relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[32mPASS[0m in 0.03s]
[0m16:38:10.753208 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:38:10.753748 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:38:10.754972 [info ] [Thread-1 (]: 88 of 97 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m16:38:10.755522 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m16:38:10.756066 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:38:10.760177 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:38:10.761689 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:38:10.765300 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:38:10.766307 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:38:10.766811 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m16:38:10.767315 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:10.768324 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.769328 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:38:10.769837 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:38:10.772934 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:38:10.773946 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m16:38:10.776951 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m16:38:10.776951 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m16:38:10.778456 [info ] [Thread-1 (]: 88 of 97 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.02s]
[0m16:38:10.779968 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:38:10.779968 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:38:10.779968 [info ] [Thread-1 (]: 89 of 97 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m16:38:10.780973 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m16:38:10.780973 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:38:10.787035 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:38:10.788543 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:38:10.792060 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:38:10.793659 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:38:10.793659 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m16:38:10.794178 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:10.794739 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.794739 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:38:10.794739 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:10.796752 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.798275 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m16:38:10.799780 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m16:38:10.801289 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m16:38:10.801892 [info ] [Thread-1 (]: 89 of 97 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m16:38:10.803408 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:38:10.804094 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:38:10.804651 [info ] [Thread-1 (]: 90 of 97 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m16:38:10.805235 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m16:38:10.806752 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:38:10.815072 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:38:10.817906 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:38:10.821562 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:38:10.824637 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:38:10.826157 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m16:38:10.826157 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:10.827166 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.827166 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:38:10.827166 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:10.828668 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.829673 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m16:38:10.831284 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m16:38:10.831284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m16:38:10.832814 [info ] [Thread-1 (]: 90 of 97 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.03s]
[0m16:38:10.834337 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:38:10.835848 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:38:10.836868 [info ] [Thread-1 (]: 91 of 97 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m16:38:10.837379 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m16:38:10.838391 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:38:10.847201 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:38:10.849207 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:38:10.851791 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:38:10.853306 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:38:10.853887 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m16:38:10.854458 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:10.855048 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.855625 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:38:10.856144 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:38:10.857659 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.860183 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m16:38:10.861798 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m16:38:10.861798 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m16:38:10.862803 [info ] [Thread-1 (]: 91 of 97 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.03s]
[0m16:38:10.863308 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:38:10.863308 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:38:10.865381 [info ] [Thread-1 (]: 92 of 97 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m16:38:10.866390 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m16:38:10.867935 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:38:10.874901 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:38:10.875903 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:38:10.877904 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:38:10.923783 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:38:10.924516 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m16:38:10.925053 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:10.926117 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.926649 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:38:10.927188 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:10.928799 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.931475 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m16:38:10.933219 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m16:38:10.933219 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m16:38:10.934228 [info ] [Thread-1 (]: 92 of 97 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.07s]
[0m16:38:10.934228 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:38:10.936093 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:38:10.936093 [info ] [Thread-1 (]: 93 of 97 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m16:38:10.937103 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m16:38:10.937103 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:38:10.942685 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:38:10.944722 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:38:10.947917 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:38:10.949447 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:38:10.951098 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m16:38:10.951685 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:10.952244 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.952758 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:38:10.953278 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:10.954463 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.957222 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m16:38:10.957736 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m16:38:10.958737 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m16:38:10.958737 [info ] [Thread-1 (]: 93 of 97 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.02s]
[0m16:38:10.958737 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:38:10.960244 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:38:10.960244 [info ] [Thread-1 (]: 94 of 97 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m16:38:10.960244 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m16:38:10.960244 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:38:10.966908 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:38:10.968992 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:38:10.972377 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:38:10.973905 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:38:10.973905 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m16:38:10.973905 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:10.974905 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:38:10.974905 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:38:10.974905 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m16:38:10.975914 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.979479 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m16:38:10.979479 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m16:38:10.981065 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m16:38:10.981065 [info ] [Thread-1 (]: 94 of 97 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.02s]
[0m16:38:10.982591 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:38:10.982591 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:38:10.982591 [info ] [Thread-1 (]: 95 of 97 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m16:38:10.984177 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m16:38:10.984177 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:38:10.990822 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:38:10.992857 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:38:10.995059 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:38:10.997575 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:38:10.997575 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m16:38:10.997575 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:10.998590 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:10.998590 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:38:10.999584 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:38:11.004915 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:38:11.007093 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m16:38:11.008686 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m16:38:11.008686 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m16:38:11.010196 [info ] [Thread-1 (]: 95 of 97 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.03s]
[0m16:38:11.011781 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:38:11.011781 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:38:11.013886 [info ] [Thread-1 (]: 96 of 97 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m16:38:11.015493 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m16:38:11.015493 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:38:11.026721 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:38:11.028229 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:38:11.031285 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:38:11.033807 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:38:11.034316 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m16:38:11.034316 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:11.035824 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:11.035824 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:38:11.036839 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:38:11.037927 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:11.041013 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m16:38:11.044030 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m16:38:11.044600 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m16:38:11.046608 [info ] [Thread-1 (]: 96 of 97 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.03s]
[0m16:38:11.047233 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:38:11.048243 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:38:11.049240 [info ] [Thread-1 (]: 97 of 97 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m16:38:11.049748 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m16:38:11.049748 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:38:11.055836 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:38:11.057432 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:38:11.061580 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:38:11.063098 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:38:11.063098 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m16:38:11.064100 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:38:11.065101 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:11.065606 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:38:11.065606 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m16:38:11.067629 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:38:11.069176 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m16:38:11.070439 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m16:38:11.070979 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m16:38:11.071493 [info ] [Thread-1 (]: 97 of 97 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.02s]
[0m16:38:11.071493 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:38:11.075020 [debug] [MainThread]: Using duckdb connection "master"
[0m16:38:11.075020 [debug] [MainThread]: On master: BEGIN
[0m16:38:11.075020 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:38:11.076029 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:38:11.076029 [debug] [MainThread]: On master: COMMIT
[0m16:38:11.077028 [debug] [MainThread]: Using duckdb connection "master"
[0m16:38:11.077028 [debug] [MainThread]: On master: COMMIT
[0m16:38:11.077028 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:38:11.078029 [debug] [MainThread]: On master: Close
[0m16:38:11.078535 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:38:11.078535 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:38:11.078535 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:38:11.078535 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m16:38:11.079541 [info ] [MainThread]: 
[0m16:38:11.079541 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 11.89 seconds (11.89s).
[0m16:38:11.098649 [debug] [MainThread]: Command end result
[0m16:38:11.152727 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:38:11.157609 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:38:11.170335 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:38:11.171808 [info ] [MainThread]: 
[0m16:38:11.171808 [info ] [MainThread]: [31mCompleted with 1 error, 0 partial successes, and 0 warnings:[0m
[0m16:38:11.173121 [info ] [MainThread]: 
[0m16:38:11.173121 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)[0m
[0m16:38:11.174128 [error] [MainThread]:   Got 2 results, configured to fail if != 0
[0m16:38:11.175138 [info ] [MainThread]: 
[0m16:38:11.175138 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_446031b84e0fad1bdbfdd1cf73647908.sql
[0m16:38:11.176135 [info ] [MainThread]: 
[0m16:38:11.177137 [info ] [MainThread]: Done. PASS=96 WARN=0 ERROR=1 SKIP=0 NO-OP=0 TOTAL=97
[0m16:38:11.179178 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:38:11.181762 [debug] [MainThread]: Command `dbt build` failed at 16:38:11.180237 after 17.95 seconds
[0m16:38:11.181762 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E908C6E70>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E8F228B90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000024E8DA58680>]}
[0m16:38:11.182771 [debug] [MainThread]: Flushing usage events
[0m16:38:11.940092 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:39:01.000907 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2EE460FE0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2EE918200>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2EE919C10>]}


============================== 16:39:01.008456 | 0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb ==============================
[0m16:39:01.008456 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:39:01.010571 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'False', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'invocation_command': 'dbt build --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:39:01.384496 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F06ABEF0>]}
[0m16:39:01.482024 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2EED36C00>]}
[0m16:39:01.486432 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:39:01.933036 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:39:01.936077 [debug] [MainThread]: Partial parsing not enabled
[0m16:39:04.148722 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:39:04.149774 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F0B5EFF0>]}
[0m16:39:04.622183 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:39:04.635063 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F0ECEB70>]}
[0m16:39:04.755864 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:39:04.760018 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:39:04.834185 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F0D65B20>]}
[0m16:39:04.835772 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:39:04.842891 [info ] [MainThread]: 
[0m16:39:04.845475 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:39:04.845475 [info ] [MainThread]: 
[0m16:39:04.846986 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:39:04.853676 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:39:05.082619 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:39:05.082619 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:39:05.082619 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:39:05.974093 [debug] [ThreadPool]: SQL status: OK in 0.890 seconds
[0m16:39:05.977093 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:39:05.978617 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:39:05.979626 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:39:05.989358 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:39:05.989358 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:39:05.990873 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:39:05.994916 [debug] [ThreadPool]: SQL status: OK in 0.004 seconds
[0m16:39:05.995927 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:39:05.997432 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:39:05.998444 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:39:05.998444 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:39:05.998444 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:39:05.999954 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:39:06.002091 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:39:06.002608 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:39:06.003616 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:39:06.004122 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:39:06.004812 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:39:06.009737 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:39:06.019536 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:39:06.020547 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:39:06.021056 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:39:06.021563 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:39:06.021563 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:39:06.022572 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:39:06.053744 [debug] [ThreadPool]: SQL status: OK in 0.031 seconds
[0m16:39:06.056270 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:39:06.060274 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:39:06.061274 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:39:06.070319 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F0BCAB40>]}
[0m16:39:06.071322 [debug] [MainThread]: Using duckdb connection "master"
[0m16:39:06.071322 [debug] [MainThread]: On master: BEGIN
[0m16:39:06.071322 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:39:06.073850 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:39:06.073850 [debug] [MainThread]: On master: COMMIT
[0m16:39:06.075180 [debug] [MainThread]: Using duckdb connection "master"
[0m16:39:06.075180 [debug] [MainThread]: On master: COMMIT
[0m16:39:06.076192 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:39:06.077192 [debug] [MainThread]: On master: Close
[0m16:39:06.088231 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:39:06.089232 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:39:06.091247 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:39:06.091247 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:39:06.114059 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:06.117278 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:39:06.161809 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:06.164842 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:06.165436 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:39:06.165436 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:39:06.166449 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:06.167721 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:06.167721 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
    UNION ALL
    SELECT * FROM portfolio_fallback
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:39:06.539680 [debug] [Thread-1 (]: SQL status: OK in 0.370 seconds
[0m16:39:06.549252 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:06.549775 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:39:06.549775 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:06.552392 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:06.552920 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:39:06.556023 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:06.565788 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:06.567297 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:39:06.569746 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:06.573260 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:06.574272 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:39:06.575269 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:06.595489 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:39:06.596996 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:06.597589 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:39:06.609885 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:39:06.619989 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:39:06.619989 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:39:06.624129 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:06.627125 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:39:06.629652 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2EE42C320>]}
[0m16:39:06.631235 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.54s]
[0m16:39:06.631235 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:39:06.633240 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:39:06.634258 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:39:06.635844 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:39:06.637987 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:39:06.643015 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:39:06.645663 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:39:06.651900 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:39:06.653974 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:39:06.654659 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:39:06.655317 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:06.656494 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:06.657017 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:39:06.658736 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL

    UNION

    -- Fallback: localizações de instituições presentes apenas nas tabelas SCR
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources
    );
  
  
[0m16:39:06.717747 [debug] [Thread-1 (]: SQL status: OK in 0.059 seconds
[0m16:39:06.721578 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:39:06.722085 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:39:06.724018 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:06.726542 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:39:06.727559 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:39:06.729931 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:06.736082 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:39:06.736082 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:39:06.737603 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:06.741125 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:39:06.741125 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:39:06.742638 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:06.744185 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:39:06.744691 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:39:06.745760 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:39:06.753415 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:39:06.757219 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:39:06.757727 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:39:06.762713 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:06.766045 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:39:06.767055 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F136B200>]}
[0m16:39:06.768053 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.13s]
[0m16:39:06.769572 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:39:06.771088 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:39:06.771957 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m16:39:06.771957 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:39:06.772965 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:39:06.777939 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:06.779463 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:39:06.785614 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:06.789598 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:06.790869 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:39:06.790869 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:06.791876 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:06.792886 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:06.793393 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:39:06.812831 [debug] [Thread-1 (]: SQL status: OK in 0.019 seconds
[0m16:39:06.813950 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:06.814957 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:39:06.815564 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:06.819515 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:06.820445 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:39:06.822266 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:06.826318 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:06.826318 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:39:06.827826 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:06.830982 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:06.831722 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:39:06.833410 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:06.836439 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:39:06.837978 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:06.838484 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:39:06.851100 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:39:06.854542 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:39:06.855130 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:39:06.862584 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:39:06.865842 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:39:06.867589 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1253B90>]}
[0m16:39:06.868141 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.10s]
[0m16:39:06.869658 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:39:06.869658 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:39:06.870223 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:39:06.871239 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:39:06.872759 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:39:06.876778 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:06.881317 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:39:06.890142 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:06.892182 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:06.892690 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:39:06.892690 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:06.894282 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:06.894866 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:06.894866 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:39:07.523886 [debug] [Thread-1 (]: SQL status: OK in 0.628 seconds
[0m16:39:07.526885 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:07.527888 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:39:07.529500 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:07.532186 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:07.532709 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:39:07.534324 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:07.537572 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:07.537572 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:39:07.538581 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:07.543140 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:07.544151 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:39:07.545672 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:07.548174 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:39:07.548682 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:07.549203 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:39:07.783367 [debug] [Thread-1 (]: SQL status: OK in 0.234 seconds
[0m16:39:07.787343 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:39:07.787343 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:39:07.793414 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:39:07.795949 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:39:07.796952 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F285EEC4A0>]}
[0m16:39:07.798473 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.93s]
[0m16:39:07.800534 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:39:07.801635 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:39:07.802726 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m16:39:07.803779 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:39:07.804366 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:39:07.809157 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:39:07.811839 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:39:07.817613 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:39:07.818631 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:39:07.819633 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:39:07.820144 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:07.820144 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:07.821742 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:39:07.821742 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:39:08.084665 [debug] [Thread-1 (]: SQL status: OK in 0.262 seconds
[0m16:39:08.086605 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:39:08.087244 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_capital_prudencial'
  
[0m16:39:08.089392 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.092094 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:39:08.092613 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_capital_prudencial'
  
[0m16:39:08.094966 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.100009 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:39:08.101596 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial" rename to "fato_capital_prudencial__dbt_backup"
[0m16:39:08.103283 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.106330 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:39:08.107337 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m16:39:08.112078 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.113597 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:39:08.115108 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:39:08.115711 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:39:08.199368 [debug] [Thread-1 (]: SQL status: OK in 0.082 seconds
[0m16:39:08.204019 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:39:08.204554 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m16:39:08.213545 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:39:08.216215 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:39:08.216753 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1253DA0>]}
[0m16:39:08.217313 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.41s]
[0m16:39:08.217863 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:39:08.218884 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:39:08.219983 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m16:39:08.221623 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:39:08.221623 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:39:08.229446 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:39:08.231391 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:39:08.236147 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:39:08.237675 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:39:08.237675 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:39:08.238685 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:08.238685 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.238685 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:39:08.238685 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:39:08.313870 [debug] [Thread-1 (]: SQL status: OK in 0.073 seconds
[0m16:39:08.315449 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:39:08.315449 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_indexador'
  
[0m16:39:08.317814 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.319423 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:39:08.319933 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_indexador'
  
[0m16:39:08.320955 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.328991 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:39:08.328991 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador" rename to "fato_carteira_credito_indexador__dbt_backup"
[0m16:39:08.330362 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.333902 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:39:08.334903 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m16:39:08.335900 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:08.337929 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:39:08.337929 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:39:08.338928 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:39:08.398442 [debug] [Thread-1 (]: SQL status: OK in 0.059 seconds
[0m16:39:08.403368 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:39:08.403368 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m16:39:08.406379 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:08.408822 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:39:08.409924 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F0C49700>]}
[0m16:39:08.410922 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.19s]
[0m16:39:08.411924 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:39:08.411924 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:39:08.412925 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m16:39:08.413983 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:39:08.414987 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:39:08.424194 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:39:08.425192 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:39:08.429191 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:39:08.431713 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:39:08.432712 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:39:08.432712 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:08.432712 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.434075 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:39:08.435085 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:39:08.507232 [debug] [Thread-1 (]: SQL status: OK in 0.071 seconds
[0m16:39:08.508819 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:39:08.508819 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:39:08.510343 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.511742 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:39:08.511742 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:39:08.513268 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.517457 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:39:08.517970 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais" rename to "fato_carteira_credito_totais__dbt_backup"
[0m16:39:08.518993 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:08.525319 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:39:08.526297 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:39:08.527809 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.529181 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:39:08.530196 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:39:08.531192 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:39:08.749284 [debug] [Thread-1 (]: SQL status: OK in 0.218 seconds
[0m16:39:08.753538 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:39:08.754154 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:39:08.760977 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:39:08.762594 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:39:08.763674 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F133AF90>]}
[0m16:39:08.764780 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.35s]
[0m16:39:08.765866 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:39:08.765866 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:39:08.765866 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:39:08.767415 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:39:08.767415 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:39:08.771501 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:08.774061 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:39:08.779720 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:08.782397 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:08.783590 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:39:08.783590 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:08.784653 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:08.784653 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:08.785192 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:39:09.367776 [debug] [Thread-1 (]: SQL status: OK in 0.583 seconds
[0m16:39:09.370279 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:09.370279 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:39:09.373029 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:09.374695 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:09.375743 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:39:09.376753 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:09.379631 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:09.381403 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado" rename to "fato_demonstracao_resultado__dbt_backup"
[0m16:39:09.383077 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:09.389262 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:09.389790 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:39:09.390850 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:09.392946 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:39:09.394542 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:09.395683 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:39:09.579497 [debug] [Thread-1 (]: SQL status: OK in 0.183 seconds
[0m16:39:09.585039 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:39:09.585039 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:39:09.590727 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:39:09.592769 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:39:09.592769 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F12A3A40>]}
[0m16:39:09.594364 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.83s]
[0m16:39:09.595624 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:39:09.596161 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:39:09.597216 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m16:39:09.598306 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:39:09.598846 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:39:09.601432 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:39:09.603565 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:39:09.608508 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:39:09.610022 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:39:09.610022 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:39:09.610022 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:09.611613 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:09.611613 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:39:09.612338 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:39:09.617602 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:39:09.619696 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:39:09.620269 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:39:09.620960 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:09.621484 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:39:09.621484 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:39:09.623567 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:09.626580 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:39:09.628096 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:39:09.631024 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:09.635548 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:39:09.636775 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:39:09.637871 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:09.639460 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:39:09.640467 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:39:09.640467 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:39:09.648301 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:39:09.649823 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:39:09.651435 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:39:09.654769 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:09.657346 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:39:09.657346 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F285F371A0>]}
[0m16:39:09.658557 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.06s]
[0m16:39:09.658557 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:39:09.660077 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:39:09.660077 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:39:09.661704 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:39:09.661704 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:39:09.667985 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:39:09.669087 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:39:09.673996 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:39:09.676188 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:39:09.676700 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:39:09.676700 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:09.677707 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:09.679297 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:39:09.680308 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:39:09.717327 [debug] [Thread-1 (]: SQL status: OK in 0.037 seconds
[0m16:39:09.718972 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:39:09.718972 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:39:09.720168 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:09.721777 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:39:09.722387 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:39:09.722923 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:09.726935 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:39:09.726935 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:39:09.728455 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:09.731188 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:39:09.731188 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:39:09.731188 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:09.734264 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:39:09.734888 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:39:09.735899 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:39:09.748208 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:39:09.750231 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:39:09.751229 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:39:09.755459 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:09.756531 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:39:09.757064 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1252450>]}
[0m16:39:09.757618 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.10s]
[0m16:39:09.758761 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:39:09.758761 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:39:09.758761 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:39:09.760278 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:39:09.760278 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:39:09.765453 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:09.767495 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:39:09.773635 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:09.774723 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:09.775266 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:39:09.775266 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:09.776347 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:09.776876 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:09.776876 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:39:10.145194 [debug] [Thread-1 (]: SQL status: OK in 0.367 seconds
[0m16:39:10.146723 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:10.147332 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:39:10.147871 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.149389 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:10.149389 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:39:10.150973 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.155194 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:10.156721 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:39:10.173327 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:39:10.184480 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:10.185138 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:39:10.186781 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.189427 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:39:10.189427 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:10.190426 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:39:10.565136 [debug] [Thread-1 (]: SQL status: OK in 0.374 seconds
[0m16:39:10.569182 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:39:10.570234 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:39:10.574399 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:10.576620 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:39:10.577764 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1252510>]}
[0m16:39:10.579314 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.82s]
[0m16:39:10.581690 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:39:10.582864 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:39:10.584882 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m16:39:10.586328 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m16:39:10.587343 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:39:10.587854 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:39:10.645411 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:39:10.645888 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:39:10.646398 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:10.647411 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.648413 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:39:10.648876 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */
truncate table "gold_warehouse"."main"."seed_dim_atividade"
[0m16:39:10.651542 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:10.669404 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:39:10.670413 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:39:10.685043 [debug] [Thread-1 (]: SQL status: OK in 0.014 seconds
[0m16:39:10.690848 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:39:10.692930 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:39:10.694533 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:39:10.694533 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:39:10.697645 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:10.699204 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:39:10.699204 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1353F50>]}
[0m16:39:10.700213 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.11s]
[0m16:39:10.701215 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:39:10.701215 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:39:10.701957 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m16:39:10.702539 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m16:39:10.703139 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:39:10.703659 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:39:10.708583 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:39:10.708583 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m16:39:10.708583 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:10.710119 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.710119 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:39:10.710119 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */
truncate table "gold_warehouse"."main"."seed_dim_classe_instituicao"
[0m16:39:10.711710 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:10.712717 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:39:10.712717 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:39:10.715399 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:10.715399 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:39:10.717471 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:39:10.717471 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:39:10.717471 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:39:10.721287 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:10.722925 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m16:39:10.722925 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1351730>]}
[0m16:39:10.723934 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.02s]
[0m16:39:10.724937 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:39:10.724937 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:39:10.725938 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m16:39:10.725938 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m16:39:10.726937 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:39:10.726937 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:39:10.732667 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:39:10.732667 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m16:39:10.732667 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:10.732667 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:10.732667 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:39:10.734251 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */
truncate table "gold_warehouse"."main"."seed_dim_consolidado"
[0m16:39:10.734867 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:10.735900 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:39:10.735900 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:39:10.736967 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.738478 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:39:10.739994 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:39:10.739994 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:39:10.741009 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:39:10.744278 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:10.745885 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m16:39:10.746886 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F285F58770>]}
[0m16:39:10.746886 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.02s]
[0m16:39:10.750101 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:39:10.750610 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:39:10.751137 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m16:39:10.752339 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m16:39:10.752339 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:39:10.752871 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:39:10.757579 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:39:10.758587 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m16:39:10.758587 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:10.760096 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.760096 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:39:10.760096 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */
truncate table "gold_warehouse"."main"."seed_dim_controle"
[0m16:39:10.760096 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:10.762687 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:39:10.762687 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:39:10.764742 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:10.765356 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:39:10.766522 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:39:10.767549 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:39:10.768057 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:39:10.770195 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:10.771220 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m16:39:10.771220 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1366720>]}
[0m16:39:10.771220 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.02s]
[0m16:39:10.772786 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:39:10.772786 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:39:10.773795 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m16:39:10.774797 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:39:10.774797 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:39:10.774797 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:39:10.781480 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:39:10.782503 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:39:10.783013 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:10.783013 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.783950 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:39:10.783950 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */
truncate table "gold_warehouse"."main"."seed_dim_faixa_vencimento"
[0m16:39:10.784962 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:10.785963 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:39:10.785963 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:39:10.788315 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:10.789827 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:39:10.791842 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:39:10.791842 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:39:10.792914 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:39:10.795514 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:10.797655 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:39:10.798665 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F13552E0>]}
[0m16:39:10.798665 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.02s]
[0m16:39:10.799689 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:39:10.799689 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:39:10.799689 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m16:39:10.801264 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:39:10.801264 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:39:10.801264 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:39:10.806252 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:39:10.806252 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:39:10.806252 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:10.807310 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:10.807310 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:39:10.807310 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */
truncate table "gold_warehouse"."main"."seed_dim_porte"
[0m16:39:10.808904 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:10.809913 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:39:10.810422 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:39:10.812522 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:10.813179 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:39:10.815190 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:39:10.815190 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:39:10.815190 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:39:10.819739 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:10.820273 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:39:10.820273 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F135AF90>]}
[0m16:39:10.821282 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.02s]
[0m16:39:10.821282 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:39:10.822484 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:39:10.823001 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m16:39:10.823524 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:39:10.824135 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:39:10.825144 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:39:10.831260 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:39:10.832796 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:39:10.832796 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:10.833812 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.833812 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:39:10.833812 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */
truncate table "gold_warehouse"."main"."seed_dim_produto_credito"
[0m16:39:10.834928 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:10.835926 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:39:10.836991 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:39:10.839000 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:10.839999 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:39:10.842073 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:39:10.842594 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:39:10.842594 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:39:10.848391 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:39:10.849415 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:39:10.849415 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1359550>]}
[0m16:39:10.849415 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.03s]
[0m16:39:10.850993 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:39:10.850993 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:39:10.852227 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m16:39:10.853895 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:39:10.854467 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:39:10.855116 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:39:10.866226 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:39:10.867679 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:39:10.868865 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:10.869376 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:10.870911 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:39:10.871625 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */
truncate table "gold_warehouse"."main"."seed_dim_regiao"
[0m16:39:10.873686 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.875696 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:39:10.877711 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:39:10.881741 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:10.883899 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:39:10.890296 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:39:10.891309 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:39:10.891819 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:39:10.898873 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:39:10.900403 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:39:10.900912 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F135BC20>]}
[0m16:39:10.901926 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.05s]
[0m16:39:10.904424 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:39:10.905373 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:39:10.906254 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m16:39:10.907267 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:39:10.907776 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:39:10.909312 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:39:10.918942 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:39:10.919508 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:39:10.920057 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:10.920057 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.921604 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:39:10.921604 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */
truncate table "gold_warehouse"."main"."seed_dim_risco"
[0m16:39:10.923456 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.925624 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:39:10.926580 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:39:10.930072 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:10.931581 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:39:10.934283 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:39:10.934283 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:39:10.935872 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:39:10.940954 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:10.941954 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:39:10.943075 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1353DA0>]}
[0m16:39:10.944594 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.04s]
[0m16:39:10.945606 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:39:10.946648 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:39:10.947157 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m16:39:10.949174 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m16:39:10.949685 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:39:10.950702 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:39:10.960141 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:39:10.961151 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m16:39:10.961151 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:10.962660 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.963674 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:39:10.963674 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */
truncate table "gold_warehouse"."main"."seed_dim_segmento"
[0m16:39:10.965185 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:10.966795 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:39:10.966795 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:39:10.970162 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:10.970795 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:39:10.973857 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:39:10.974861 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:39:10.974861 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:39:10.979470 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:10.981036 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m16:39:10.981036 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F13682C0>]}
[0m16:39:10.981036 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.03s]
[0m16:39:10.982862 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:39:10.984386 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:39:10.984386 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m16:39:10.985913 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m16:39:10.986924 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:39:10.995662 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:39:10.997180 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:39:11.104887 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:39:11.105975 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:39:11.105975 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m16:39:11.106994 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.107503 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.107503 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:39:11.107503 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.109633 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.113839 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m16:39:11.115459 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m16:39:11.116472 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m16:39:11.117533 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.13s]
[0m16:39:11.117533 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:39:11.119096 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:39:11.119753 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m16:39:11.120330 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m16:39:11.120330 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:39:11.127470 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:39:11.129112 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:39:11.131803 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:39:11.132871 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:39:11.132871 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m16:39:11.132871 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.134415 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.134415 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:39:11.134415 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.134415 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.137144 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m16:39:11.138198 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m16:39:11.138198 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m16:39:11.139197 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m16:39:11.140715 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:39:11.140715 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:39:11.140715 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m16:39:11.142246 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m16:39:11.142770 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:39:11.149994 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:39:11.151640 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:39:11.154224 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:39:11.156784 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:39:11.157308 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m16:39:11.158323 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.158323 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.159832 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:39:11.159832 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:39:11.163687 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:11.165691 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m16:39:11.167207 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m16:39:11.167207 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m16:39:11.168216 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.03s]
[0m16:39:11.169220 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:39:11.169220 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:39:11.170287 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m16:39:11.171656 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m16:39:11.172853 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:39:11.178066 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:39:11.181320 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:39:11.183878 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:39:11.187320 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:39:11.187320 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m16:39:11.188820 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.189831 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.189831 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:39:11.190845 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.192915 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.194542 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m16:39:11.197066 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m16:39:11.197573 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m16:39:11.198583 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.03s]
[0m16:39:11.199588 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:39:11.200097 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:39:11.201703 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m16:39:11.202902 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m16:39:11.203451 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:39:11.210412 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:39:11.213041 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:39:11.215397 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:39:11.217520 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:39:11.220315 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m16:39:11.221838 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.222879 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.222879 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:39:11.223892 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.237610 [debug] [Thread-1 (]: SQL status: OK in 0.013 seconds
[0m16:39:11.240315 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m16:39:11.242548 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m16:39:11.243646 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m16:39:11.244758 [error] [Thread-1 (]: 26 of 97 FAIL 2 relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[31mFAIL 2[0m in 0.04s]
[0m16:39:11.245305 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:39:11.246318 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:39:11.247828 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42' to be skipped because of status 'fail'.  Reason: Got 2 results, configured to fail if != 0.
[0m16:39:11.247828 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m16:39:11.249999 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m16:39:11.251016 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:39:11.260330 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:39:11.263090 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:39:11.269146 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:39:11.271484 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:39:11.272014 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m16:39:11.272524 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.273061 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.274075 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:39:11.274075 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:39:11.277075 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:11.279891 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m16:39:11.281416 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m16:39:11.282956 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m16:39:11.284491 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.03s]
[0m16:39:11.286005 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:39:11.286551 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:39:11.287078 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m16:39:11.289090 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m16:39:11.290606 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:39:11.298606 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:39:11.299607 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:39:11.304389 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:39:11.306021 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:39:11.307551 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m16:39:11.308564 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.310076 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:11.310076 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:39:11.310076 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.313691 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.316572 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m16:39:11.317646 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m16:39:11.319272 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m16:39:11.320288 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.03s]
[0m16:39:11.321342 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:39:11.321342 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:39:11.321342 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m16:39:11.322932 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m16:39:11.322932 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:39:11.327561 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:39:11.328094 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:39:11.331305 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:39:11.332833 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:39:11.332833 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m16:39:11.333845 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.334360 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.334360 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:39:11.334360 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:39:11.336894 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:11.339227 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m16:39:11.340722 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m16:39:11.341266 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m16:39:11.342342 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.02s]
[0m16:39:11.343615 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:39:11.344156 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:39:11.344697 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m16:39:11.345799 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m16:39:11.346342 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:39:11.349517 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:39:11.351173 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:39:11.353885 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:39:11.355063 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:39:11.356582 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m16:39:11.357089 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.357667 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.358299 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:39:11.359311 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.360322 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.361986 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m16:39:11.362885 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m16:39:11.363898 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m16:39:11.363898 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:39:11.365404 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:39:11.365404 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:39:11.366414 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m16:39:11.366414 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m16:39:11.367474 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:39:11.370288 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:39:11.371823 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:39:11.375539 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:39:11.376546 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:39:11.376546 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m16:39:11.378064 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.378064 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.378064 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:39:11.379676 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.381259 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.382799 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m16:39:11.382799 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m16:39:11.382799 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m16:39:11.384434 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:39:11.384434 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:39:11.384434 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:39:11.384434 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:39:11.386015 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m16:39:11.386015 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:39:11.397095 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:39:11.398715 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:39:11.400886 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:39:11.402058 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:39:11.403073 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m16:39:11.403581 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.404734 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.405293 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:39:11.405293 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.409969 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:11.411578 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m16:39:11.412617 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m16:39:11.412617 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m16:39:11.413631 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:39:11.414631 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:39:11.414631 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:39:11.414631 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:39:11.416388 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m16:39:11.416388 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:39:11.420670 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:39:11.421204 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:39:11.424035 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:39:11.425042 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:39:11.426045 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m16:39:11.426045 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.427038 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.427038 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:39:11.427038 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.434688 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:39:11.436730 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m16:39:11.437851 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m16:39:11.437851 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m16:39:11.438849 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:39:11.439854 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:39:11.439854 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:39:11.440362 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m16:39:11.441235 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m16:39:11.441747 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:39:11.447112 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:39:11.447655 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:39:11.450201 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:39:11.451876 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:39:11.452456 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m16:39:11.452456 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.453526 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.453526 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:39:11.454124 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.454686 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.456268 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m16:39:11.456268 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m16:39:11.457297 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m16:39:11.457824 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:39:11.457824 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:39:11.458821 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:39:11.458821 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m16:39:11.459822 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m16:39:11.459822 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:39:11.463657 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:39:11.464656 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:39:11.468149 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:39:11.469760 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:39:11.470331 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m16:39:11.470331 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.471344 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.471344 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:39:11.472507 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.473031 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.476079 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m16:39:11.478209 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m16:39:11.478799 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m16:39:11.479339 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:39:11.480408 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:39:11.480963 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:39:11.480963 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:39:11.481504 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m16:39:11.481504 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:39:11.485802 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:39:11.486820 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:39:11.489868 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:39:11.490922 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:39:11.491933 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m16:39:11.491933 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.493144 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.493144 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:39:11.494153 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.497728 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:11.499261 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m16:39:11.499261 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m16:39:11.500270 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m16:39:11.501268 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:39:11.501776 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:39:11.502335 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:39:11.502852 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:39:11.503388 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m16:39:11.504454 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:39:11.511036 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:39:11.511574 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:39:11.514955 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:39:11.515603 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:39:11.516616 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m16:39:11.516616 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.517208 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:11.517208 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:39:11.517208 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.522824 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:39:11.523835 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m16:39:11.524840 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m16:39:11.524840 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m16:39:11.525850 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:39:11.526851 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:39:11.526851 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:39:11.527850 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m16:39:11.527850 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m16:39:11.527850 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:39:11.533336 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:39:11.534416 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:39:11.535965 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:39:11.537343 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:39:11.538352 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m16:39:11.538352 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.538352 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.539861 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:39:11.539861 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.540874 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.542890 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m16:39:11.542890 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m16:39:11.544474 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m16:39:11.544474 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.02s]
[0m16:39:11.546199 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:39:11.546717 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:39:11.546717 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m16:39:11.547289 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m16:39:11.547289 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:39:11.550861 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:39:11.551964 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:39:11.553553 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:39:11.554703 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:39:11.554703 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m16:39:11.554703 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.556269 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.556269 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:39:11.556269 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.557303 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:11.558820 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m16:39:11.558820 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m16:39:11.559818 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m16:39:11.560348 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.01s]
[0m16:39:11.560348 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:39:11.560348 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:39:11.560348 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:39:11.561919 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m16:39:11.563444 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:39:11.567784 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:39:11.569397 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:39:11.571602 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:39:11.572620 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:39:11.572620 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m16:39:11.573189 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.573189 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:11.573189 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:39:11.574201 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.576200 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:11.578537 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m16:39:11.578537 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m16:39:11.579545 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m16:39:11.579545 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:39:11.581137 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:39:11.581137 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:39:11.582661 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:39:11.582661 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m16:39:11.582661 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:39:11.589071 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:39:11.591544 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:39:11.594586 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:39:11.595892 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:39:11.596888 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m16:39:11.597395 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.597395 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.597395 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:39:11.598807 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.603217 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:11.604802 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m16:39:11.605858 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m16:39:11.605858 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m16:39:11.605858 [info ] [Thread-1 (]: 41 of 97 PASS relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:39:11.607483 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:39:11.607483 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:39:11.607483 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m16:39:11.608491 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m16:39:11.609106 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:39:11.612456 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:39:11.613982 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:39:11.615587 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:39:11.617746 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:39:11.617746 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m16:39:11.617746 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.619339 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.619339 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:39:11.619339 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.620359 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:11.621575 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m16:39:11.622595 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m16:39:11.623353 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m16:39:11.623353 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.01s]
[0m16:39:11.624923 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:39:11.625937 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:39:11.625937 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m16:39:11.626935 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m16:39:11.626935 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:39:11.631117 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:39:11.631117 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:39:11.634519 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:39:11.635602 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:39:11.636133 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m16:39:11.636133 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.637214 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.637760 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:39:11.637760 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.638842 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.640967 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m16:39:11.642009 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m16:39:11.642551 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m16:39:11.643078 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.02s]
[0m16:39:11.643078 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:39:11.644097 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:39:11.644604 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:39:11.644604 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m16:39:11.645614 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:39:11.649676 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:39:11.651184 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:39:11.653345 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:39:11.654455 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:39:11.654455 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m16:39:11.655053 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.655053 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:11.655053 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:39:11.656088 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.657687 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:11.658698 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m16:39:11.660204 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m16:39:11.660204 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m16:39:11.660204 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:39:11.661804 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:39:11.662472 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:39:11.662993 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:39:11.662993 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m16:39:11.664003 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:39:11.667680 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:39:11.669816 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:39:11.674072 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:39:11.675667 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:39:11.676200 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m16:39:11.676735 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.677268 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.677791 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:39:11.678330 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.682089 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:11.682619 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m16:39:11.684186 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m16:39:11.684186 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m16:39:11.685780 [info ] [Thread-1 (]: 45 of 97 PASS relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:39:11.687299 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:39:11.687299 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:39:11.687299 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m16:39:11.688307 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m16:39:11.688307 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:39:11.694689 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:39:11.696055 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:39:11.698077 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:39:11.699584 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:39:11.699584 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m16:39:11.699584 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.702306 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:11.702989 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:39:11.702989 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.704149 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.704725 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m16:39:11.706287 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m16:39:11.707297 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m16:39:11.707297 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.02s]
[0m16:39:11.708356 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:39:11.708356 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:39:11.708356 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m16:39:11.709866 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m16:39:11.710456 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:39:11.714616 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:39:11.716138 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:39:11.718330 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:39:11.719907 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:39:11.720447 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m16:39:11.720985 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.721507 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.721507 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:39:11.721507 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.723154 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.725163 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m16:39:11.725163 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m16:39:11.726164 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m16:39:11.727163 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:39:11.727163 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:39:11.728162 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:39:11.728162 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:39:11.728162 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m16:39:11.728162 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:39:11.733043 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:39:11.734183 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:39:11.736056 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:39:11.737105 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:39:11.738154 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m16:39:11.738154 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.739188 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:11.739188 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:39:11.739726 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.742777 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:11.744349 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m16:39:11.745356 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m16:39:11.745356 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m16:39:11.745356 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:39:11.746864 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:39:11.747464 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:39:11.748477 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:39:11.749472 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m16:39:11.750031 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:39:11.754918 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:39:11.756005 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:39:11.758135 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:39:11.759146 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:39:11.760142 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m16:39:11.760142 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.760142 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.760142 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:39:11.761784 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.769125 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:39:11.770295 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m16:39:11.771334 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m16:39:11.771334 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m16:39:11.771334 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:39:11.772431 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:39:11.772962 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:39:11.772962 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m16:39:11.773956 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m16:39:11.773956 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:39:11.778614 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:39:11.779620 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:39:11.782984 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:39:11.785041 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:39:11.785041 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m16:39:11.785041 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.786039 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.786547 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:39:11.786547 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.787054 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.788067 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m16:39:11.790067 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m16:39:11.790585 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m16:39:11.790585 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:39:11.792621 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:39:11.793143 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:39:11.793143 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m16:39:11.794695 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m16:39:11.795405 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:39:11.799740 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:39:11.801840 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:39:11.803517 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:39:11.804587 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:39:11.805179 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m16:39:11.805179 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.806190 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.806190 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:39:11.806190 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.807315 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.808321 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m16:39:11.809826 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m16:39:11.811024 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m16:39:11.811569 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:39:11.811569 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:39:11.811569 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:39:11.812985 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:39:11.812985 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m16:39:11.812985 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:39:11.817684 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:39:11.819251 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:39:11.821591 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:39:11.822642 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:39:11.823185 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m16:39:11.823706 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.824264 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.825437 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:39:11.825437 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.827058 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:11.828574 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m16:39:11.829581 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m16:39:11.829581 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m16:39:11.831146 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:39:11.831146 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:39:11.832679 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:39:11.832679 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:39:11.832679 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m16:39:11.834270 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:39:11.838393 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:39:11.838393 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:39:11.842073 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:39:11.843095 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:39:11.844156 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m16:39:11.844886 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.845900 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.845900 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:39:11.845900 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.848443 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:11.849447 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m16:39:11.851130 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m16:39:11.851956 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m16:39:11.852730 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:39:11.853740 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:39:11.854247 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:39:11.854247 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m16:39:11.855269 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m16:39:11.855785 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:39:11.860126 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:39:11.861168 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:39:11.863890 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:39:11.865538 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:39:11.866606 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m16:39:11.866606 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.867623 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.867623 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:39:11.867623 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.869227 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.870238 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m16:39:11.871286 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m16:39:11.871286 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m16:39:11.871286 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:39:11.873033 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:39:11.873572 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:39:11.873572 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m16:39:11.873572 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m16:39:11.875039 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:39:11.879576 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:39:11.881174 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:39:11.882713 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:39:11.884316 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:39:11.884316 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m16:39:11.884316 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.885894 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.885894 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:39:11.886902 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.888057 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.889072 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m16:39:11.890588 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m16:39:11.890588 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m16:39:11.890588 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:39:11.892097 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:39:11.892624 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:39:11.893145 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:39:11.893145 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m16:39:11.894156 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:39:11.900142 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:39:11.901917 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:39:11.905210 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:39:11.906298 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:39:11.907328 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m16:39:11.907328 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.908434 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.908434 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:39:11.908434 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.911543 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:11.912821 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m16:39:11.914832 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m16:39:11.915343 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m16:39:11.916626 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:39:11.917213 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:39:11.917213 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:39:11.917213 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:39:11.918219 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m16:39:11.918929 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:39:11.924293 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:39:11.925291 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:39:11.927823 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:39:11.927823 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:39:11.929452 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m16:39:11.929452 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.929452 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:11.929452 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:39:11.929452 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.934346 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:11.935869 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m16:39:11.936880 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m16:39:11.936880 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m16:39:11.937386 [info ] [Thread-1 (]: 57 of 97 PASS relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:39:11.938394 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:39:11.938394 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:39:11.938394 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m16:39:11.938394 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m16:39:11.939905 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:39:11.941946 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:39:11.943437 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:39:11.945973 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:39:11.946978 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:39:11.947487 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m16:39:11.947487 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.948505 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.948505 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:39:11.948505 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.950578 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.952300 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m16:39:11.952823 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m16:39:11.953340 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m16:39:11.953899 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.02s]
[0m16:39:11.954414 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:39:11.954955 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:39:11.955485 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m16:39:11.956555 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m16:39:11.957088 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:39:11.961362 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:39:11.962411 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:39:11.966242 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:39:11.967342 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:39:11.967342 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m16:39:11.967342 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.967342 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.968911 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:39:11.969511 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.970106 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.972695 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m16:39:11.973762 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m16:39:11.973762 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m16:39:11.974764 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.02s]
[0m16:39:11.975773 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:39:11.975773 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:39:11.976794 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:39:11.976794 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m16:39:11.977755 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:39:11.981613 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:39:11.982629 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:39:11.984227 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:39:11.986804 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:39:11.987954 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m16:39:11.987954 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:11.988952 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:11.988952 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:39:11.988952 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:11.993052 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:11.995189 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m16:39:11.996257 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m16:39:11.996971 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m16:39:11.998048 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:39:11.999143 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:39:11.999699 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:39:12.001251 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:39:12.001830 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m16:39:12.001830 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:39:12.006294 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:39:12.007414 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:39:12.009958 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:39:12.010564 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:39:12.012091 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m16:39:12.012649 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:12.013233 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:12.013233 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:39:12.013233 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:12.021300 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:39:12.022837 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m16:39:12.023848 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m16:39:12.024820 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m16:39:12.025881 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:39:12.027665 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:39:12.028185 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:39:12.028720 [info ] [Thread-1 (]: 62 of 97 START sql table model main.dim_atividade .............................. [RUN]
[0m16:39:12.030063 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m16:39:12.030611 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:39:12.033863 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:39:12.035311 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:39:12.038880 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:39:12.039879 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:39:12.039879 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:39:12.041061 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:12.042059 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:12.042567 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:39:12.043094 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:39:12.044102 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:12.045714 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:39:12.045714 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:39:12.047222 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:12.049234 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:39:12.049234 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:39:12.050371 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:12.053014 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:39:12.054094 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade" rename to "dim_atividade__dbt_backup"
[0m16:39:12.055260 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:12.058829 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:39:12.058829 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:39:12.060338 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:12.061943 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:39:12.061943 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:39:12.061943 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:39:12.074724 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:39:12.079635 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:39:12.079635 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:39:12.082768 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:12.084381 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:39:12.084381 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F137C080>]}
[0m16:39:12.084381 [info ] [Thread-1 (]: 62 of 97 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.06s]
[0m16:39:12.085963 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:39:12.085963 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:39:12.086993 [info ] [Thread-1 (]: 63 of 97 START sql table model main.dim_classe_instituicao ..................... [RUN]
[0m16:39:12.086993 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:39:12.086993 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:39:12.090112 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:39:12.091288 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:39:12.092804 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:39:12.095392 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:39:12.095392 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:39:12.095392 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:12.096903 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:12.097508 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:39:12.097508 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:39:12.098522 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:12.099524 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:39:12.099524 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:39:12.099524 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:12.101780 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:39:12.101780 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:39:12.102888 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:12.106805 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:39:12.106805 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao" rename to "dim_classe_instituicao__dbt_backup"
[0m16:39:12.107861 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:12.110509 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:39:12.111050 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:39:12.111598 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:12.113169 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:39:12.113697 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:39:12.113697 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:39:12.116261 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:12.119155 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:39:12.119763 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:39:12.123438 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:12.125451 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:39:12.125451 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1251B80>]}
[0m16:39:12.995986 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:39:12.999615 [info ] [Thread-1 (]: 63 of 97 OK created sql table model main.dim_classe_instituicao ................ [[32mOK[0m in 0.04s]
[0m16:39:12.999615 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:39:13.001235 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:39:13.001810 [info ] [Thread-1 (]: 64 of 97 START sql table model main.dim_consolidado ............................ [RUN]
[0m16:39:13.002406 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:39:13.003006 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:39:13.006220 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:39:13.007804 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:39:13.011461 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:39:13.011461 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:39:13.012990 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:39:13.012990 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.014005 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.014005 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:39:13.014005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:39:13.015610 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.016619 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:39:13.017212 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:39:13.018226 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.020031 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:39:13.020584 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:39:13.021662 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.024277 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:39:13.024801 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado" rename to "dim_consolidado__dbt_backup"
[0m16:39:13.025335 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.029456 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:39:13.029456 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:39:13.029456 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.031110 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:39:13.031110 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:39:13.031110 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:39:13.034205 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.036853 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:39:13.036853 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:39:13.040004 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.041138 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:39:13.042136 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F285F2C0B0>]}
[0m16:39:13.042644 [info ] [Thread-1 (]: 64 of 97 OK created sql table model main.dim_consolidado ....................... [[32mOK[0m in 0.04s]
[0m16:39:13.043192 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:39:13.044266 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:39:13.045346 [info ] [Thread-1 (]: 65 of 97 START sql table model main.dim_controle ............................... [RUN]
[0m16:39:13.046425 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:39:13.046964 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:39:13.050132 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:39:13.052388 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:39:13.055150 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:39:13.057269 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:39:13.058279 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:39:13.058279 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.059288 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.059288 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:39:13.060280 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:39:13.060280 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.061885 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:39:13.061885 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:39:13.062932 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.063940 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:39:13.063940 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:39:13.064940 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.067580 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:39:13.067580 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle" rename to "dim_controle__dbt_backup"
[0m16:39:13.067580 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.071608 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:39:13.072619 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:39:13.073231 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.074241 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:39:13.075242 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:39:13.075242 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:39:13.079407 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:13.082999 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:39:13.082999 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:39:13.085788 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.087386 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:39:13.087928 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F136B950>]}
[0m16:39:13.088458 [info ] [Thread-1 (]: 65 of 97 OK created sql table model main.dim_controle .......................... [[32mOK[0m in 0.04s]
[0m16:39:13.089005 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:39:13.089558 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:39:13.090087 [info ] [Thread-1 (]: 66 of 97 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m16:39:13.090616 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:39:13.090616 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:39:13.093158 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:13.095693 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:39:13.097762 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:13.099309 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:13.099309 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:39:13.100886 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.101493 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.101493 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:13.102058 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:39:13.102579 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.104095 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:13.104095 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:39:13.104687 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.104687 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:13.106318 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:39:13.107328 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.113692 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:13.114795 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m16:39:13.116444 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.119107 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:13.119623 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:39:13.120195 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.121287 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:39:13.121287 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:13.121287 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:39:13.123752 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.125763 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:39:13.126762 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:39:13.129497 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.131104 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:39:13.132638 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F285F97A70>]}
[0m16:39:13.132638 [info ] [Thread-1 (]: 66 of 97 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.04s]
[0m16:39:13.134242 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:39:13.134242 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:39:13.134242 [info ] [Thread-1 (]: 67 of 97 START sql table model main.dim_porte .................................. [RUN]
[0m16:39:13.135819 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m16:39:13.136828 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:39:13.139991 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:39:13.143324 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:39:13.147078 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:39:13.148150 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:39:13.148150 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:39:13.149134 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.149134 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.149134 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:39:13.150303 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:39:13.150817 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.151831 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:39:13.152340 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:39:13.152862 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.153910 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:39:13.154463 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:39:13.155077 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.158300 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:39:13.158300 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte" rename to "dim_porte__dbt_backup"
[0m16:39:13.160234 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.163066 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:39:13.163066 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:39:13.164085 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.165687 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:39:13.166248 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:39:13.166248 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:39:13.168051 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.170173 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:39:13.170697 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:39:13.172300 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.173405 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:39:13.174520 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1253320>]}
[0m16:39:13.174520 [info ] [Thread-1 (]: 67 of 97 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.04s]
[0m16:39:13.175518 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:39:13.175518 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:39:13.176517 [info ] [Thread-1 (]: 68 of 97 START sql table model main.dim_produto_credito ........................ [RUN]
[0m16:39:13.176517 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:39:13.177519 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:39:13.179581 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:13.181313 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:39:13.185595 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:13.187171 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:13.187171 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:39:13.187171 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.188823 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.188823 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:13.188823 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:39:13.189835 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.191889 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:13.191889 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:39:13.193020 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.195544 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:13.196182 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:39:13.197795 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.201875 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:13.202416 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m16:39:13.203490 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.206302 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:13.206302 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:39:13.207321 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.208484 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:39:13.208484 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:13.208484 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:39:13.210554 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.213633 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:39:13.213633 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:39:13.215799 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.216385 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:39:13.217414 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F285FFD580>]}
[0m16:39:13.217956 [info ] [Thread-1 (]: 68 of 97 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.04s]
[0m16:39:13.217956 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:39:13.218967 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:39:13.219563 [info ] [Thread-1 (]: 69 of 97 START sql table model main.dim_regiao ................................. [RUN]
[0m16:39:13.220646 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:39:13.220646 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:39:13.225231 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:39:13.226830 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:39:13.231667 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:39:13.232760 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:39:13.232760 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:39:13.233771 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.233771 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.234861 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:39:13.235481 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:39:13.236000 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.237589 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:39:13.238601 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:39:13.238601 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.240130 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:39:13.241181 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:39:13.242656 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.245841 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:39:13.245841 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao" rename to "dim_regiao__dbt_backup"
[0m16:39:13.246843 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.249359 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:39:13.249359 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:39:13.249359 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.252416 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:39:13.252936 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:39:13.252936 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:39:13.255141 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.257316 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:39:13.257843 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:39:13.260028 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.261103 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:39:13.261615 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1253620>]}
[0m16:39:13.262622 [info ] [Thread-1 (]: 69 of 97 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.04s]
[0m16:39:13.262622 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:39:13.263868 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:39:13.264873 [info ] [Thread-1 (]: 70 of 97 START sql table model main.dim_risco .................................. [RUN]
[0m16:39:13.265539 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:39:13.267061 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:39:13.271409 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:39:13.271409 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:39:13.275365 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:39:13.277853 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:39:13.277853 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:39:13.277853 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.277853 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.279449 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:39:13.279449 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:39:13.279449 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.280994 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:39:13.280994 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:39:13.283243 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.284315 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:39:13.284315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:39:13.285857 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.289114 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:39:13.289114 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco" rename to "dim_risco__dbt_backup"
[0m16:39:13.290116 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.294289 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:39:13.294857 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:39:13.295867 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.297909 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:39:13.298547 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:39:13.299085 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:39:13.301722 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.304552 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:39:13.305156 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:39:13.308240 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:13.309239 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:39:13.310262 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F285F01040>]}
[0m16:39:13.310262 [info ] [Thread-1 (]: 70 of 97 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.04s]
[0m16:39:13.310262 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:39:13.311856 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:39:13.311856 [info ] [Thread-1 (]: 71 of 97 START sql table model main.dim_segmento ............................... [RUN]
[0m16:39:13.311856 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:39:13.313143 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:39:13.316794 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:39:13.317432 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:39:13.320212 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:39:13.321218 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:39:13.321218 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:39:13.321218 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.322492 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.323023 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:39:13.323023 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:39:13.324030 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.325031 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:39:13.325031 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:39:13.326032 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.327030 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:39:13.327030 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:39:13.329596 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.333977 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:39:13.333977 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento" rename to "dim_segmento__dbt_backup"
[0m16:39:13.333977 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.337454 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:39:13.337963 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:39:13.338516 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.340108 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:39:13.340108 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:39:13.340647 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:39:13.343304 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:13.347669 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:39:13.347669 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:39:13.351238 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:13.352327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:39:13.352849 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F285F715E0>]}
[0m16:39:13.353371 [info ] [Thread-1 (]: 71 of 97 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.04s]
[0m16:39:13.353938 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:39:13.354543 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:39:13.355129 [info ] [Thread-1 (]: 72 of 97 START test not_null_dim_classe_instituicao_id_classe .................. [RUN]
[0m16:39:13.355129 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m16:39:13.356148 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:39:13.359213 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:39:13.360719 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:39:13.364192 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:39:13.365812 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:39:13.366977 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m16:39:13.367519 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.368597 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.369141 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:39:13.369685 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m16:39:13.370257 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.371372 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m16:39:13.371372 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m16:39:13.372902 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m16:39:13.373911 [info ] [Thread-1 (]: 72 of 97 PASS not_null_dim_classe_instituicao_id_classe ........................ [[32mPASS[0m in 0.02s]
[0m16:39:13.374911 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:39:13.375946 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:39:13.376618 [info ] [Thread-1 (]: 73 of 97 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m16:39:13.377910 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m16:39:13.377910 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:39:13.382633 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:39:13.384211 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:39:13.387291 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:39:13.388307 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:39:13.388307 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m16:39:13.388307 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.389815 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.389815 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:39:13.389815 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:13.390882 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.393150 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m16:39:13.394675 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m16:39:13.394675 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m16:39:13.395713 [info ] [Thread-1 (]: 73 of 97 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:39:13.396685 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:39:13.397288 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:39:13.397288 [info ] [Thread-1 (]: 74 of 97 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m16:39:13.398301 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m16:39:13.398301 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:39:13.402875 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:39:13.403942 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:39:13.407161 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:39:13.407790 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:39:13.408798 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m16:39:13.408798 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.408798 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.408798 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:39:13.410307 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:39:13.411828 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.412986 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m16:39:13.413998 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m16:39:13.415005 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m16:39:13.415515 [info ] [Thread-1 (]: 74 of 97 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.02s]
[0m16:39:13.416526 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:39:13.416526 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:39:13.417586 [info ] [Thread-1 (]: 75 of 97 START test not_null_dim_consolidado_id_consolidado .................... [RUN]
[0m16:39:13.417586 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m16:39:13.417586 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:39:13.421456 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:39:13.423907 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:39:13.427010 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:39:13.430312 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:39:13.430905 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m16:39:13.430905 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.431429 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.431973 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:39:13.432507 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m16:39:13.433030 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.434735 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m16:39:13.436076 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m16:39:13.436076 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m16:39:13.437089 [info ] [Thread-1 (]: 75 of 97 PASS not_null_dim_consolidado_id_consolidado .......................... [[32mPASS[0m in 0.02s]
[0m16:39:13.438134 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:39:13.438134 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:39:13.438752 [info ] [Thread-1 (]: 76 of 97 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m16:39:13.439772 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m16:39:13.439772 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:39:13.445517 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:39:13.447022 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:39:13.449549 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:39:13.451144 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:39:13.451144 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m16:39:13.451735 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.452355 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.452876 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:39:13.453991 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:13.455604 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.457148 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m16:39:13.457661 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m16:39:13.457661 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m16:39:13.458674 [info ] [Thread-1 (]: 76 of 97 PASS relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[32mPASS[0m in 0.02s]
[0m16:39:13.458674 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:39:13.460189 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:39:13.460189 [info ] [Thread-1 (]: 77 of 97 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m16:39:13.460189 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m16:39:13.460189 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:39:13.466581 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:39:13.467624 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:39:13.470958 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:39:13.472031 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:39:13.472961 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m16:39:13.472961 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.473514 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.474044 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:39:13.474044 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:39:13.475634 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.478151 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m16:39:13.478151 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m16:39:13.478151 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m16:39:13.479761 [info ] [Thread-1 (]: 77 of 97 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.02s]
[0m16:39:13.479761 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:39:13.479761 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:39:13.481326 [info ] [Thread-1 (]: 78 of 97 START test not_null_dim_controle_id_controle .......................... [RUN]
[0m16:39:13.481326 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m16:39:13.482418 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:39:13.485710 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:39:13.486786 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:39:13.488359 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:39:13.489871 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:39:13.489871 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m16:39:13.490881 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.490881 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.491883 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:39:13.492908 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m16:39:13.492908 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.495579 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m16:39:13.496590 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m16:39:13.497175 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m16:39:13.497692 [info ] [Thread-1 (]: 78 of 97 PASS not_null_dim_controle_id_controle ................................ [[32mPASS[0m in 0.02s]
[0m16:39:13.498772 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:39:13.499311 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:39:13.499844 [info ] [Thread-1 (]: 79 of 97 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m16:39:13.500377 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m16:39:13.500994 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:39:13.504677 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:39:13.504677 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:39:13.507232 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:39:13.508377 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:39:13.508377 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m16:39:13.508377 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.509885 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.509885 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:39:13.510470 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:13.511697 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.513758 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m16:39:13.514757 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m16:39:13.515323 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m16:39:13.515323 [info ] [Thread-1 (]: 79 of 97 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.01s]
[0m16:39:13.516334 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:39:13.516851 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:39:13.517391 [info ] [Thread-1 (]: 80 of 97 START test unique_dim_controle_id_controle ............................ [RUN]
[0m16:39:13.517391 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m16:39:13.517391 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:39:13.522772 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:39:13.523781 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:39:13.528767 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:39:13.529843 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:39:13.530390 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m16:39:13.530390 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.531914 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.531914 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:39:13.531914 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:39:13.534024 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.535641 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m16:39:13.535641 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m16:39:13.536684 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m16:39:13.536684 [info ] [Thread-1 (]: 80 of 97 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.02s]
[0m16:39:13.537723 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:39:13.537723 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:39:13.538723 [info ] [Thread-1 (]: 81 of 97 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:39:13.538723 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:39:13.539723 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:39:13.545494 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:39:13.545494 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:39:13.550883 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:39:13.552477 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:39:13.552477 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:39:13.553016 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.553538 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.554123 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:39:13.554123 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:39:13.602870 [debug] [Thread-1 (]: SQL status: OK in 0.048 seconds
[0m16:39:13.603994 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:39:13.604543 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m16:39:13.605079 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.606110 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:39:13.606110 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m16:39:13.607225 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.610432 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:39:13.610962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade" rename to "fato_carteira_credito_atividade__dbt_backup"
[0m16:39:13.612004 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.614041 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:39:13.614041 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:39:13.615655 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.618187 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:39:13.619187 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:39:13.619187 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:39:13.623815 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:13.627058 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:39:13.627058 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:39:13.631268 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:13.632833 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:39:13.632833 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F136BFB0>]}
[0m16:39:13.633848 [info ] [Thread-1 (]: 81 of 97 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 0.09s]
[0m16:39:13.633848 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:39:13.635176 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:39:13.635684 [info ] [Thread-1 (]: 82 of 97 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:39:13.635684 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:39:13.636695 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:39:13.641045 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:39:13.643959 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:39:13.648520 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:39:13.649570 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:39:13.649570 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:39:13.649570 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.651107 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.651688 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:39:13.652255 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:39:13.827946 [debug] [Thread-1 (]: SQL status: OK in 0.175 seconds
[0m16:39:13.828467 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:39:13.829480 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m16:39:13.829480 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.831254 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:39:13.831254 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m16:39:13.831254 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.834844 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:39:13.834844 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte" rename to "fato_carteira_credito_porte__dbt_backup"
[0m16:39:13.834844 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.839013 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:39:13.839013 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:39:13.840015 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.840015 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:39:13.841388 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:39:13.841388 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:39:13.857729 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:39:13.860268 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:39:13.860268 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:39:13.865325 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:13.866339 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:39:13.867401 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F286045970>]}
[0m16:39:13.867401 [info ] [Thread-1 (]: 82 of 97 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.23s]
[0m16:39:13.867401 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:39:13.869003 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:39:13.869003 [info ] [Thread-1 (]: 83 of 97 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:39:13.869588 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:39:13.870185 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:39:13.874358 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:13.875356 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:39:13.877876 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:13.879458 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:13.881055 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:39:13.881055 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:13.882582 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.882582 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:13.883130 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:39:13.971443 [debug] [Thread-1 (]: SQL status: OK in 0.088 seconds
[0m16:39:13.973575 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:13.974630 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:39:13.975691 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.976236 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:13.976236 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:39:13.977276 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.979901 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:13.980922 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto" rename to "fato_carteira_credito_produto__dbt_backup"
[0m16:39:13.981428 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.982986 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:13.984008 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:39:13.985057 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:13.986566 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:39:13.987097 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:13.987630 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:39:13.989239 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:13.991331 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:39:13.991331 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:39:13.992847 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:13.995199 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:39:13.995199 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2F1252360>]}
[0m16:39:13.995199 [info ] [Thread-1 (]: 83 of 97 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 0.13s]
[0m16:39:13.997435 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:39:13.998033 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:39:13.999556 [info ] [Thread-1 (]: 84 of 97 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:39:13.999556 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:39:13.999556 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:39:14.003420 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:39:14.004571 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:39:14.007364 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:39:14.009070 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:39:14.009070 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:39:14.010071 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:14.010071 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.012511 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:39:14.013047 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:39:14.529021 [debug] [Thread-1 (]: SQL status: OK in 0.515 seconds
[0m16:39:14.532020 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:39:14.533015 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:39:14.535577 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.538103 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:39:14.539117 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:39:14.540749 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.549517 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:39:14.549517 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito" rename to "fato_regiao_credito__dbt_backup"
[0m16:39:14.551303 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:14.555952 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:39:14.556950 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:39:14.557457 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.560448 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:39:14.561558 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:39:14.562575 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:39:14.604702 [debug] [Thread-1 (]: SQL status: OK in 0.043 seconds
[0m16:39:14.608418 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:39:14.608418 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:39:14.613197 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:14.615322 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:39:14.616333 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F28609BB90>]}
[0m16:39:14.617481 [info ] [Thread-1 (]: 84 of 97 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.62s]
[0m16:39:14.617481 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:39:14.619122 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:39:14.619776 [info ] [Thread-1 (]: 85 of 97 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:39:14.620358 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:39:14.620358 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:39:14.626572 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:39:14.628081 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:39:14.633968 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:39:14.634497 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:39:14.636007 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:39:14.636007 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:14.637531 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:14.638041 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:39:14.639066 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:39:15.058996 [debug] [Thread-1 (]: SQL status: OK in 0.419 seconds
[0m16:39:15.060016 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:39:15.060016 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:39:15.061660 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:15.062693 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:39:15.062693 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:39:15.063765 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.066399 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:39:15.067488 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito" rename to "fato_risco_credito__dbt_backup"
[0m16:39:15.067488 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:15.070206 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:39:15.070206 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:39:15.071225 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:15.071225 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:39:15.071225 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:39:15.072789 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:39:15.201713 [debug] [Thread-1 (]: SQL status: OK in 0.128 seconds
[0m16:39:15.204450 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:39:15.204993 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:39:15.213852 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:39:15.215475 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:39:15.215475 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '0d3867e6-6e91-4ada-beeb-7b8bdcd9a6fb', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F285EFAB40>]}
[0m16:39:15.216483 [info ] [Thread-1 (]: 85 of 97 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.60s]
[0m16:39:15.217555 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:39:15.217555 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:39:15.217555 [info ] [Thread-1 (]: 86 of 97 START test not_null_dim_segmento_id_segmento .......................... [RUN]
[0m16:39:15.219702 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m16:39:15.220273 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:39:15.225527 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:39:15.226611 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:39:15.232826 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:39:15.233838 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:39:15.235287 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m16:39:15.235801 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:15.235801 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.236827 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:39:15.236827 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m16:39:15.238050 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.240049 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m16:39:15.241099 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m16:39:15.242153 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m16:39:15.242680 [info ] [Thread-1 (]: 86 of 97 PASS not_null_dim_segmento_id_segmento ................................ [[32mPASS[0m in 0.02s]
[0m16:39:15.243221 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:39:15.243754 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:39:15.244287 [info ] [Thread-1 (]: 87 of 97 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m16:39:15.245494 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m16:39:15.246038 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:39:15.252301 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:39:15.253337 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:39:15.256068 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:39:15.258297 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:39:15.258297 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m16:39:15.258297 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:15.259805 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.261102 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:39:15.262181 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:15.263745 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.265241 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m16:39:15.266250 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m16:39:15.267340 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m16:39:15.267846 [info ] [Thread-1 (]: 87 of 97 PASS relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[32mPASS[0m in 0.02s]
[0m16:39:15.268910 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:39:15.269454 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:39:15.270531 [info ] [Thread-1 (]: 88 of 97 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m16:39:15.271605 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m16:39:15.272135 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:39:15.276759 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:39:15.279279 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:39:15.281301 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:39:15.282821 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:39:15.282821 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m16:39:15.283832 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:15.284337 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.284337 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:39:15.284337 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:39:15.286860 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:15.289882 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m16:39:15.291492 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m16:39:15.291492 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m16:39:15.292013 [info ] [Thread-1 (]: 88 of 97 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.02s]
[0m16:39:15.293031 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:39:15.293031 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:39:15.294104 [info ] [Thread-1 (]: 89 of 97 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m16:39:15.294694 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m16:39:15.294694 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:39:15.301325 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:39:15.302958 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:39:15.305182 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:39:15.311896 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:39:15.311896 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m16:39:15.312911 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:15.313419 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.313925 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:39:15.314937 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:15.316452 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.317623 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m16:39:15.317623 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m16:39:15.319352 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m16:39:15.319352 [info ] [Thread-1 (]: 89 of 97 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m16:39:15.320376 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:39:15.320376 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:39:15.321655 [info ] [Thread-1 (]: 90 of 97 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m16:39:15.322248 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m16:39:15.322768 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:39:15.326535 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:39:15.328043 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:39:15.332293 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:39:15.334460 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:39:15.334460 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m16:39:15.335024 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:15.336136 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.336136 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:39:15.336702 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:15.337923 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.338933 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m16:39:15.339937 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m16:39:15.341047 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m16:39:15.341047 [info ] [Thread-1 (]: 90 of 97 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:39:15.342039 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:39:15.343319 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:39:15.343319 [info ] [Thread-1 (]: 91 of 97 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m16:39:15.344844 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m16:39:15.344844 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:39:15.349388 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:39:15.351598 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:39:15.354463 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:39:15.355553 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:39:15.356079 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m16:39:15.356079 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:15.357092 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:39:15.357601 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:39:15.357601 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:39:15.358609 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.360120 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m16:39:15.360120 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m16:39:15.361722 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m16:39:15.361722 [info ] [Thread-1 (]: 91 of 97 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.02s]
[0m16:39:15.362738 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:39:15.363854 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:39:15.363854 [info ] [Thread-1 (]: 92 of 97 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m16:39:15.364842 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m16:39:15.365426 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:39:15.370927 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:39:15.372035 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:39:15.374802 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:39:15.376374 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:39:15.376374 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m16:39:15.376374 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:15.377888 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.377888 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:39:15.377888 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:15.379475 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.383163 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m16:39:15.385948 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m16:39:15.386960 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m16:39:15.387471 [info ] [Thread-1 (]: 92 of 97 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.02s]
[0m16:39:15.388485 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:39:15.389997 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:39:15.391214 [info ] [Thread-1 (]: 93 of 97 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m16:39:15.393356 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m16:39:15.394376 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:39:15.402820 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:39:15.403963 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:39:15.406650 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:39:15.407757 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:39:15.408784 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m16:39:15.408784 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:15.409770 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.410276 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:39:15.410276 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:15.410276 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.412604 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m16:39:15.412604 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m16:39:15.415896 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m16:39:15.417437 [info ] [Thread-1 (]: 93 of 97 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.02s]
[0m16:39:15.419068 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:39:15.419677 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:39:15.420263 [info ] [Thread-1 (]: 94 of 97 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m16:39:15.420803 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m16:39:15.421865 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:39:15.426643 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:39:15.428154 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:39:15.431478 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:39:15.433052 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:39:15.434065 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m16:39:15.434065 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:15.435117 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.435631 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:39:15.435631 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m16:39:15.437171 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.440180 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m16:39:15.441373 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m16:39:15.441885 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m16:39:15.441885 [info ] [Thread-1 (]: 94 of 97 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.02s]
[0m16:39:15.442900 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:39:15.444596 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:39:15.444596 [info ] [Thread-1 (]: 95 of 97 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m16:39:15.446348 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m16:39:15.446348 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:39:15.451278 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:39:15.452470 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:39:15.454688 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:39:15.454688 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:39:15.456269 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m16:39:15.456269 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:15.457295 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.457295 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:39:15.457295 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:39:15.462994 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:39:15.466415 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m16:39:15.467608 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m16:39:15.467608 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m16:39:15.467608 [info ] [Thread-1 (]: 95 of 97 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.02s]
[0m16:39:15.469726 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:39:15.470276 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:39:15.471360 [info ] [Thread-1 (]: 96 of 97 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m16:39:15.471902 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m16:39:15.472961 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:39:15.481707 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:39:15.483365 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:39:15.486843 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:39:15.488571 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:39:15.489196 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m16:39:15.489196 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:15.490383 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.490967 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:39:15.492362 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:39:15.495738 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:39:15.499122 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m16:39:15.500938 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m16:39:15.502140 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m16:39:15.503192 [info ] [Thread-1 (]: 96 of 97 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.03s]
[0m16:39:15.504769 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:39:15.505784 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:39:15.506784 [info ] [Thread-1 (]: 97 of 97 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m16:39:15.507781 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m16:39:15.508295 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:39:15.515364 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:39:15.517368 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:39:15.521367 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:39:15.524319 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:39:15.525267 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m16:39:15.525267 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:39:15.527470 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:39:15.528485 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:39:15.529488 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m16:39:15.531484 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:39:15.535297 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m16:39:15.536820 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m16:39:15.537819 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m16:39:15.538819 [info ] [Thread-1 (]: 97 of 97 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.03s]
[0m16:39:15.539820 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:39:15.542820 [debug] [MainThread]: Using duckdb connection "master"
[0m16:39:15.543328 [debug] [MainThread]: On master: BEGIN
[0m16:39:15.544340 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:39:15.545847 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:39:15.545847 [debug] [MainThread]: On master: COMMIT
[0m16:39:15.546858 [debug] [MainThread]: Using duckdb connection "master"
[0m16:39:15.546858 [debug] [MainThread]: On master: COMMIT
[0m16:39:15.547857 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:39:15.547857 [debug] [MainThread]: On master: Close
[0m16:39:15.548857 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:39:15.548857 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:39:15.548857 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:39:15.549862 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m16:39:15.549862 [info ] [MainThread]: 
[0m16:39:15.550857 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 10.70 seconds (10.70s).
[0m16:39:15.563722 [debug] [MainThread]: Command end result
[0m16:39:15.627560 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:39:15.632784 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:39:15.647027 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:39:15.648039 [info ] [MainThread]: 
[0m16:39:15.648039 [info ] [MainThread]: [31mCompleted with 1 error, 0 partial successes, and 0 warnings:[0m
[0m16:39:15.648039 [info ] [MainThread]: 
[0m16:39:15.649540 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_ (models\gold\schema.yml)[0m
[0m16:39:15.649540 [error] [MainThread]:   Got 2 results, configured to fail if != 0
[0m16:39:15.649540 [info ] [MainThread]: 
[0m16:39:15.649540 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_446031b84e0fad1bdbfdd1cf73647908.sql
[0m16:39:15.651104 [info ] [MainThread]: 
[0m16:39:15.652226 [info ] [MainThread]: Done. PASS=96 WARN=0 ERROR=1 SKIP=0 NO-OP=0 TOTAL=97
[0m16:39:15.653273 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:39:15.654370 [debug] [MainThread]: Command `dbt build` failed at 16:39:15.654370 after 14.96 seconds
[0m16:39:15.654370 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2EEFE9C70>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2EB4AE930>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001F2EE746C90>]}
[0m16:39:15.654944 [debug] [MainThread]: Flushing usage events
[0m16:39:16.369193 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:39:45.136130 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002280FD51A90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002281354CF20>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022810EC7020>]}


============================== 16:39:45.147538 | 64142e4c-3481-4dfc-8d5e-6a395bdfa4a1 ==============================
[0m16:39:45.147538 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:39:45.148549 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'False', 'indirect_selection': 'eager', 'invocation_command': 'dbt show --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics --inline select distinct di.id_localizacao, di.nome, di.tipo_instituicao from gold.dim_instituicao di where di.id_localizacao not in (select id_localizacao from gold.dim_localizacao)', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:39:45.521133 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '64142e4c-3481-4dfc-8d5e-6a395bdfa4a1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000228153995E0>]}
[0m16:39:45.581765 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '64142e4c-3481-4dfc-8d5e-6a395bdfa4a1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000228138B8470>]}
[0m16:39:45.660868 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:39:46.121179 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:39:46.122701 [debug] [MainThread]: Partial parsing not enabled
[0m16:39:48.042004 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:39:48.043020 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '64142e4c-3481-4dfc-8d5e-6a395bdfa4a1', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022815B9E480>]}
[0m16:39:48.560252 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:39:48.569545 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '64142e4c-3481-4dfc-8d5e-6a395bdfa4a1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022815D48AD0>]}
[0m16:39:48.675918 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:39:48.679612 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:39:48.820037 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '64142e4c-3481-4dfc-8d5e-6a395bdfa4a1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022815B314C0>]}
[0m16:39:48.820560 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 1 sql operation, 31 sources, 590 macros
[0m16:39:48.821081 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '64142e4c-3481-4dfc-8d5e-6a395bdfa4a1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002281594B1A0>]}
[0m16:39:48.824122 [info ] [MainThread]: 
[0m16:39:48.825121 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:39:48.825121 [info ] [MainThread]: 
[0m16:39:48.826124 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:39:48.831863 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:39:49.160159 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:39:49.161168 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:39:49.161168 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:39:50.110531 [debug] [ThreadPool]: SQL status: OK in 0.949 seconds
[0m16:39:50.110531 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:39:50.111065 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:39:50.125343 [debug] [ThreadPool]: SQL status: OK in 0.014 seconds
[0m16:39:50.127877 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:39:50.129393 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:39:50.129393 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:39:50.134513 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '64142e4c-3481-4dfc-8d5e-6a395bdfa4a1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022815AFFF20>]}
[0m16:39:50.140013 [debug] [Thread-1 (]: Began running node sql_operation.bacen_ifdata_analytics.inline_query
[0m16:39:50.140535 [debug] [Thread-1 (]: Acquiring new duckdb connection 'sql_operation.bacen_ifdata_analytics.inline_query'
[0m16:39:50.141067 [debug] [Thread-1 (]: Began compiling node sql_operation.bacen_ifdata_analytics.inline_query
[0m16:39:50.145179 [debug] [Thread-1 (]: Writing injected SQL for node "sql_operation.bacen_ifdata_analytics.inline_query"
[0m16:39:50.147238 [debug] [Thread-1 (]: Began executing node sql_operation.bacen_ifdata_analytics.inline_query
[0m16:39:50.154532 [debug] [Thread-1 (]: Using duckdb connection "sql_operation.bacen_ifdata_analytics.inline_query"
[0m16:39:50.155113 [debug] [Thread-1 (]: On sql_operation.bacen_ifdata_analytics.inline_query: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "sql_operation.bacen_ifdata_analytics.inline_query"} */

  
  select distinct di.id_localizacao, di.nome, di.tipo_instituicao from gold.dim_instituicao di where di.id_localizacao not in (select id_localizacao from gold.dim_localizacao)
  
  limit 5

[0m16:39:50.155113 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:39:50.163310 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "sql_operation.bacen_ifdata_analytics.inline_query"} */

  
  select distinct di.id_localizacao, di.nome, di.tipo_instituicao from gold.dim_instituicao di where di.id_localizacao not in (select id_localizacao from gold.dim_localizacao)
  
  limit 5

[0m16:39:50.164813 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:39:50.165399 [debug] [Thread-1 (]: On sql_operation.bacen_ifdata_analytics.inline_query: Close
[0m16:39:50.171833 [debug] [Thread-1 (]: Runtime Error in sql_operation inline_query (from remote system.sql)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "gold_warehouse.dim_instituicao"?
  
  LINE 4: ... distinct di.id_localizacao, di.nome, di.tipo_instituicao from gold.dim_instituicao di where di.id_localizacao not in ...
                                                                            ^
[0m16:39:50.172364 [debug] [Thread-1 (]: Finished running node sql_operation.bacen_ifdata_analytics.inline_query
[0m16:39:50.172884 [debug] [Thread-4 (]: Marking all children of 'sql_operation.bacen_ifdata_analytics.inline_query' to be skipped because of status 'error'.  Reason: Runtime Error in sql_operation inline_query (from remote system.sql)
  Catalog Error: Table with name dim_instituicao does not exist!
  Did you mean "gold_warehouse.dim_instituicao"?
  
  LINE 4: ... distinct di.id_localizacao, di.nome, di.tipo_instituicao from gold.dim_instituicao di where di.id_localizacao not in ...
                                                                            ^.
[0m16:39:50.173938 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:39:50.173938 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:39:50.174461 [debug] [MainThread]: Connection 'sql_operation.bacen_ifdata_analytics.inline_query' was properly closed.
[0m16:39:50.175488 [error] [MainThread]: Encountered an error:
Runtime Error
  Runtime Error in sql_operation inline_query (from remote system.sql)
    Catalog Error: Table with name dim_instituicao does not exist!
    Did you mean "gold_warehouse.dim_instituicao"?
    
    LINE 4: ... distinct di.id_localizacao, di.nome, di.tipo_instituicao from gold.dim_instituicao di where di.id_localizacao not in ...
                                                                              ^
[0m16:39:50.176011 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:39:50.177014 [debug] [MainThread]: Command `dbt show` failed at 16:39:50.177014 after 5.26 seconds
[0m16:39:50.178015 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002281359BCB0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002281598F680>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000022815FD15E0>]}
[0m16:39:50.178015 [debug] [MainThread]: Flushing usage events
[0m16:39:50.787145 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:41:00.434476 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E61CA7B0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E5D11910>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E5D12660>]}


============================== 16:41:00.439995 | 7546dac1-5dd4-4622-88e2-194103d11ab3 ==============================
[0m16:41:00.439995 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:41:00.440999 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'False', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt build --no-partial-parse --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:41:00.746974 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E65F70B0>]}
[0m16:41:00.818003 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E5CDB380>]}
[0m16:41:00.822706 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:41:01.238434 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:41:01.239940 [debug] [MainThread]: Partial parsing not enabled
[0m16:41:03.524399 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:41:03.525448 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E7D390A0>]}
[0m16:41:03.995715 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:41:04.007882 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E7FEB9B0>]}
[0m16:41:04.110323 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:41:04.129442 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:41:04.217442 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E7EE5100>]}
[0m16:41:04.218449 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:41:04.226255 [info ] [MainThread]: 
[0m16:41:04.226255 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:41:04.227261 [info ] [MainThread]: 
[0m16:41:04.228259 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:41:04.233888 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:41:04.506020 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:41:04.507631 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:41:04.507631 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:41:05.499085 [debug] [ThreadPool]: SQL status: OK in 0.991 seconds
[0m16:41:05.501131 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:41:05.502261 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:41:05.502775 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:41:05.510023 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:41:05.510023 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:41:05.510023 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:41:05.512582 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:41:05.513088 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:41:05.513088 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:41:05.514593 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:41:05.515191 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:41:05.515191 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:41:05.516216 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:41:05.517275 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:41:05.517834 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:41:05.517834 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:41:05.517834 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:41:05.518840 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:41:05.522924 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:41:05.527930 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:41:05.527930 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:41:05.529503 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:41:05.529503 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:41:05.529503 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:41:05.529503 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:41:05.551154 [debug] [ThreadPool]: SQL status: OK in 0.020 seconds
[0m16:41:05.555342 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:41:05.557617 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:41:05.558627 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:41:05.571233 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E7DCC1D0>]}
[0m16:41:05.572747 [debug] [MainThread]: Using duckdb connection "master"
[0m16:41:05.574100 [debug] [MainThread]: On master: BEGIN
[0m16:41:05.574760 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:41:05.576273 [debug] [MainThread]: SQL status: OK in 0.002 seconds
[0m16:41:05.577284 [debug] [MainThread]: On master: COMMIT
[0m16:41:05.578289 [debug] [MainThread]: Using duckdb connection "master"
[0m16:41:05.579288 [debug] [MainThread]: On master: COMMIT
[0m16:41:05.580285 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:41:05.581298 [debug] [MainThread]: On master: Close
[0m16:41:05.607274 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:41:05.609281 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:41:05.613874 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:41:05.614882 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:41:05.638624 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:05.641896 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:41:05.697294 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:05.699812 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:05.699812 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:41:05.699812 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:41:05.702676 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:05.702676 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:05.702676 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
    UNION ALL
    SELECT * FROM portfolio_fallback
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:41:06.019235 [debug] [Thread-1 (]: SQL status: OK in 0.316 seconds
[0m16:41:06.028175 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:06.029184 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:41:06.030475 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.031485 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:06.032993 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:41:06.035457 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.047052 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:06.048060 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:41:06.049569 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.056025 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:06.057046 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:41:06.058294 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.083126 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:41:06.084643 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:06.084643 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:41:06.097241 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:41:06.108008 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:06.108008 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:41:06.110415 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:06.114963 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:41:06.117489 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E8031400>]}
[0m16:41:06.119158 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.50s]
[0m16:41:06.120350 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:41:06.121366 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:41:06.123229 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:41:06.124239 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:41:06.125244 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:41:06.130073 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:06.132734 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:41:06.138409 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:06.138409 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:06.139917 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:41:06.139917 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:06.140924 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.140924 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:06.141925 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL

    UNION

    -- Fallback: localizações de instituições presentes apenas nas tabelas SCR
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources

UNION

-- Sentinel para instituições sem dados de localização (cidade, uf, regiao = NULL)
SELECT
    md5(cast('' as varchar)) as id_localizacao,
    NULL as cidade,
    NULL as uf,
    NULL as regiao
    );
  
  
[0m16:41:06.210011 [debug] [Thread-1 (]: SQL status: OK in 0.068 seconds
[0m16:41:06.211536 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:06.212046 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:41:06.213076 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.215595 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:06.215595 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:41:06.217659 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.223393 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:06.224401 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:41:06.225399 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.229433 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:06.229968 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:41:06.229968 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:06.230976 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:41:06.230976 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:06.232626 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:41:06.235809 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:06.237323 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:06.238327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:41:06.240836 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:06.242862 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:41:06.244451 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E84FA630>]}
[0m16:41:06.245480 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.12s]
[0m16:41:06.245480 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:41:06.245480 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:41:06.246987 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m16:41:06.247564 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:41:06.247564 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:41:06.251665 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:06.252739 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:41:06.256478 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:06.257551 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:06.258558 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:41:06.258558 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:06.258558 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:06.258558 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:06.260064 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:41:06.275986 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:41:06.277993 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:06.278506 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:41:06.279540 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.280508 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:06.282015 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:41:06.283023 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.285701 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:06.287211 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:41:06.287211 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:06.290721 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:06.290721 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:41:06.290721 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:06.292759 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:41:06.292759 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:06.294304 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:41:06.297376 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:06.299383 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:06.299888 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:41:06.302626 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:06.304719 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:41:06.304719 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E83CF6E0>]}
[0m16:41:06.306319 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.06s]
[0m16:41:06.307328 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:41:06.308404 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:41:06.309144 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:41:06.309701 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:41:06.310216 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:41:06.316050 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:06.317573 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:41:06.322825 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:06.324834 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:06.324834 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:41:06.325842 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:06.325842 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.326842 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:06.326842 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:41:06.955083 [debug] [Thread-1 (]: SQL status: OK in 0.627 seconds
[0m16:41:06.957103 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:06.957965 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:41:06.959973 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.961987 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:06.962490 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:41:06.964021 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.968248 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:06.969765 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:41:06.971348 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:06.975186 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:06.975709 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:41:06.976220 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:06.977779 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:41:06.978285 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:06.978285 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:41:07.311462 [debug] [Thread-1 (]: SQL status: OK in 0.332 seconds
[0m16:41:07.314041 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:07.315045 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:41:07.319154 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:41:07.321241 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:41:07.322253 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E852EEA0>]}
[0m16:41:07.322772 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 1.01s]
[0m16:41:07.323778 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:41:07.324782 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:41:07.326428 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m16:41:07.327849 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:41:07.327849 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:41:07.334808 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:07.336352 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:41:07.341044 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:07.342554 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:07.343056 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:41:07.343056 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:07.343056 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:07.344062 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:07.344567 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:41:07.563319 [debug] [Thread-1 (]: SQL status: OK in 0.218 seconds
[0m16:41:07.564844 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:07.565909 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_capital_prudencial'
  
[0m16:41:07.566960 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:07.569061 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:07.569605 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_capital_prudencial'
  
[0m16:41:07.571187 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:07.574782 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:07.575781 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial" rename to "fato_capital_prudencial__dbt_backup"
[0m16:41:07.576781 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:07.579301 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:07.579301 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m16:41:07.581321 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:07.583880 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:41:07.584388 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:07.585069 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:41:07.646975 [debug] [Thread-1 (]: SQL status: OK in 0.061 seconds
[0m16:41:07.649113 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:07.649642 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m16:41:07.669509 [debug] [Thread-1 (]: SQL status: OK in 0.019 seconds
[0m16:41:07.670039 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:41:07.671582 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E83CF980>]}
[0m16:41:07.671582 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.34s]
[0m16:41:07.672590 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:41:07.673184 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:41:07.674194 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m16:41:07.674876 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:41:07.675411 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:41:07.679693 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:07.681702 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:41:07.684288 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:07.684288 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:07.685844 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:41:07.685844 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:07.685844 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:07.687360 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:07.687360 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:41:07.766330 [debug] [Thread-1 (]: SQL status: OK in 0.078 seconds
[0m16:41:07.767339 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:07.767339 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_indexador'
  
[0m16:41:07.767339 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:07.770027 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:07.770027 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_indexador'
  
[0m16:41:07.771632 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:07.774745 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:07.775253 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador" rename to "fato_carteira_credito_indexador__dbt_backup"
[0m16:41:07.776128 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:07.778821 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:07.779344 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m16:41:07.779865 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:07.780385 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:41:07.781391 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:07.781391 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:41:07.817481 [debug] [Thread-1 (]: SQL status: OK in 0.035 seconds
[0m16:41:07.820182 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:07.821187 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m16:41:07.824230 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:07.826232 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:41:07.826232 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E84EA180>]}
[0m16:41:07.827232 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.15s]
[0m16:41:07.827232 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:41:07.828232 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:41:07.828737 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m16:41:07.829244 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:41:07.829244 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:41:07.833923 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:07.834429 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:41:07.838460 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:07.839969 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:07.840978 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:41:07.840978 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:07.841978 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:07.841978 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:07.842484 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:41:07.896194 [debug] [Thread-1 (]: SQL status: OK in 0.053 seconds
[0m16:41:07.897736 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:07.898246 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:41:07.899274 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:07.900889 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:07.902018 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:41:07.903030 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:07.905897 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:07.906903 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais" rename to "fato_carteira_credito_totais__dbt_backup"
[0m16:41:07.907408 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:07.909924 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:07.910488 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:41:07.910488 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:07.912000 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:41:07.912505 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:07.912505 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:41:08.035804 [debug] [Thread-1 (]: SQL status: OK in 0.123 seconds
[0m16:41:08.038925 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:08.039929 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:41:08.044459 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:41:08.045464 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:41:08.045464 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E84BB4A0>]}
[0m16:41:08.047592 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.22s]
[0m16:41:08.048600 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:41:08.049602 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:41:08.050111 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:41:08.051117 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:41:08.051117 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:41:08.056163 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:08.057672 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:41:08.060724 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:08.061785 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:08.062797 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:41:08.063302 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:08.063302 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.063302 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:08.063302 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:41:08.581251 [debug] [Thread-1 (]: SQL status: OK in 0.517 seconds
[0m16:41:08.583884 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:08.584391 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:41:08.584391 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.586909 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:08.587415 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:41:08.587415 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:08.590448 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:08.591955 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado" rename to "fato_demonstracao_resultado__dbt_backup"
[0m16:41:08.591955 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:08.594984 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:08.594984 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:41:08.595990 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:08.597496 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:41:08.598505 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:08.598505 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:41:08.737313 [debug] [Thread-1 (]: SQL status: OK in 0.138 seconds
[0m16:41:08.739827 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:08.739827 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:41:08.742858 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:08.744404 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:41:08.745408 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E83C9F70>]}
[0m16:41:08.745408 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.69s]
[0m16:41:08.745408 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:41:08.746914 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:41:08.747513 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m16:41:08.748090 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:41:08.748090 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:41:08.752309 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:08.753892 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:41:08.757194 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:08.758203 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:08.758203 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:41:08.759202 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:08.759202 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.760203 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:08.760709 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:41:08.767858 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:41:08.770403 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:08.771489 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:41:08.774208 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.776293 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:08.777295 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:41:08.778803 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.782941 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:08.784457 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:41:08.787478 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.792943 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:08.792943 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:41:08.794220 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:08.795275 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:41:08.795275 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:08.795275 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:41:08.799378 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:41:08.802728 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:08.803733 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:41:08.805809 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.806844 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:41:08.807893 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3F62E6D80>]}
[0m16:41:08.808424 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.06s]
[0m16:41:08.808950 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:41:08.809583 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:41:08.810111 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:41:08.810636 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:41:08.810636 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:41:08.813672 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:08.815178 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:41:08.818269 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:08.819773 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:08.820278 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:41:08.820278 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:08.821288 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.821850 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:08.821850 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:41:08.852030 [debug] [Thread-1 (]: SQL status: OK in 0.030 seconds
[0m16:41:08.854158 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:08.854730 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:41:08.856316 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.857486 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:08.858021 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:41:08.859033 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.863109 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:08.863109 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:41:08.864115 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.868134 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:08.868134 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:41:08.869141 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:08.870332 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:41:08.871336 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:08.871336 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:41:08.878057 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:41:08.881217 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:08.881753 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:41:08.883316 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.885505 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:41:08.886563 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E84843B0>]}
[0m16:41:08.886563 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.08s]
[0m16:41:08.889094 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:41:08.889602 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:41:08.890106 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:41:08.891113 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:41:08.891113 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:41:08.895662 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:08.896659 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:41:08.901241 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:08.903557 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:08.904102 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:41:08.904640 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:08.905174 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:08.905706 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:08.905706 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:41:09.272603 [debug] [Thread-1 (]: SQL status: OK in 0.366 seconds
[0m16:41:09.274704 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:09.274704 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:41:09.275707 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.278222 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:09.279278 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:41:09.279786 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.283834 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:09.284340 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:41:09.284340 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:09.287366 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:09.287366 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:41:09.288370 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:09.289885 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:41:09.290891 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:09.290891 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:41:09.534620 [debug] [Thread-1 (]: SQL status: OK in 0.243 seconds
[0m16:41:09.538435 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:09.540280 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:41:09.543371 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:09.545386 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:41:09.545386 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E840CE90>]}
[0m16:41:09.547542 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.65s]
[0m16:41:09.548547 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:41:09.549549 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:41:09.550056 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m16:41:09.551566 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m16:41:09.551566 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:41:09.553090 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:41:09.592422 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:41:09.592942 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:41:09.592942 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:09.594520 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.595527 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:41:09.595527 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */
truncate table "gold_warehouse"."main"."seed_dim_atividade"
[0m16:41:09.598983 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:09.629799 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:41:09.631450 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:09.682107 [debug] [Thread-1 (]: SQL status: OK in 0.047 seconds
[0m16:41:09.690027 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:41:09.700071 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:41:09.701609 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:41:09.702122 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:41:09.706177 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:09.707704 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:41:09.709317 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E851B050>]}
[0m16:41:09.710217 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.16s]
[0m16:41:09.711738 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:41:09.711738 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:41:09.713254 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m16:41:09.719407 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m16:41:09.720231 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:41:09.720738 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:41:09.730561 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:41:09.731163 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m16:41:09.731669 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:09.732677 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.733183 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:41:09.733521 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */
truncate table "gold_warehouse"."main"."seed_dim_classe_instituicao"
[0m16:41:09.734694 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.736174 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:41:09.737692 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:09.747333 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:41:09.748343 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:41:09.751344 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:41:09.752860 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:41:09.753874 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:41:09.756887 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:09.758397 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m16:41:09.758397 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E84E8E60>]}
[0m16:41:09.760003 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.04s]
[0m16:41:09.761013 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:41:09.762014 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:41:09.763517 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m16:41:09.765525 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m16:41:09.766533 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:41:09.767040 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:41:09.778634 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:41:09.779634 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m16:41:09.779634 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:09.781634 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.781634 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:41:09.782633 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */
truncate table "gold_warehouse"."main"."seed_dim_consolidado"
[0m16:41:09.784150 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.786164 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:41:09.786164 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:09.790178 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:09.791705 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:41:09.795227 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:41:09.796229 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:41:09.797227 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:41:09.801226 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:09.802739 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m16:41:09.804296 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3F6351910>]}
[0m16:41:09.805287 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.04s]
[0m16:41:09.805793 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:41:09.807302 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:41:09.808312 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m16:41:09.808818 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m16:41:09.810323 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:41:09.810323 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:41:09.819690 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:41:09.820703 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m16:41:09.821700 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:09.823224 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.823224 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:41:09.824231 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */
truncate table "gold_warehouse"."main"."seed_dim_controle"
[0m16:41:09.825741 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.828263 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:41:09.828892 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:09.832822 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:09.834108 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:41:09.838152 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:41:09.839152 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:41:09.840146 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:41:09.842979 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:09.844668 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m16:41:09.845175 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E8513AD0>]}
[0m16:41:09.845175 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.04s]
[0m16:41:09.847457 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:41:09.848138 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:41:09.849146 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m16:41:09.850145 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:41:09.850653 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:41:09.850653 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:41:09.860850 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:41:09.862359 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:41:09.862879 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:09.863592 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.863592 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:41:09.864602 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */
truncate table "gold_warehouse"."main"."seed_dim_faixa_vencimento"
[0m16:41:09.865600 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.869620 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:41:09.870632 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:09.875266 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:41:09.877374 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:41:09.879393 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:41:09.880976 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:41:09.881988 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:41:09.885428 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:09.886947 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:41:09.888475 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E84E5610>]}
[0m16:41:09.888475 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.04s]
[0m16:41:09.890993 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:41:09.891995 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:41:09.893008 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m16:41:09.894297 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:41:09.894297 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:41:09.896314 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:41:09.907734 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:41:09.907734 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:41:09.908745 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:09.910258 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.910258 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:41:09.910258 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */
truncate table "gold_warehouse"."main"."seed_dim_porte"
[0m16:41:09.912842 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.915358 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:41:09.916366 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:09.919685 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:09.920225 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:41:09.924396 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:41:09.925395 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:41:09.925395 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:41:09.928422 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:09.929428 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:41:09.929428 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E84E58E0>]}
[0m16:41:09.929428 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.04s]
[0m16:41:09.931005 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:41:09.932013 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:41:09.932518 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m16:41:09.933033 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:41:09.933033 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:41:09.933033 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:41:09.940076 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:41:09.940076 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:41:09.940076 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:09.941598 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.942116 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:41:09.942116 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */
truncate table "gold_warehouse"."main"."seed_dim_produto_credito"
[0m16:41:09.943140 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:09.944148 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:41:09.944656 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:09.948184 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:09.948691 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:41:09.951306 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:41:09.952500 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:41:09.953014 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:41:09.954716 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:09.954716 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:41:09.956230 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3F637B800>]}
[0m16:41:09.956230 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.02s]
[0m16:41:09.957744 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:41:09.957744 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:41:09.958753 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m16:41:09.958753 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:41:09.960261 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:41:09.960261 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:41:09.966840 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:41:09.967350 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:41:09.967350 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:09.968938 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:09.969469 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:41:09.969469 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */
truncate table "gold_warehouse"."main"."seed_dim_regiao"
[0m16:41:09.970026 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:09.971555 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:41:09.973080 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:09.977303 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:09.978312 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:41:09.981253 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:41:09.981253 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:41:09.984305 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:41:09.986378 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:09.988397 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:41:09.989910 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E83BFB30>]}
[0m16:41:09.990927 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.03s]
[0m16:41:09.991918 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:41:09.993995 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:41:09.995002 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m16:41:09.997011 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:41:09.997518 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:41:09.997518 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:41:10.007841 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:41:10.008853 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:41:10.009623 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.011147 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.011147 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:41:10.012658 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */
truncate table "gold_warehouse"."main"."seed_dim_risco"
[0m16:41:10.014669 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.016678 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:41:10.016678 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:10.020676 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:10.022675 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:41:10.028147 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:41:10.028671 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:41:10.029678 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:41:10.037030 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:41:10.038682 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:41:10.040350 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E8031D90>]}
[0m16:41:10.040857 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.04s]
[0m16:41:10.042869 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:41:10.043378 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:41:10.044958 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m16:41:10.045966 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m16:41:10.045966 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:41:10.047473 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:41:10.056532 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:41:10.057095 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m16:41:10.057624 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.058138 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.059147 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:41:10.059147 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */
truncate table "gold_warehouse"."main"."seed_dim_segmento"
[0m16:41:10.062422 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.064522 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:41:10.064522 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:10.068046 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:10.070065 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:41:10.073150 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:41:10.073995 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:41:10.074504 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:41:10.076513 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:10.078022 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m16:41:10.079618 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E84E8DD0>]}
[0m16:41:10.079618 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.03s]
[0m16:41:10.081205 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:41:10.082725 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:41:10.082725 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m16:41:10.084240 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m16:41:10.084240 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:41:10.095430 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:41:10.097527 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:41:10.194316 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:41:10.196447 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:41:10.196967 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m16:41:10.197568 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.197568 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.197568 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:41:10.198575 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.199577 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.203293 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m16:41:10.204381 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m16:41:10.204961 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m16:41:10.204961 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.12s]
[0m16:41:10.206983 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:41:10.206983 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:41:10.207553 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m16:41:10.208564 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m16:41:10.210070 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:41:10.213408 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:41:10.215520 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:41:10.219099 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:41:10.220248 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:41:10.220248 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m16:41:10.220248 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.221759 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.222265 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:41:10.222784 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.223790 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.226795 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m16:41:10.228296 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m16:41:10.228296 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m16:41:10.228296 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m16:41:10.229820 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:41:10.229820 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:41:10.229820 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m16:41:10.231399 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m16:41:10.231399 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:41:10.238575 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:41:10.240083 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:41:10.243773 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:41:10.245299 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:41:10.245299 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m16:41:10.245299 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.246814 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.246814 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:41:10.247410 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:41:10.251280 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:41:10.252973 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m16:41:10.254047 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m16:41:10.254636 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m16:41:10.255248 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.02s]
[0m16:41:10.256253 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:41:10.256253 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:41:10.257511 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m16:41:10.258517 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m16:41:10.258517 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:41:10.261746 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:41:10.262751 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:41:10.266004 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:41:10.266518 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:41:10.266518 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m16:41:10.267526 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.268031 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.268031 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:41:10.268031 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.269646 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.271222 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m16:41:10.271730 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m16:41:10.272738 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m16:41:10.272738 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m16:41:10.274387 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:41:10.275402 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:41:10.275402 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m16:41:10.276410 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m16:41:10.276410 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:41:10.284169 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:41:10.285786 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:41:10.288306 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:41:10.290426 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:41:10.290426 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m16:41:10.290426 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.291946 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.291946 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:41:10.292955 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.295471 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:10.297555 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m16:41:10.298565 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m16:41:10.298565 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m16:41:10.299566 [info ] [Thread-1 (]: 26 of 97 PASS relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[32mPASS[0m in 0.02s]
[0m16:41:10.300076 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:41:10.301085 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:41:10.301085 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m16:41:10.302228 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m16:41:10.302228 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:41:10.308748 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:41:10.309749 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:41:10.311820 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:41:10.312832 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:41:10.312832 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m16:41:10.313840 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.313840 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.314841 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:41:10.314841 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:41:10.316353 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:10.319164 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m16:41:10.320363 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m16:41:10.320900 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m16:41:10.321414 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.02s]
[0m16:41:10.321414 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:41:10.322928 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:41:10.322928 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m16:41:10.323939 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m16:41:10.323939 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:41:10.327936 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:41:10.328442 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:41:10.329448 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:41:10.331029 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:41:10.331029 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m16:41:10.331029 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.333098 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.334110 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:41:10.334110 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.334615 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.336339 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m16:41:10.337345 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m16:41:10.337849 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m16:41:10.337849 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.01s]
[0m16:41:10.338854 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:41:10.339855 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:41:10.340359 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m16:41:10.340359 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m16:41:10.340359 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:41:10.344390 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:41:10.345395 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:41:10.348563 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:41:10.349733 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:41:10.349733 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m16:41:10.351303 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.351899 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.352440 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:41:10.352440 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:41:10.355191 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:10.357210 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m16:41:10.359216 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m16:41:10.359216 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m16:41:10.360222 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.02s]
[0m16:41:10.360222 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:41:10.362068 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:41:10.362068 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m16:41:10.362908 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m16:41:10.362908 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:41:10.366927 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:41:10.367962 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:41:10.373819 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:41:10.374811 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:41:10.375805 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m16:41:10.375805 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.376804 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.376804 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:41:10.376804 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.379312 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.381321 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m16:41:10.382840 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m16:41:10.383432 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m16:41:10.383951 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:41:10.384958 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:41:10.385956 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:41:10.385956 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m16:41:10.387026 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m16:41:10.387026 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:41:10.390540 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:41:10.390540 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:41:10.393559 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:41:10.394638 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:41:10.394638 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m16:41:10.395649 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.395649 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.396644 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:41:10.396644 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.397147 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.398735 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m16:41:10.399244 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m16:41:10.400247 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m16:41:10.400247 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.01s]
[0m16:41:10.401247 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:41:10.401247 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:41:10.401845 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:10.402424 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m16:41:10.402937 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:41:10.408707 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:41:10.410213 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:41:10.411816 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:41:10.413076 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:41:10.413654 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m16:41:10.413654 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.414661 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.414661 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:41:10.415167 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.418942 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:10.420138 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m16:41:10.420138 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m16:41:10.421714 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m16:41:10.421714 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:10.422725 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:41:10.422725 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:41:10.423918 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:10.423918 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m16:41:10.424917 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:41:10.427915 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:41:10.430088 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:41:10.432605 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:41:10.432605 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:41:10.434153 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m16:41:10.434153 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.434153 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.434153 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:41:10.434153 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.442767 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:41:10.446035 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m16:41:10.446035 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m16:41:10.447542 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m16:41:10.447542 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:41:10.448550 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:41:10.448550 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:41:10.449548 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m16:41:10.449548 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m16:41:10.449548 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:41:10.454065 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:41:10.455216 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:41:10.458287 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:41:10.458287 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:41:10.459795 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m16:41:10.460439 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.460967 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.460967 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:41:10.461481 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.461481 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.462996 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m16:41:10.464004 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m16:41:10.465005 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m16:41:10.465512 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:41:10.465512 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:41:10.466520 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:41:10.467028 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m16:41:10.467533 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m16:41:10.467533 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:41:10.471288 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:41:10.472927 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:41:10.476588 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:41:10.478095 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:41:10.478095 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m16:41:10.478095 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.479729 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.479729 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:41:10.479729 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.481315 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.483025 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m16:41:10.484031 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m16:41:10.485177 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m16:41:10.486178 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:41:10.486685 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:41:10.486685 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:41:10.487690 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:10.487690 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m16:41:10.488692 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:41:10.494934 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:41:10.495941 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:41:10.499451 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:41:10.499955 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:41:10.500961 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m16:41:10.500961 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.502073 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.502073 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:41:10.502073 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.504702 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:10.506953 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m16:41:10.507466 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m16:41:10.508471 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m16:41:10.508975 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:10.508975 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:41:10.509979 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:41:10.509979 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:10.510515 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m16:41:10.510515 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:41:10.515045 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:41:10.515549 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:41:10.517561 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:41:10.519098 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:41:10.519098 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m16:41:10.519684 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.520256 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.520256 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:41:10.521263 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.526466 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:41:10.527975 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m16:41:10.527975 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m16:41:10.527975 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m16:41:10.529552 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:41:10.529552 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:41:10.529552 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:41:10.531114 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m16:41:10.531114 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m16:41:10.531114 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:41:10.534203 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:41:10.536793 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:41:10.538965 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:41:10.539937 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:41:10.540953 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m16:41:10.540953 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.542468 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.542971 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:41:10.542971 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.544557 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.545560 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m16:41:10.546562 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m16:41:10.547066 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m16:41:10.547569 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.02s]
[0m16:41:10.548574 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:41:10.548574 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:41:10.548574 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m16:41:10.550075 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m16:41:10.550075 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:41:10.553720 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:41:10.554851 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:41:10.556863 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:41:10.557367 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:41:10.558372 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m16:41:10.558372 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.558372 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.559372 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:41:10.559372 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.559874 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.561426 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m16:41:10.561929 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m16:41:10.562432 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m16:41:10.562942 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.01s]
[0m16:41:10.563946 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:41:10.563946 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:41:10.563946 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:10.564946 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m16:41:10.565449 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:41:10.570400 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:41:10.571404 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:41:10.574086 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:41:10.575086 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:41:10.575086 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m16:41:10.576092 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.576092 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.576092 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:41:10.577093 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.578596 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:10.579601 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m16:41:10.581159 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m16:41:10.581159 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m16:41:10.581159 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:10.582680 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:41:10.582680 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:41:10.582680 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:10.584237 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m16:41:10.584237 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:41:10.590280 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:41:10.591286 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:41:10.593794 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:41:10.594297 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:41:10.594805 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m16:41:10.594805 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.595809 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.595809 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:41:10.595809 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.599820 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:10.600824 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m16:41:10.602334 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m16:41:10.602842 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m16:41:10.602842 [info ] [Thread-1 (]: 41 of 97 PASS relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:41:10.604543 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:41:10.605054 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:41:10.605054 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m16:41:10.606062 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m16:41:10.606062 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:41:10.610186 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:41:10.611794 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:41:10.614627 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:41:10.615681 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:41:10.615681 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m16:41:10.616685 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.617273 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.617273 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:41:10.618279 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.619279 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.620468 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m16:41:10.621473 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m16:41:10.621473 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m16:41:10.622586 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.02s]
[0m16:41:10.623133 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:41:10.623133 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:41:10.624139 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m16:41:10.624139 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m16:41:10.625651 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:41:10.628158 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:41:10.629774 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:41:10.631328 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:41:10.633846 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:41:10.634349 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m16:41:10.634349 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.634349 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.634349 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:41:10.635854 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.635854 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.636860 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m16:41:10.639157 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m16:41:10.639157 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m16:41:10.640159 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.02s]
[0m16:41:10.640665 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:41:10.640665 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:41:10.640665 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:10.642170 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m16:41:10.642684 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:41:10.647838 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:41:10.647838 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:41:10.650445 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:41:10.651513 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:41:10.652086 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m16:41:10.652597 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.652597 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.653605 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:41:10.653605 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.656274 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:10.657784 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m16:41:10.658791 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m16:41:10.658791 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m16:41:10.659791 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:10.660296 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:41:10.660296 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:41:10.660296 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:10.661854 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m16:41:10.661854 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:41:10.666994 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:41:10.667498 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:41:10.672808 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:41:10.674813 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:41:10.674813 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m16:41:10.674813 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.675812 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.676812 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:41:10.676812 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.681266 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:41:10.681266 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m16:41:10.682784 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m16:41:10.683790 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m16:41:10.683790 [info ] [Thread-1 (]: 45 of 97 PASS relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:41:10.684293 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:41:10.684293 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:41:10.684293 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m16:41:10.685799 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m16:41:10.685799 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:41:10.688313 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:41:10.690330 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:41:10.691840 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:41:10.692846 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:41:10.692846 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m16:41:10.694734 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.695740 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.695740 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:41:10.695740 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.697245 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.698250 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m16:41:10.698250 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m16:41:10.699249 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m16:41:10.699752 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.01s]
[0m16:41:10.699752 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:41:10.701257 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:41:10.701862 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m16:41:10.702970 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m16:41:10.702970 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:41:10.706695 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:41:10.707200 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:41:10.710552 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:41:10.711557 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:41:10.711557 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m16:41:10.711557 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.712617 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.712617 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:41:10.712617 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.713624 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.715914 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m16:41:10.716493 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m16:41:10.716493 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m16:41:10.717501 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:41:10.718006 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:41:10.718006 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:41:10.719010 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:10.719567 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m16:41:10.720075 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:41:10.724198 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:41:10.725199 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:41:10.727204 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:41:10.728204 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:41:10.728204 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m16:41:10.728204 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.728204 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.728204 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:41:10.730159 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.732699 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:10.734249 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m16:41:10.735845 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m16:41:10.735845 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m16:41:10.735845 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:10.737354 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:41:10.737354 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:41:10.737354 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:10.738358 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m16:41:10.738358 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:41:10.742961 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:41:10.744671 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:41:10.747187 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:41:10.749192 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:41:10.749192 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m16:41:10.749695 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.749695 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.751202 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:41:10.751954 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.758406 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:41:10.759914 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m16:41:10.760493 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m16:41:10.760493 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m16:41:10.761500 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:41:10.762508 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:41:10.762508 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:41:10.763020 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m16:41:10.763020 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m16:41:10.764030 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:41:10.767541 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:41:10.769094 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:41:10.774864 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:41:10.775864 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:41:10.776864 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m16:41:10.776864 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.776864 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.778128 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:41:10.778128 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.778128 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.779703 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m16:41:10.779703 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m16:41:10.781307 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m16:41:10.781307 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:41:10.781307 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:41:10.781307 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:41:10.783267 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m16:41:10.783267 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m16:41:10.784777 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:41:10.787989 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:41:10.789935 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:41:10.791961 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:41:10.793473 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:41:10.793473 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m16:41:10.793473 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.794479 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.794479 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:41:10.794479 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.795486 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.797559 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m16:41:10.798565 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m16:41:10.799564 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m16:41:10.799564 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:41:10.801155 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:41:10.801155 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:41:10.801722 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:10.802284 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m16:41:10.802889 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:41:10.807091 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:41:10.807674 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:41:10.810188 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:41:10.810188 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:41:10.810188 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m16:41:10.810188 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.811798 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.811798 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:41:10.812804 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.813860 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.815362 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m16:41:10.816368 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m16:41:10.816871 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m16:41:10.816871 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.01s]
[0m16:41:10.817373 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:41:10.817373 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:41:10.818378 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:10.819380 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m16:41:10.819380 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:41:10.823910 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:41:10.824910 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:41:10.827910 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:41:10.829417 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:41:10.829417 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m16:41:10.829417 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.829417 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.829417 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:41:10.830994 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.833052 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:10.834569 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m16:41:10.834569 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m16:41:10.836137 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m16:41:10.836698 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:41:10.836698 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:41:10.838218 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:41:10.838218 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m16:41:10.839749 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m16:41:10.839749 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:41:10.842775 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:41:10.844348 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:41:10.847462 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:41:10.848466 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:41:10.849469 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m16:41:10.849469 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.849975 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.849975 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:41:10.849975 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.851538 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.852613 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m16:41:10.854125 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m16:41:10.854692 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m16:41:10.854692 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.01s]
[0m16:41:10.856283 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:41:10.856283 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:41:10.857290 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m16:41:10.857290 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m16:41:10.857290 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:41:10.863129 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:41:10.863129 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:41:10.867228 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:41:10.868234 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:41:10.868234 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m16:41:10.868234 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.869233 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.869736 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:41:10.869736 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.870238 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.872248 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m16:41:10.872760 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m16:41:10.873274 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m16:41:10.873274 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:41:10.874280 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:41:10.875279 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:41:10.875279 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:10.876281 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m16:41:10.876281 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:41:10.881003 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:41:10.882519 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:41:10.885099 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:41:10.885604 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:41:10.887193 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m16:41:10.887193 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.887193 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.888199 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:41:10.888199 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.890292 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:10.891800 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m16:41:10.892804 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m16:41:10.892804 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m16:41:10.892804 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:10.894533 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:41:10.894533 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:41:10.895541 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:10.895541 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m16:41:10.896540 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:41:10.900056 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:41:10.901613 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:41:10.904359 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:41:10.905940 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:41:10.905940 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m16:41:10.905940 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.906974 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.907560 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:41:10.907560 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.911655 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:41:10.913673 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m16:41:10.913673 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m16:41:10.914680 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m16:41:10.915186 [info ] [Thread-1 (]: 57 of 97 PASS relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:41:10.915186 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:41:10.916196 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:41:10.916701 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m16:41:10.917264 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m16:41:10.917264 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:41:10.922800 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:41:10.924807 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:41:10.925806 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:41:10.926804 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:41:10.927804 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m16:41:10.927804 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.927804 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:10.927804 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:41:10.927804 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.929384 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.930939 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m16:41:10.933066 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m16:41:10.934071 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m16:41:10.934071 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.02s]
[0m16:41:10.935389 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:41:10.935893 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:41:10.935893 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m16:41:10.936899 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m16:41:10.937310 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:41:10.942706 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:41:10.944228 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:41:10.947348 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:41:10.948354 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:41:10.948354 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m16:41:10.949354 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.949354 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.949354 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:41:10.949354 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.952402 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.953429 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m16:41:10.954505 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m16:41:10.955156 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m16:41:10.955156 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.02s]
[0m16:41:10.956162 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:41:10.956162 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:41:10.957248 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:10.957248 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m16:41:10.958254 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:41:10.961884 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:41:10.963672 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:41:10.965818 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:41:10.966392 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:41:10.966392 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m16:41:10.967395 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.967898 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.967898 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:41:10.967898 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.971661 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:10.973741 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m16:41:10.974740 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m16:41:10.974740 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m16:41:10.975245 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:10.976252 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:41:10.976252 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:41:10.976252 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:10.976252 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m16:41:10.976252 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:41:10.981386 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:41:10.982391 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:41:10.984420 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:41:10.984420 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:41:10.984420 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m16:41:10.985926 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:10.987442 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:10.987442 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:41:10.987442 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:10.993002 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:41:10.994413 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m16:41:10.995420 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m16:41:10.995420 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m16:41:10.996420 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:41:10.997481 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:41:10.997481 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:41:10.997481 [info ] [Thread-1 (]: 62 of 97 START sql table model main.dim_atividade .............................. [RUN]
[0m16:41:10.998487 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m16:41:10.999487 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:41:11.003274 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:41:11.004399 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:41:11.007056 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:41:11.007560 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:41:11.007560 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:41:11.008565 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:11.008565 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.008565 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:41:11.008565 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:41:11.010074 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.012632 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:41:11.013640 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:41:11.014640 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.015648 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:41:11.016661 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_atividade'
  
[0m16:41:11.017857 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.020376 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:41:11.021445 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade" rename to "dim_atividade__dbt_backup"
[0m16:41:11.021445 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.024966 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:41:11.024966 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:41:11.025972 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.027972 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:41:11.027972 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:41:11.027972 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:41:11.031109 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:11.036140 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:41:11.037149 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:41:11.038664 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.040173 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:41:11.040173 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E840DB20>]}
[0m16:41:11.041181 [info ] [Thread-1 (]: 62 of 97 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.04s]
[0m16:41:11.042686 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:41:11.043205 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:41:11.043205 [info ] [Thread-1 (]: 63 of 97 START sql table model main.dim_classe_instituicao ..................... [RUN]
[0m16:41:11.044212 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:41:11.044717 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:41:11.047227 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:41:11.048233 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:41:11.052220 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:41:11.053245 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:41:11.053820 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:41:11.054380 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:11.054957 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.054957 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:41:11.055966 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:41:11.056998 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.057504 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:41:11.057504 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:41:11.059020 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.060027 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:41:11.060027 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_classe_instituicao'
  
[0m16:41:11.060533 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.063766 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:41:11.063766 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao" rename to "dim_classe_instituicao__dbt_backup"
[0m16:41:11.064766 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.067290 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:41:11.067290 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:41:11.068297 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.069297 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:41:11.069297 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:41:11.069297 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:41:11.072831 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:11.075359 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:41:11.076361 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:41:11.076361 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.077867 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:41:11.077867 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E84B74D0>]}
[0m16:41:11.931218 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:41:11.932812 [info ] [Thread-1 (]: 63 of 97 OK created sql table model main.dim_classe_instituicao ................ [[32mOK[0m in 0.03s]
[0m16:41:11.933826 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:41:11.933826 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:41:11.934870 [info ] [Thread-1 (]: 64 of 97 START sql table model main.dim_consolidado ............................ [RUN]
[0m16:41:11.935870 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:41:11.935870 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:41:11.938881 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:41:11.940386 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:41:11.943410 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:41:11.944415 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:41:11.945422 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:41:11.945422 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:11.945422 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.945422 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:41:11.945422 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:41:11.947551 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.948556 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:41:11.948556 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:41:11.949554 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.951628 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:41:11.952341 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_consolidado'
  
[0m16:41:11.953364 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.956181 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:41:11.956181 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado" rename to "dim_consolidado__dbt_backup"
[0m16:41:11.956686 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.960194 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:41:11.960194 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:41:11.961763 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.962425 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:41:11.963003 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:41:11.963003 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:41:11.964007 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.966516 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:41:11.967018 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:41:11.967520 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.969059 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:41:11.969612 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3F6353440>]}
[0m16:41:11.970145 [info ] [Thread-1 (]: 64 of 97 OK created sql table model main.dim_consolidado ....................... [[32mOK[0m in 0.03s]
[0m16:41:11.970145 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:41:11.971155 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:41:11.971662 [info ] [Thread-1 (]: 65 of 97 START sql table model main.dim_controle ............................... [RUN]
[0m16:41:11.972672 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:41:11.972672 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:41:11.975679 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:41:11.975679 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:41:11.979399 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:41:11.980487 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:41:11.981000 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:41:11.981000 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:11.981000 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.982007 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:41:11.982512 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:41:11.983025 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.984033 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:41:11.984033 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:41:11.984539 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.986044 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:41:11.987053 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_controle'
  
[0m16:41:11.988063 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:11.991113 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:41:11.991113 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle" rename to "dim_controle__dbt_backup"
[0m16:41:11.991113 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.994685 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:41:11.994685 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:41:11.995692 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:11.996692 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:41:11.997197 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:41:11.997197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:41:11.998202 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.001545 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:41:12.002119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:41:12.003136 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.004180 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:41:12.004730 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E83C8D40>]}
[0m16:41:12.004730 [info ] [Thread-1 (]: 65 of 97 OK created sql table model main.dim_controle .......................... [[32mOK[0m in 0.03s]
[0m16:41:12.004730 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:41:12.006311 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:41:12.006311 [info ] [Thread-1 (]: 66 of 97 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m16:41:12.007316 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:41:12.007821 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:41:12.010326 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:41:12.012475 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:41:12.016501 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:41:12.018168 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:41:12.018168 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:41:12.018168 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.019675 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.019675 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:41:12.020220 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:41:12.021229 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.022240 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:41:12.022754 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:41:12.023762 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.025771 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:41:12.025771 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_faixa_vencimento'
  
[0m16:41:12.026769 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.031289 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:41:12.031289 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento" rename to "dim_faixa_vencimento__dbt_backup"
[0m16:41:12.032298 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.034322 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:41:12.034322 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:41:12.035838 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.037351 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:41:12.038356 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:41:12.038356 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:41:12.039862 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.042897 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:41:12.042897 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:41:12.044437 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.045443 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:41:12.045443 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C382F7E0C0>]}
[0m16:41:12.046950 [info ] [Thread-1 (]: 66 of 97 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.04s]
[0m16:41:12.047528 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:41:12.048535 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:41:12.048535 [info ] [Thread-1 (]: 67 of 97 START sql table model main.dim_porte .................................. [RUN]
[0m16:41:12.049536 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m16:41:12.050041 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:41:12.053659 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:41:12.054270 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:41:12.057353 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:41:12.058359 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:41:12.058359 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:41:12.058359 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.059865 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.060435 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:41:12.060435 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:41:12.061439 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.062642 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:41:12.062642 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:41:12.063653 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.064647 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:41:12.064647 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_porte'
  
[0m16:41:12.066235 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.068874 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:41:12.068874 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte" rename to "dim_porte__dbt_backup"
[0m16:41:12.070369 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.072884 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:41:12.074003 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:41:12.075007 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.076513 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:41:12.076513 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:41:12.078032 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:41:12.078032 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.081229 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:41:12.081229 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:41:12.081229 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.082748 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:41:12.084334 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3F6356240>]}
[0m16:41:12.084334 [info ] [Thread-1 (]: 67 of 97 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.03s]
[0m16:41:12.084334 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:41:12.085926 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:41:12.085926 [info ] [Thread-1 (]: 68 of 97 START sql table model main.dim_produto_credito ........................ [RUN]
[0m16:41:12.086933 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:41:12.086933 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:41:12.090092 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:41:12.091132 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:41:12.095223 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:41:12.095223 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:41:12.096732 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:41:12.097248 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.097248 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.097248 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:41:12.098256 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:41:12.099289 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.099806 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:41:12.100812 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:41:12.101316 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.101826 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:41:12.102832 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_produto_credito'
  
[0m16:41:12.104345 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.107475 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:41:12.107475 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito" rename to "dim_produto_credito__dbt_backup"
[0m16:41:12.108487 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.112645 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:41:12.112645 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:41:12.112645 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.114805 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:41:12.115484 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:41:12.115484 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:41:12.116549 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.120103 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:41:12.120103 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:41:12.121619 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.124160 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:41:12.124666 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C382F8F110>]}
[0m16:41:12.125675 [info ] [Thread-1 (]: 68 of 97 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.04s]
[0m16:41:12.125675 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:41:12.125675 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:41:12.127272 [info ] [Thread-1 (]: 69 of 97 START sql table model main.dim_regiao ................................. [RUN]
[0m16:41:12.127787 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:41:12.127787 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:41:12.130309 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:41:12.131463 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:41:12.136185 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:41:12.138336 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:41:12.138336 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:41:12.139342 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.139342 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.139342 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:41:12.139342 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:41:12.140898 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.140898 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:41:12.142737 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:41:12.142737 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.144293 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:41:12.144293 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_regiao'
  
[0m16:41:12.144847 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.148005 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:41:12.148512 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao" rename to "dim_regiao__dbt_backup"
[0m16:41:12.148512 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.151702 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:41:12.152212 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:41:12.153235 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.154321 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:41:12.154321 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:41:12.154321 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:41:12.156692 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.158213 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:41:12.160752 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:41:12.162271 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.163801 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:41:12.165037 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E83CF200>]}
[0m16:41:12.165652 [info ] [Thread-1 (]: 69 of 97 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.04s]
[0m16:41:12.166167 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:41:12.166766 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:41:12.167276 [info ] [Thread-1 (]: 70 of 97 START sql table model main.dim_risco .................................. [RUN]
[0m16:41:12.167276 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:41:12.167276 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:41:12.172593 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:41:12.173097 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:41:12.176183 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:41:12.177753 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:41:12.177753 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:41:12.177753 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.177753 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.177753 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:41:12.179327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:41:12.180965 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.180965 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:41:12.182571 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:41:12.182571 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.184141 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:41:12.184141 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_risco'
  
[0m16:41:12.184141 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.187218 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:41:12.188846 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco" rename to "dim_risco__dbt_backup"
[0m16:41:12.189859 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.191877 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:41:12.191877 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:41:12.192884 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.194393 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:41:12.194900 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:41:12.194900 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:41:12.196489 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.198031 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:41:12.198031 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:41:12.200073 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.201080 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:41:12.201987 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E84F2150>]}
[0m16:41:12.202500 [info ] [Thread-1 (]: 70 of 97 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.03s]
[0m16:41:12.203008 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:41:12.203008 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:41:12.203517 [info ] [Thread-1 (]: 71 of 97 START sql table model main.dim_segmento ............................... [RUN]
[0m16:41:12.204581 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:41:12.204581 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:41:12.208650 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:41:12.209194 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:41:12.213462 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:41:12.213462 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:41:12.214979 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:41:12.215566 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.216080 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.216592 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:41:12.216592 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:41:12.217159 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.219251 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:41:12.219251 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:41:12.220263 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.220263 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:41:12.220263 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_segmento'
  
[0m16:41:12.222812 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.225064 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:41:12.225064 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento" rename to "dim_segmento__dbt_backup"
[0m16:41:12.225064 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.227787 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:41:12.229382 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:41:12.229382 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.230978 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:41:12.230978 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:41:12.230978 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:41:12.232597 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.236898 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:41:12.236898 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:41:12.238479 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.239999 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:41:12.239999 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C382F8AF00>]}
[0m16:41:12.239999 [info ] [Thread-1 (]: 71 of 97 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.04s]
[0m16:41:12.241603 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:41:12.242183 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:41:12.242696 [info ] [Thread-1 (]: 72 of 97 START test not_null_dim_classe_instituicao_id_classe .................. [RUN]
[0m16:41:12.243210 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m16:41:12.243210 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:41:12.246828 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:41:12.247831 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:41:12.249417 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:41:12.250987 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:41:12.251567 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m16:41:12.252082 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.252599 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.252599 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:41:12.252599 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m16:41:12.254116 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.254734 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m16:41:12.257255 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m16:41:12.257821 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m16:41:12.258821 [info ] [Thread-1 (]: 72 of 97 PASS not_null_dim_classe_instituicao_id_classe ........................ [[32mPASS[0m in 0.02s]
[0m16:41:12.259332 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:41:12.259845 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:41:12.259845 [info ] [Thread-1 (]: 73 of 97 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m16:41:12.260906 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m16:41:12.261424 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:41:12.266231 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:41:12.267291 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:41:12.271331 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:41:12.272336 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:41:12.273850 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m16:41:12.273850 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.274892 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.274892 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:41:12.275897 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:12.277489 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.279002 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m16:41:12.279512 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m16:41:12.280518 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m16:41:12.281023 [info ] [Thread-1 (]: 73 of 97 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:41:12.281023 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:41:12.282029 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:41:12.282535 [info ] [Thread-1 (]: 74 of 97 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m16:41:12.283048 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m16:41:12.283560 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:41:12.287341 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:41:12.288905 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:41:12.291207 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:41:12.292232 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:41:12.292745 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m16:41:12.293255 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.293255 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.293255 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:41:12.294260 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:41:12.294763 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:12.296850 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m16:41:12.297569 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m16:41:12.297569 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m16:41:12.299137 [info ] [Thread-1 (]: 74 of 97 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.02s]
[0m16:41:12.299137 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:41:12.300773 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:41:12.301288 [info ] [Thread-1 (]: 75 of 97 START test not_null_dim_consolidado_id_consolidado .................... [RUN]
[0m16:41:12.302050 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m16:41:12.302570 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:41:12.307236 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:41:12.308274 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:41:12.310294 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:41:12.310294 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:41:12.310294 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m16:41:12.311828 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.311828 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.313025 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:41:12.313025 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m16:41:12.314749 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.315852 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m16:41:12.316358 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m16:41:12.316358 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m16:41:12.317364 [info ] [Thread-1 (]: 75 of 97 PASS not_null_dim_consolidado_id_consolidado .......................... [[32mPASS[0m in 0.02s]
[0m16:41:12.317867 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:41:12.317867 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:41:12.318869 [info ] [Thread-1 (]: 76 of 97 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m16:41:12.320109 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m16:41:12.320665 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:41:12.325954 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:41:12.327559 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:41:12.329588 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:41:12.330595 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:41:12.331101 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m16:41:12.331101 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.331101 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.332108 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:41:12.332615 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:12.335252 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:12.336767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m16:41:12.337833 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m16:41:12.338347 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m16:41:12.338879 [info ] [Thread-1 (]: 76 of 97 PASS relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[32mPASS[0m in 0.02s]
[0m16:41:12.339743 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:41:12.339743 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:41:12.340312 [info ] [Thread-1 (]: 77 of 97 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m16:41:12.341347 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m16:41:12.341347 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:41:12.344464 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:41:12.344464 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:41:12.347552 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:41:12.349256 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:41:12.349924 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m16:41:12.349924 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.350444 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.350444 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:41:12.350444 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:41:12.352540 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.354291 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m16:41:12.355399 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m16:41:12.355910 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m16:41:12.355910 [info ] [Thread-1 (]: 77 of 97 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.02s]
[0m16:41:12.357419 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:41:12.357419 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:41:12.358428 [info ] [Thread-1 (]: 78 of 97 START test not_null_dim_controle_id_controle .......................... [RUN]
[0m16:41:12.358428 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m16:41:12.358428 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:41:12.364037 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:41:12.365701 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:41:12.368245 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:41:12.369816 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:41:12.371349 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m16:41:12.371349 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.372357 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.372864 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:41:12.372864 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m16:41:12.373871 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.375426 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m16:41:12.375426 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m16:41:12.377004 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m16:41:12.377004 [info ] [Thread-1 (]: 78 of 97 PASS not_null_dim_controle_id_controle ................................ [[32mPASS[0m in 0.02s]
[0m16:41:12.378517 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:41:12.378517 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:41:12.378517 [info ] [Thread-1 (]: 79 of 97 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m16:41:12.379522 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m16:41:12.380028 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:41:12.384061 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:41:12.384566 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:41:12.387090 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:41:12.387595 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:41:12.387595 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m16:41:12.387595 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.389161 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.390171 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:41:12.390171 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:12.391188 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.392699 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m16:41:12.393705 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m16:41:12.393705 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m16:41:12.394208 [info ] [Thread-1 (]: 79 of 97 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.01s]
[0m16:41:12.395341 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:41:12.395341 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:41:12.395341 [info ] [Thread-1 (]: 80 of 97 START test unique_dim_controle_id_controle ............................ [RUN]
[0m16:41:12.397451 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m16:41:12.397451 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:41:12.399993 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:41:12.401500 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:41:12.405155 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:41:12.406163 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:41:12.407211 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m16:41:12.407717 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.407717 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.407717 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:41:12.407717 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:41:12.409860 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.411524 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m16:41:12.412674 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m16:41:12.412674 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m16:41:12.413679 [info ] [Thread-1 (]: 80 of 97 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.02s]
[0m16:41:12.413679 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:41:12.413679 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:41:12.414795 [info ] [Thread-1 (]: 81 of 97 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:41:12.415308 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:41:12.416821 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:41:12.421405 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:41:12.422595 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:41:12.425367 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:41:12.427290 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:41:12.427808 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:41:12.427808 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.428815 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.428815 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:41:12.429320 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:41:12.474779 [debug] [Thread-1 (]: SQL status: OK in 0.046 seconds
[0m16:41:12.476370 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:41:12.476370 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m16:41:12.477883 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.479426 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:41:12.479426 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_atividade'
  
[0m16:41:12.479426 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.482565 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:41:12.482565 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade" rename to "fato_carteira_credito_atividade__dbt_backup"
[0m16:41:12.484121 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.486995 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:41:12.487501 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:41:12.488089 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.489596 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:41:12.490102 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:41:12.490102 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:41:12.492134 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.495082 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:41:12.495082 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:41:12.497277 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.498330 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:41:12.499335 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E83CFA40>]}
[0m16:41:12.500368 [info ] [Thread-1 (]: 81 of 97 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 0.08s]
[0m16:41:12.500876 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:41:12.501405 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:41:12.501405 [info ] [Thread-1 (]: 82 of 97 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:41:12.502411 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:41:12.502916 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:41:12.506070 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:41:12.507583 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:41:12.510102 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:41:12.511686 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:41:12.512243 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:41:12.512756 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.513271 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.513797 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:41:12.514693 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:41:12.695563 [debug] [Thread-1 (]: SQL status: OK in 0.180 seconds
[0m16:41:12.696571 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:41:12.696571 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m16:41:12.697592 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.698599 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:41:12.699105 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_porte'
  
[0m16:41:12.700128 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.703242 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:41:12.703242 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte" rename to "fato_carteira_credito_porte__dbt_backup"
[0m16:41:12.705271 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.708882 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:41:12.710301 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:41:12.710301 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.712478 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:41:12.712987 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:41:12.713497 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:41:12.719238 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:41:12.722778 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:41:12.722778 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:41:12.723784 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.725368 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:41:12.726953 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C382FD60C0>]}
[0m16:41:12.726953 [info ] [Thread-1 (]: 82 of 97 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.22s]
[0m16:41:12.728461 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:41:12.728461 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:41:12.729981 [info ] [Thread-1 (]: 83 of 97 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:41:12.730987 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:41:12.731492 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:41:12.734514 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:41:12.737628 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:41:12.740755 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:41:12.743834 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:41:12.744341 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:41:12.744341 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.745345 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.745345 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:41:12.745345 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:41:12.842909 [debug] [Thread-1 (]: SQL status: OK in 0.096 seconds
[0m16:41:12.844417 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:41:12.845463 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:41:12.846947 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.848990 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:41:12.849508 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_produto'
  
[0m16:41:12.851081 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.854854 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:41:12.855369 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto" rename to "fato_carteira_credito_produto__dbt_backup"
[0m16:41:12.855888 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.858408 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:41:12.858408 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:41:12.859971 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:12.861565 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:41:12.862071 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:41:12.862583 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:41:12.864104 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.866638 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:41:12.867274 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:41:12.870327 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:12.873417 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:41:12.875952 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3F62D19D0>]}
[0m16:41:12.877025 [info ] [Thread-1 (]: 83 of 97 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 0.15s]
[0m16:41:12.878697 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:41:12.878697 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:41:12.879708 [info ] [Thread-1 (]: 84 of 97 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:41:12.880742 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:41:12.881790 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:41:12.886445 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:41:12.887806 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:41:12.892867 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:41:12.894380 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:41:12.894380 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:41:12.894886 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:12.894886 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:12.894886 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:41:12.894886 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:41:13.201361 [debug] [Thread-1 (]: SQL status: OK in 0.305 seconds
[0m16:41:13.203046 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:41:13.203046 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:41:13.204112 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.205116 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:41:13.205620 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_regiao_credito'
  
[0m16:41:13.206635 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.211796 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:41:13.212810 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito" rename to "fato_regiao_credito__dbt_backup"
[0m16:41:13.212810 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:13.216012 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:41:13.217595 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:41:13.217595 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:13.219759 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:41:13.219759 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:41:13.220766 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:41:13.226610 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:41:13.229744 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:41:13.229744 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:41:13.231264 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.231264 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:41:13.232783 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C38302AD80>]}
[0m16:41:13.232783 [info ] [Thread-1 (]: 84 of 97 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.35s]
[0m16:41:13.234296 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:41:13.234296 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:41:13.234296 [info ] [Thread-1 (]: 85 of 97 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:41:13.235816 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:41:13.235816 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:41:13.241805 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:41:13.243346 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:41:13.246557 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:41:13.248070 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:41:13.248070 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:41:13.248070 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.248070 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:13.248070 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:41:13.249612 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:41:13.610265 [debug] [Thread-1 (]: SQL status: OK in 0.360 seconds
[0m16:41:13.611291 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:41:13.611808 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:41:13.611808 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:13.612813 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:41:13.612813 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_risco_credito'
  
[0m16:41:13.614893 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.617458 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:41:13.617970 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito" rename to "fato_risco_credito__dbt_backup"
[0m16:41:13.618978 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.621775 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:41:13.621775 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:41:13.622346 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:13.622861 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:41:13.624438 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:41:13.625495 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:41:13.732637 [debug] [Thread-1 (]: SQL status: OK in 0.107 seconds
[0m16:41:13.736286 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:41:13.737293 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:41:13.739370 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:13.740885 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:41:13.741890 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '7546dac1-5dd4-4622-88e2-194103d11ab3', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E83CE120>]}
[0m16:41:13.742942 [info ] [Thread-1 (]: 85 of 97 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.51s]
[0m16:41:13.743459 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:41:13.744465 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:41:13.744974 [info ] [Thread-1 (]: 86 of 97 START test not_null_dim_segmento_id_segmento .......................... [RUN]
[0m16:41:13.744974 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m16:41:13.744974 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:41:13.747797 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:41:13.750865 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:41:13.755956 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:41:13.758078 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:41:13.758611 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m16:41:13.759179 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.759712 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.759712 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:41:13.760225 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m16:41:13.760732 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:13.761812 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m16:41:13.762841 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m16:41:13.762841 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m16:41:13.763848 [info ] [Thread-1 (]: 86 of 97 PASS not_null_dim_segmento_id_segmento ................................ [[32mPASS[0m in 0.02s]
[0m16:41:13.765061 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:41:13.765650 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:41:13.765650 [info ] [Thread-1 (]: 87 of 97 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m16:41:13.766235 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m16:41:13.766784 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:41:13.770408 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:41:13.771431 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:41:13.773943 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:41:13.777085 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:41:13.778604 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m16:41:13.778604 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.779611 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.779611 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:41:13.780114 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:13.782211 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.783240 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m16:41:13.785295 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m16:41:13.785295 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m16:41:13.786224 [info ] [Thread-1 (]: 87 of 97 PASS relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[32mPASS[0m in 0.02s]
[0m16:41:13.787440 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:41:13.787976 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:41:13.787976 [info ] [Thread-1 (]: 88 of 97 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m16:41:13.788982 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m16:41:13.789487 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:41:13.793528 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:41:13.794054 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:41:13.797237 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:41:13.799338 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:41:13.799338 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m16:41:13.799338 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.801529 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.802040 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:41:13.802040 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:41:13.804632 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:13.805692 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m16:41:13.806202 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m16:41:13.807207 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m16:41:13.807207 [info ] [Thread-1 (]: 88 of 97 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.02s]
[0m16:41:13.807207 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:41:13.808806 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:41:13.808806 [info ] [Thread-1 (]: 89 of 97 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m16:41:13.808806 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m16:41:13.809813 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:41:13.814588 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:41:13.815640 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:41:13.817690 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:41:13.819408 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:41:13.820097 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m16:41:13.820637 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.820637 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.821640 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:41:13.821640 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:13.822645 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.823157 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m16:41:13.824732 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m16:41:13.824732 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m16:41:13.824732 [info ] [Thread-1 (]: 89 of 97 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m16:41:13.826308 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:41:13.826308 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:41:13.827831 [info ] [Thread-1 (]: 90 of 97 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m16:41:13.828445 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m16:41:13.828445 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:41:13.830969 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:41:13.832477 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:41:13.835011 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:41:13.836553 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:41:13.837061 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m16:41:13.837061 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.838072 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.838072 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:41:13.838072 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:13.839771 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.843410 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m16:41:13.845338 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m16:41:13.846465 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m16:41:13.848003 [info ] [Thread-1 (]: 90 of 97 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:41:13.849443 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:41:13.849977 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:41:13.850987 [info ] [Thread-1 (]: 91 of 97 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m16:41:13.851585 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m16:41:13.852105 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:41:13.860287 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:41:13.861802 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:41:13.866618 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:41:13.867267 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:41:13.867267 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m16:41:13.869995 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.869995 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.869995 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:41:13.869995 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:13.871573 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.872668 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m16:41:13.874951 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m16:41:13.876467 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m16:41:13.877482 [info ] [Thread-1 (]: 91 of 97 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.02s]
[0m16:41:13.878508 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:41:13.879024 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:41:13.879559 [info ] [Thread-1 (]: 92 of 97 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m16:41:13.880102 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m16:41:13.880617 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:41:13.885194 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:41:13.886717 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:41:13.888352 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:41:13.890688 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:41:13.891202 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m16:41:13.891202 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.892210 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.892210 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:41:13.892713 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:13.892713 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.894862 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m16:41:13.895370 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m16:41:13.895370 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m16:41:13.896887 [info ] [Thread-1 (]: 92 of 97 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.02s]
[0m16:41:13.897471 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:41:13.897981 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:41:13.897981 [info ] [Thread-1 (]: 93 of 97 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m16:41:13.897981 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m16:41:13.899496 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:41:13.905204 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:41:13.906248 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:41:13.910281 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:41:13.911853 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:41:13.911853 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m16:41:13.911853 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.912858 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:13.912858 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:41:13.913361 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:13.913361 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:13.915424 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m16:41:13.915424 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m16:41:13.916433 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m16:41:13.917529 [info ] [Thread-1 (]: 93 of 97 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.02s]
[0m16:41:13.918032 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:41:13.918032 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:41:13.919036 [info ] [Thread-1 (]: 94 of 97 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m16:41:13.919628 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m16:41:13.919628 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:41:13.924827 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:41:13.925370 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:41:13.927888 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:41:13.927888 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:41:13.929502 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m16:41:13.929502 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.929502 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:13.929502 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:41:13.929502 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m16:41:13.931119 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.932642 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m16:41:13.932642 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m16:41:13.932642 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m16:41:13.934214 [info ] [Thread-1 (]: 94 of 97 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.02s]
[0m16:41:13.934214 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:41:13.934214 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:41:13.935794 [info ] [Thread-1 (]: 95 of 97 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m16:41:13.935794 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m16:41:13.936801 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:41:13.941900 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:41:13.943411 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:41:13.946017 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:41:13.947528 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:41:13.947528 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m16:41:13.947528 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.949093 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.949601 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:41:13.949601 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:13.953375 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:41:13.955498 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m16:41:13.956009 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m16:41:13.956009 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m16:41:13.957014 [info ] [Thread-1 (]: 95 of 97 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.02s]
[0m16:41:13.957577 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:41:13.957577 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:41:13.958584 [info ] [Thread-1 (]: 96 of 97 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m16:41:13.958584 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m16:41:13.960126 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:41:13.965325 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:41:13.966349 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:41:13.968529 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:41:13.970022 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:41:13.970022 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m16:41:13.970563 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.971330 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.971330 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:41:13.971863 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:13.973159 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.973711 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m16:41:13.975621 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m16:41:13.975621 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m16:41:13.975621 [info ] [Thread-1 (]: 96 of 97 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.02s]
[0m16:41:13.976632 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:41:13.976632 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:41:13.977800 [info ] [Thread-1 (]: 97 of 97 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m16:41:13.977800 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m16:41:13.977800 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:41:13.982480 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:41:13.982994 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:41:13.986013 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:41:13.987023 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:41:13.988787 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m16:41:13.988787 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:13.989798 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.990303 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:41:13.990303 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m16:41:13.991309 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:13.992330 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m16:41:13.993336 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m16:41:13.994422 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m16:41:13.994929 [info ] [Thread-1 (]: 97 of 97 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.02s]
[0m16:41:13.994929 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:41:13.997985 [debug] [MainThread]: Using duckdb connection "master"
[0m16:41:13.998489 [debug] [MainThread]: On master: BEGIN
[0m16:41:13.999017 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:41:13.999864 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:41:14.000995 [debug] [MainThread]: On master: COMMIT
[0m16:41:14.001512 [debug] [MainThread]: Using duckdb connection "master"
[0m16:41:14.001512 [debug] [MainThread]: On master: COMMIT
[0m16:41:14.002049 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:41:14.003058 [debug] [MainThread]: On master: Close
[0m16:41:14.003058 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:41:14.003564 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:41:14.003564 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:41:14.003564 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m16:41:14.004087 [info ] [MainThread]: 
[0m16:41:14.004599 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 9.78 seconds (9.78s).
[0m16:41:14.016130 [debug] [MainThread]: Command end result
[0m16:41:14.059062 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:41:14.062658 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:41:14.078275 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:41:14.078782 [info ] [MainThread]: 
[0m16:41:14.079318 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:41:14.080363 [info ] [MainThread]: 
[0m16:41:14.080363 [info ] [MainThread]: Done. PASS=97 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=97
[0m16:41:14.081772 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:41:14.083895 [debug] [MainThread]: Command `dbt build` succeeded at 16:41:14.083382 after 13.88 seconds
[0m16:41:14.083895 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E5536D80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E7CE43E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002C3E5CDB1A0>]}
[0m16:41:14.084903 [debug] [MainThread]: Flushing usage events
[0m16:41:14.801725 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:41:44.414218 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC43E8C80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC43EB8F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC43E82C0>]}


============================== 16:41:44.420866 | ffe20d7e-c277-48c9-9e43-cc31dd4781dc ==============================
[0m16:41:44.420866 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:41:44.421382 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:41:44.700201 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC5998200>]}
[0m16:41:44.776644 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC3E1F8F0>]}
[0m16:41:44.781315 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:41:45.133055 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:41:45.440405 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m16:41:45.440405 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m16:41:45.440405 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m16:41:45.449402 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:41:45.500476 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC5998BC0>]}
[0m16:41:45.709221 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:41:45.713469 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:41:45.926597 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC5E83890>]}
[0m16:41:45.927595 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:41:45.940701 [info ] [MainThread]: 
[0m16:41:45.942711 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:41:45.943217 [info ] [MainThread]: 
[0m16:41:45.944226 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:41:45.955404 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:41:46.179321 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:41:46.179834 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:41:46.179834 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:41:47.054560 [debug] [ThreadPool]: SQL status: OK in 0.874 seconds
[0m16:41:47.058266 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:41:47.059365 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:41:47.060923 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:41:47.067761 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:41:47.067761 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:41:47.067761 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:41:47.070275 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:41:47.071348 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:41:47.072542 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:41:47.073069 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:41:47.074079 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:41:47.074079 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:41:47.075180 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:41:47.075180 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:41:47.076077 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:41:47.076678 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:41:47.076678 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:41:47.076678 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:41:47.082754 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:41:47.089974 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:41:47.090483 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:41:47.090483 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:41:47.091031 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:41:47.091031 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:41:47.091031 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:41:47.113366 [debug] [ThreadPool]: SQL status: OK in 0.021 seconds
[0m16:41:47.114912 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:41:47.116523 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:41:47.117052 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:41:47.117563 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC641A3F0>]}
[0m16:41:47.118098 [debug] [MainThread]: Using duckdb connection "master"
[0m16:41:47.118098 [debug] [MainThread]: On master: BEGIN
[0m16:41:47.118098 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:41:47.119102 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:41:47.119102 [debug] [MainThread]: On master: COMMIT
[0m16:41:47.119611 [debug] [MainThread]: Using duckdb connection "master"
[0m16:41:47.119611 [debug] [MainThread]: On master: COMMIT
[0m16:41:47.120190 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:41:47.120190 [debug] [MainThread]: On master: Close
[0m16:41:47.126564 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:41:47.126564 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:41:47.128069 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:41:47.128069 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:41:47.138724 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:47.139779 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:41:47.167496 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:47.167496 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:47.167496 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:41:47.169071 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:41:47.169666 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:47.170198 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:47.170724 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
    UNION ALL
    SELECT * FROM portfolio_fallback
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:41:47.457233 [debug] [Thread-1 (]: SQL status: OK in 0.286 seconds
[0m16:41:47.468850 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:47.469921 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:41:47.472558 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:47.490858 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:41:47.491857 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:47.492361 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:41:47.500985 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:41:47.508959 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:41:47.508959 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:41:47.510474 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:47.514924 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:41:47.519738 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC57C7A70>]}
[0m16:41:47.520808 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.39s]
[0m16:41:47.521336 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:41:47.521874 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:41:47.522391 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:41:47.522907 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:41:47.523464 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:41:47.527980 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:47.529488 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:41:47.534822 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:47.535825 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:47.537096 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:41:47.537096 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:47.538111 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:47.539103 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:47.539103 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL

    UNION

    -- Fallback: localizações de instituições presentes apenas nas tabelas SCR
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources

UNION

-- Sentinel para instituições sem dados de localização (cidade, uf, regiao = NULL)
SELECT
    md5(cast('' as varchar)) as id_localizacao,
    NULL as cidade,
    NULL as uf,
    NULL as regiao
    );
  
  
[0m16:41:47.599719 [debug] [Thread-1 (]: SQL status: OK in 0.060 seconds
[0m16:41:47.604630 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:47.605181 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:41:47.605755 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:47.607331 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:41:47.607331 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:47.607879 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:41:47.609895 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:47.611908 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:41:47.612440 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:41:47.612958 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:47.613962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:41:47.613962 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC64DEB10>]}
[0m16:41:47.615570 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.09s]
[0m16:41:47.615570 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:41:47.616578 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:41:47.617084 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m16:41:47.618241 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:41:47.619247 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:41:47.622880 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:47.623885 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:41:47.626887 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:47.628927 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:47.629455 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:41:47.629988 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:47.630525 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:47.631061 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:47.631583 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:41:47.649155 [debug] [Thread-1 (]: SQL status: OK in 0.017 seconds
[0m16:41:47.653960 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:47.654473 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:41:47.656568 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:47.658700 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:41:47.659229 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:47.659755 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:41:47.660802 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:47.662831 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:41:47.663838 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:41:47.665882 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:47.667402 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:41:47.667907 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC64EBA70>]}
[0m16:41:47.667907 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.05s]
[0m16:41:47.668914 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:41:47.669484 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:41:47.670028 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:41:47.670028 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:41:47.671575 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:41:47.682067 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:47.683676 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:41:47.688475 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:47.689982 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:47.689982 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:41:47.690989 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:47.690989 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:47.691989 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:47.694004 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:41:48.353795 [debug] [Thread-1 (]: SQL status: OK in 0.659 seconds
[0m16:41:48.358566 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:48.360077 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:41:48.360077 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:48.364394 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:41:48.365483 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:48.367515 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:41:48.578137 [debug] [Thread-1 (]: SQL status: OK in 0.209 seconds
[0m16:41:48.582903 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:41:48.583912 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:41:48.584419 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:48.589385 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:41:48.589892 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC6514050>]}
[0m16:41:48.591158 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.92s]
[0m16:41:48.592689 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:41:48.592689 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:41:48.594902 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m16:41:48.595460 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:41:48.596976 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:41:48.604318 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:48.606348 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:41:48.611595 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:48.613114 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:48.613114 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:41:48.613114 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:48.616186 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:48.617126 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:48.617664 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:41:49.037144 [debug] [Thread-1 (]: SQL status: OK in 0.419 seconds
[0m16:41:49.043523 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:49.043523 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m16:41:49.045030 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:49.047605 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:41:49.049210 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:49.050219 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:41:49.061731 [debug] [Thread-1 (]: SQL status: OK in 0.011 seconds
[0m16:41:49.065765 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:41:49.066272 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m16:41:49.066272 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:49.067788 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:41:49.069295 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC13D2570>]}
[0m16:41:49.070304 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.47s]
[0m16:41:49.070304 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:41:49.071514 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:41:49.071514 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m16:41:49.071514 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:41:49.071514 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:41:49.076685 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:49.078192 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:41:49.081746 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:49.083320 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:49.083828 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:41:49.083828 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:49.084837 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:49.084837 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:49.085835 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:41:49.147297 [debug] [Thread-1 (]: SQL status: OK in 0.062 seconds
[0m16:41:49.153188 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:49.153750 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m16:41:49.154305 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:49.155951 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:41:49.155951 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:49.156513 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:41:49.177168 [debug] [Thread-1 (]: SQL status: OK in 0.020 seconds
[0m16:41:49.179833 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:41:49.180365 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m16:41:49.181507 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:49.183097 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:41:49.183603 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC65256D0>]}
[0m16:41:49.184133 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.11s]
[0m16:41:49.184659 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:41:49.184659 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:41:49.185668 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m16:41:49.185668 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:41:49.186706 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:41:49.190783 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:49.192840 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:41:49.195429 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:49.196939 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:49.197533 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:41:49.197533 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:49.198086 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:49.198086 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:49.198086 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:41:49.254706 [debug] [Thread-1 (]: SQL status: OK in 0.056 seconds
[0m16:41:49.257808 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:49.258813 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:41:49.259812 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:49.260853 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:41:49.260853 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:49.261868 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:41:49.342685 [debug] [Thread-1 (]: SQL status: OK in 0.081 seconds
[0m16:41:49.347565 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:41:49.347565 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:41:49.348613 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:49.349673 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:41:49.350208 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC5CBE750>]}
[0m16:41:49.350208 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.16s]
[0m16:41:49.350762 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:41:49.351314 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:41:49.351314 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:41:49.351857 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:41:49.352463 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:41:49.356239 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:49.357296 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:41:49.360306 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:49.360627 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:49.362134 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:41:49.362654 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:49.362654 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:49.363663 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:49.363663 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:41:50.044511 [debug] [Thread-1 (]: SQL status: OK in 0.679 seconds
[0m16:41:50.050955 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:50.051956 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:41:50.053460 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:50.055762 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:41:50.056511 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:50.060028 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:41:50.189990 [debug] [Thread-1 (]: SQL status: OK in 0.129 seconds
[0m16:41:50.192005 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:41:50.193021 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:41:50.193568 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:50.194641 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:41:50.195648 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC654F320>]}
[0m16:41:50.195648 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.84s]
[0m16:41:50.196648 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:41:50.197154 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:41:50.197154 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m16:41:50.198160 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:41:50.198160 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:41:50.199667 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:50.202344 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:41:50.205088 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:50.206102 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:50.206102 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:41:50.207157 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:50.207665 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:50.208193 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:50.208193 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:41:50.213219 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:41:50.216321 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:50.216826 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:41:50.217332 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:50.217332 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:41:50.218885 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:50.218885 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:41:50.223054 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:41:50.226100 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:41:50.226100 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:41:50.226100 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:50.228107 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:41:50.228615 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC5941370>]}
[0m16:41:50.229622 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.03s]
[0m16:41:50.229622 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:41:50.229622 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:41:50.231187 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:41:50.231187 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:41:50.231187 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:41:50.234332 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:50.236887 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:41:50.240086 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:50.241541 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:50.242048 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:41:50.242048 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:50.243091 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:50.243091 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:50.243091 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:41:50.274137 [debug] [Thread-1 (]: SQL status: OK in 0.031 seconds
[0m16:41:50.277141 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:50.278143 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:41:50.278661 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:50.279674 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:41:50.279674 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:50.279674 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:41:50.287958 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:41:50.290521 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:41:50.290521 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:41:50.292046 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:50.293139 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:41:50.293139 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FD330DF10>]}
[0m16:41:50.294152 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.06s]
[0m16:41:50.294659 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:41:50.294659 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:41:50.295664 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:41:50.295664 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:41:50.295664 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:41:50.300731 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:50.301948 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:41:50.305731 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:50.307242 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:50.307242 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:41:50.307242 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:50.308306 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:50.308306 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:50.308306 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:41:50.804733 [debug] [Thread-1 (]: SQL status: OK in 0.495 seconds
[0m16:41:50.807829 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:50.807829 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:41:50.808831 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:50.810411 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:41:50.810411 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:50.810411 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:41:51.021505 [debug] [Thread-1 (]: SQL status: OK in 0.210 seconds
[0m16:41:51.024688 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:41:51.024688 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:41:51.025541 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:51.027183 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:41:51.028191 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC599AD50>]}
[0m16:41:51.029397 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.73s]
[0m16:41:51.030407 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:41:51.031965 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:41:51.032508 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m16:41:51.034548 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m16:41:51.035190 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:41:51.035835 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:41:51.063779 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:41:51.064320 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:41:51.064841 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.065372 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.065372 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:41:51.065900 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m16:41:51.066932 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.078086 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:41:51.078086 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:51.086846 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:41:51.086846 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:41:51.087853 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: ROLLBACK
[0m16:41:51.100774 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_atividade'
[0m16:41:51.101295 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:41:51.104415 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_atividade (seeds\seed_dim_atividade.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv"
[0m16:41:51.104415 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC650DF10>]}
[0m16:41:51.104921 [error] [Thread-1 (]: 12 of 97 ERROR loading seed file main.seed_dim_atividade ....................... [[31mERROR[0m in 0.07s]
[0m16:41:51.104921 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:41:51.105929 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:41:51.107465 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_atividade' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_atividade (seeds\seed_dim_atividade.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv".
[0m16:41:51.106433 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m16:41:51.108003 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m16:41:51.109010 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:41:51.109010 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:41:51.113128 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:41:51.113128 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m16:41:51.113128 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.114634 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.115644 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:41:51.116153 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m16:41:51.117270 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.118887 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:41:51.119428 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:51.120492 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:41:51.120492 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:41:51.121540 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: ROLLBACK
[0m16:41:51.125479 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_classe_instituicao'
[0m16:41:51.126016 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m16:41:51.132892 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv"
[0m16:41:51.134010 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FD32F9040>]}
[0m16:41:51.135076 [error] [Thread-1 (]: 13 of 97 ERROR loading seed file main.seed_dim_classe_instituicao .............. [[31mERROR[0m in 0.03s]
[0m16:41:51.135859 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:41:51.136919 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:41:51.137545 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_classe_instituicao' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv".
[0m16:41:51.138633 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m16:41:51.139164 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m16:41:51.139677 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:41:51.140263 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:41:51.143947 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:41:51.144464 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m16:41:51.144998 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.146069 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.146069 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:41:51.146583 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m16:41:51.147153 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:51.148791 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:41:51.149346 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:51.151187 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:41:51.151795 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:41:51.152373 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: ROLLBACK
[0m16:41:51.155123 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_consolidado'
[0m16:41:51.156214 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m16:41:51.160671 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv"
[0m16:41:51.161203 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FD33B2120>]}
[0m16:41:51.162808 [error] [Thread-1 (]: 14 of 97 ERROR loading seed file main.seed_dim_consolidado ..................... [[31mERROR[0m in 0.02s]
[0m16:41:51.163888 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:41:51.164963 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:41:51.165498 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_consolidado' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv".
[0m16:41:51.166590 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m16:41:51.167673 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m16:41:51.168428 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:41:51.168950 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:41:51.174364 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:41:51.174900 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m16:41:51.175432 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.175960 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.176493 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:41:51.176493 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m16:41:51.177582 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.179375 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:41:51.180002 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:51.182060 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:41:51.183044 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:41:51.184403 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: ROLLBACK
[0m16:41:51.189306 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_controle'
[0m16:41:51.189306 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m16:41:51.194717 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_controle (seeds\seed_dim_controle.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv"
[0m16:41:51.195249 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FD331ECC0>]}
[0m16:41:51.195782 [error] [Thread-1 (]: 15 of 97 ERROR loading seed file main.seed_dim_controle ........................ [[31mERROR[0m in 0.03s]
[0m16:41:51.196826 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:41:51.196826 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:41:51.197832 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_controle' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_controle (seeds\seed_dim_controle.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv".
[0m16:41:51.199349 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m16:41:51.200879 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:41:51.201385 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:41:51.201938 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:41:51.207202 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:41:51.207724 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:41:51.207724 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.208732 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.208732 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:41:51.208732 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m16:41:51.210729 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.211753 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:41:51.211753 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:51.214785 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:41:51.214785 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:41:51.216306 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: ROLLBACK
[0m16:41:51.218848 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento'
[0m16:41:51.219391 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:41:51.223076 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_faixa_vencimento (seeds\seed_dim_faixa_vencimento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv"
[0m16:41:51.223076 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC6489CD0>]}
[0m16:41:51.224083 [error] [Thread-1 (]: 16 of 97 ERROR loading seed file main.seed_dim_faixa_vencimento ................ [[31mERROR[0m in 0.02s]
[0m16:41:51.224083 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:41:51.224083 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:41:51.225595 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_faixa_vencimento (seeds\seed_dim_faixa_vencimento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv".
[0m16:41:51.226607 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m16:41:51.226607 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:41:51.228117 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:41:51.228117 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:41:51.232868 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:41:51.233416 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:41:51.233931 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.235017 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.235017 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:41:51.235555 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m16:41:51.236070 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:51.237123 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:41:51.237658 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:51.238744 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:41:51.238744 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:41:51.239283 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: ROLLBACK
[0m16:41:51.243024 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_porte'
[0m16:41:51.243564 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:41:51.246373 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_porte (seeds\seed_dim_porte.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv"
[0m16:41:51.246893 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC64D82F0>]}
[0m16:41:51.247434 [error] [Thread-1 (]: 17 of 97 ERROR loading seed file main.seed_dim_porte ........................... [[31mERROR[0m in 0.02s]
[0m16:41:51.248732 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:41:51.249251 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:41:51.249805 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m16:41:51.250360 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_porte' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_porte (seeds\seed_dim_porte.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv".
[0m16:41:51.250878 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:41:51.251407 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:41:51.251942 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:41:51.257864 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:41:51.258982 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:41:51.258982 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.260504 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.261535 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:41:51.262544 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m16:41:51.264255 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.265312 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:41:51.265849 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:51.267547 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:41:51.268120 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:41:51.269251 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: ROLLBACK
[0m16:41:51.277026 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_produto_credito'
[0m16:41:51.277026 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:41:51.281240 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_produto_credito (seeds\seed_dim_produto_credito.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv"
[0m16:41:51.282340 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC64002C0>]}
[0m16:41:51.283538 [error] [Thread-1 (]: 18 of 97 ERROR loading seed file main.seed_dim_produto_credito ................. [[31mERROR[0m in 0.03s]
[0m16:41:51.284069 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:41:51.284594 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:41:51.285121 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_produto_credito' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_produto_credito (seeds\seed_dim_produto_credito.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv".
[0m16:41:51.285664 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m16:41:51.286195 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:41:51.286723 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:41:51.287261 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:41:51.292770 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:41:51.293343 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:41:51.293911 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.294919 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.295426 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:41:51.295426 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m16:41:51.296433 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.299440 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:41:51.299947 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:51.300957 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:41:51.300957 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:41:51.300957 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: ROLLBACK
[0m16:41:51.306992 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_regiao'
[0m16:41:51.306992 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:41:51.312503 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_regiao (seeds\seed_dim_regiao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv"
[0m16:41:51.313515 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC64A2960>]}
[0m16:41:51.314432 [error] [Thread-1 (]: 19 of 97 ERROR loading seed file main.seed_dim_regiao .......................... [[31mERROR[0m in 0.03s]
[0m16:41:51.315497 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:41:51.316443 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:41:51.318320 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_regiao' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_regiao (seeds\seed_dim_regiao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv".
[0m16:41:51.317580 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m16:41:51.319519 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:41:51.319996 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:41:51.320505 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:41:51.326780 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:41:51.326780 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:41:51.327768 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.328767 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.328767 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:41:51.328767 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m16:41:51.329765 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:51.330765 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:41:51.331767 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:51.333826 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:41:51.333826 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:41:51.333826 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: ROLLBACK
[0m16:41:51.338342 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_risco'
[0m16:41:51.339341 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:41:51.343866 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_risco (seeds\seed_dim_risco.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv"
[0m16:41:51.345871 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC64BD100>]}
[0m16:41:51.347378 [error] [Thread-1 (]: 20 of 97 ERROR loading seed file main.seed_dim_risco ........................... [[31mERROR[0m in 0.03s]
[0m16:41:51.348387 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:41:51.349388 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:41:51.350387 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_risco' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_risco (seeds\seed_dim_risco.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv".
[0m16:41:51.351386 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m16:41:51.351386 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m16:41:51.352896 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:41:51.353907 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:41:51.358415 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:41:51.359426 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m16:41:51.359426 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.360429 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.361428 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:41:51.361428 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m16:41:51.362949 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.363956 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:41:51.364959 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:41:51.365958 [debug] [Thread-1 (]: DuckDB adapter: Error running SQL: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        
[0m16:41:51.366958 [debug] [Thread-1 (]: DuckDB adapter: Rolling back transaction.
[0m16:41:51.366958 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: ROLLBACK
[0m16:41:51.371475 [debug] [Thread-1 (]: Failed to rollback 'seed.bacen_ifdata_analytics.seed_dim_segmento'
[0m16:41:51.373996 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m16:41:51.378001 [debug] [Thread-1 (]: Runtime Error in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv"
[0m16:41:51.380098 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffe20d7e-c277-48c9-9e43-cc31dd4781dc', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC6491C70>]}
[0m16:41:51.381098 [error] [Thread-1 (]: 21 of 97 ERROR loading seed file main.seed_dim_segmento ........................ [[31mERROR[0m in 0.03s]
[0m16:41:51.381098 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:41:51.382610 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:41:51.383628 [debug] [Thread-4 (]: Marking all children of 'seed.bacen_ifdata_analytics.seed_dim_segmento' to be skipped because of status 'error'.  Reason: Runtime Error in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv".
[0m16:41:51.383628 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m16:41:51.385631 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m16:41:51.385631 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:41:51.406302 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:41:51.408028 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:41:51.435766 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:41:51.438111 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:41:51.439318 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m16:41:51.439900 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.440482 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.441046 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:41:51.441046 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.443517 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:51.447553 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m16:41:51.449290 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m16:41:51.450470 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m16:41:51.451704 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.07s]
[0m16:41:51.452814 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:41:51.453420 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:41:51.454019 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m16:41:51.454612 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m16:41:51.455184 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:41:51.461330 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:41:51.463914 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:41:51.467422 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:41:51.468432 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:41:51.469434 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m16:41:51.469434 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.471429 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.471429 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:41:51.471429 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.472941 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.475952 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m16:41:51.477465 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m16:41:51.478483 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m16:41:51.479476 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m16:41:51.479476 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:41:51.480475 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:41:51.480475 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m16:41:51.481476 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m16:41:51.482477 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:41:51.491520 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:41:51.493027 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:41:51.496037 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:41:51.498039 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:41:51.499038 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m16:41:51.499038 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.500348 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.501353 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:41:51.501353 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:41:51.507882 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:41:51.510401 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m16:41:51.512909 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m16:41:51.512909 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m16:41:51.513918 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.03s]
[0m16:41:51.514916 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:41:51.514916 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:41:51.516034 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m16:41:51.516923 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m16:41:51.517923 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:41:51.524452 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:41:51.526975 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:41:51.528974 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:41:51.529974 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:41:51.531484 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m16:41:51.532496 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.534022 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.534022 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:41:51.535018 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.537028 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.538029 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m16:41:51.540031 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m16:41:51.540031 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m16:41:51.541029 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m16:41:51.542029 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:41:51.542539 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:41:51.542539 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m16:41:51.543553 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m16:41:51.543553 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:41:51.555735 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:41:51.557737 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:41:51.565042 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:41:51.567040 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:41:51.568042 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m16:41:51.568042 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.569042 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.570044 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:41:51.571042 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.577100 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:41:51.578102 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m16:41:51.580101 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m16:41:51.580101 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m16:41:51.581099 [info ] [Thread-1 (]: 26 of 97 PASS relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[32mPASS[0m in 0.04s]
[0m16:41:51.582607 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:41:51.582607 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:41:51.582607 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m16:41:51.584201 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m16:41:51.584780 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:41:51.590544 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:41:51.592767 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:41:51.595929 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:41:51.597622 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:41:51.598129 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m16:41:51.598633 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.599794 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.600340 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:41:51.600340 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:41:51.603504 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:51.606004 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m16:41:51.607892 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m16:41:51.607892 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m16:41:51.608954 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.02s]
[0m16:41:51.610006 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:41:51.610530 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:41:51.611076 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m16:41:51.611592 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m16:41:51.611592 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:41:51.617528 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:41:51.619983 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:41:51.623730 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:41:51.625835 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:41:51.626525 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m16:41:51.627070 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.627698 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.628221 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:41:51.628998 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.630147 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.631738 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m16:41:51.632744 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m16:41:51.632744 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m16:41:51.632744 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.02s]
[0m16:41:51.634349 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:41:51.634349 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:41:51.634349 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m16:41:51.634349 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m16:41:51.634349 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:41:51.639853 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:41:51.640864 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:41:51.645100 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:41:51.646109 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:41:51.647616 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m16:41:51.647616 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.647616 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.649176 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:41:51.649176 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:41:51.653271 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:51.655969 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m16:41:51.657573 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m16:41:51.658110 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m16:41:51.658645 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.02s]
[0m16:41:51.659169 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:41:51.659169 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:41:51.660182 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m16:41:51.660182 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m16:41:51.660729 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:41:51.664451 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:41:51.665507 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:41:51.667726 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:41:51.668798 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:41:51.669329 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m16:41:51.669329 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.669865 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.670406 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:41:51.670406 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.672016 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.673235 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m16:41:51.674301 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m16:41:51.674301 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m16:41:51.675425 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:41:51.675967 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:41:51.676565 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:41:51.676565 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m16:41:51.677093 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m16:41:51.677625 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:41:51.683582 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:41:51.684643 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:41:51.686734 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:41:51.688246 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:41:51.688246 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m16:41:51.689752 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.690795 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.690795 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:41:51.692493 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.694586 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.694586 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m16:41:51.696624 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m16:41:51.697188 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m16:41:51.697188 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:41:51.698194 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:41:51.698194 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:41:51.698194 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:51.699195 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m16:41:51.699195 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:41:51.704445 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:41:51.706416 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:41:51.710075 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:41:51.711647 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:41:51.711647 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m16:41:51.712657 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.713748 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.713748 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:41:51.713748 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.717445 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:41:51.720120 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m16:41:51.721719 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m16:41:51.721719 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m16:41:51.723237 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:51.723237 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:41:51.723237 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:41:51.724245 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:51.724245 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m16:41:51.724245 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:41:51.729345 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:41:51.730908 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:41:51.732456 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:41:51.735065 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:41:51.735065 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m16:41:51.736065 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.736576 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.737084 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:41:51.737084 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.745751 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:41:51.747277 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m16:41:51.747804 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m16:41:51.749319 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m16:41:51.749319 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:41:51.749319 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:41:51.749319 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:41:51.750889 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m16:41:51.751897 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m16:41:51.751897 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:41:51.756050 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:41:51.757612 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:41:51.760138 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:41:51.760645 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:41:51.761651 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m16:41:51.761651 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.762660 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.762660 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:41:51.762660 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.763722 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.765230 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m16:41:51.766237 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m16:41:51.766744 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m16:41:51.767293 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:41:51.767293 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:41:51.768300 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:41:51.768805 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m16:41:51.769353 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m16:41:51.769353 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:41:51.772889 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:41:51.773896 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:41:51.776904 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:41:51.778959 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:41:51.779489 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m16:41:51.779489 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.779489 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.779489 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:41:51.781066 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.781066 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.782667 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m16:41:51.784246 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m16:41:51.784246 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m16:41:51.784246 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:41:51.785813 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:41:51.785813 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:41:51.786821 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:51.786821 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m16:41:51.786821 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:41:51.792981 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:41:51.794494 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:41:51.797521 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:41:51.798532 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:41:51.799530 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m16:41:51.799530 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.799530 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.799530 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:41:51.801259 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.804846 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:51.806365 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m16:41:51.807455 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m16:41:51.807455 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m16:41:51.807455 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:51.808463 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:41:51.808463 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:41:51.808463 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:51.809970 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m16:41:51.810544 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:41:51.815607 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:41:51.818134 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:41:51.821185 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:41:51.823718 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:41:51.823718 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m16:41:51.823718 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.824747 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.824747 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:41:51.825718 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.832691 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:41:51.834261 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m16:41:51.835818 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m16:41:51.835818 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m16:41:51.836829 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:41:51.837338 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:41:51.837338 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:41:51.837338 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m16:41:51.838348 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m16:41:51.838348 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:41:51.842552 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:41:51.844093 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:41:51.846609 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:41:51.847116 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:41:51.848125 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m16:41:51.848125 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.848125 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:51.848125 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:41:51.849632 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.849632 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:51.851152 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m16:41:51.852357 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m16:41:51.852357 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m16:41:51.852869 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.01s]
[0m16:41:51.853379 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:41:51.853931 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:41:51.853931 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m16:41:51.854508 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m16:41:51.855052 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:41:51.858080 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:41:51.859079 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:41:51.861592 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:41:51.861592 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:41:51.862599 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m16:41:51.863104 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.863104 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.863104 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:41:51.864110 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.865111 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.866728 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m16:41:51.867379 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m16:41:51.869002 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m16:41:51.869616 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.01s]
[0m16:41:51.870213 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:41:51.870213 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:41:51.871296 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:51.871813 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m16:41:51.872328 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:41:51.879919 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:41:51.879919 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:41:51.882735 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:41:51.884403 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:41:51.884403 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m16:41:51.885996 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.885996 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:51.885996 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:41:51.885996 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.889522 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:51.890529 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m16:41:51.892160 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m16:41:51.892686 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m16:41:51.892686 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:51.892686 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:41:51.894254 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:41:51.894854 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:51.894854 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m16:41:51.894854 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:41:51.899396 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:41:51.900997 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:41:51.903769 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:41:51.905287 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:41:51.906310 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m16:41:51.906310 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.906310 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.906310 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:41:51.906310 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.912147 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:41:51.913664 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m16:41:51.914663 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m16:41:51.915173 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m16:41:51.915681 [info ] [Thread-1 (]: 41 of 97 PASS relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:41:51.915681 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:41:51.915681 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:41:51.916690 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m16:41:51.917200 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m16:41:51.917200 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:41:51.920231 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:41:51.922504 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:41:51.925615 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:41:51.926625 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:41:51.926625 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m16:41:51.928134 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.928134 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:51.928134 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:41:51.928134 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.929730 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.931402 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m16:41:51.932933 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m16:41:51.932933 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m16:41:51.933943 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.02s]
[0m16:41:51.934459 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:41:51.934459 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:41:51.935965 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m16:41:51.935965 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m16:41:51.935965 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:41:51.939307 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:41:51.940306 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:41:51.942707 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:41:51.942707 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:41:51.942707 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m16:41:51.944251 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.944827 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:51.944827 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:41:51.944827 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.945830 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:51.946830 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m16:41:51.947423 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m16:41:51.947423 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m16:41:51.948426 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.01s]
[0m16:41:51.948426 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:41:51.948426 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:41:51.949427 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:51.949427 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m16:41:51.949931 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:41:51.953497 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:41:51.954513 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:41:51.957149 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:41:51.958818 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:41:51.958818 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m16:41:51.958818 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.959818 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.960327 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:41:51.960327 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.963082 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:51.963082 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m16:41:51.966111 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m16:41:51.966617 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m16:41:51.966617 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:51.967623 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:41:51.968130 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:41:51.968130 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:51.968130 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m16:41:51.969135 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:41:51.974109 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:41:51.975616 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:41:51.979781 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:41:51.981241 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:41:51.982767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m16:41:51.983087 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:51.984093 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:51.985102 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:41:51.985102 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:51.990127 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:41:51.992645 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m16:41:51.993164 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m16:41:51.994173 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m16:41:51.994680 [info ] [Thread-1 (]: 45 of 97 PASS relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:41:51.994680 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:41:51.995686 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:41:51.996191 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m16:41:51.996706 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m16:41:51.997385 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:41:52.002019 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:41:52.004041 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:41:52.007708 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:41:52.010227 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:41:52.011888 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m16:41:52.012900 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.013419 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.014928 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:41:52.015848 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.017932 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.021280 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m16:41:52.022795 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m16:41:52.023805 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m16:41:52.025806 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.03s]
[0m16:41:52.026822 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:41:52.026822 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:41:52.028668 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m16:41:52.029675 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m16:41:52.031293 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:41:52.038752 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:41:52.039854 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:41:52.042912 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:41:52.045514 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:41:52.047026 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m16:41:52.047026 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.048037 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.048037 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:41:52.048037 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.049545 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.049545 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m16:41:52.051186 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m16:41:52.051186 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m16:41:52.052808 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:41:52.053816 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:41:52.054320 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:41:52.054838 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:52.054838 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m16:41:52.054838 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:41:52.060932 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:41:52.063628 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:41:52.067678 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:41:52.067678 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:41:52.069289 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m16:41:52.069289 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.069289 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:52.070300 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:41:52.070805 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.076376 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:41:52.077892 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m16:41:52.079491 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m16:41:52.079491 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m16:41:52.079491 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:52.081099 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:41:52.081099 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:41:52.082633 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:52.082633 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m16:41:52.082633 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:41:52.088440 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:41:52.090963 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:41:52.097154 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:41:52.098164 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:41:52.099676 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m16:41:52.099676 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.099676 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.101279 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:41:52.101279 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.109802 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:41:52.110401 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m16:41:52.112664 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m16:41:52.113677 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m16:41:52.113677 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:41:52.115183 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:41:52.115689 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:41:52.115689 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m16:41:52.116697 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m16:41:52.117203 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:41:52.121345 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:41:52.123144 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:41:52.126223 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:41:52.127231 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:41:52.127231 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m16:41:52.127231 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.128255 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:52.128255 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:41:52.128255 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.129939 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.130947 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m16:41:52.131453 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m16:41:52.132458 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m16:41:52.132458 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:41:52.132458 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:41:52.133465 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:41:52.133465 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m16:41:52.133972 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m16:41:52.133972 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:41:52.137993 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:41:52.139994 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:41:52.142005 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:41:52.143035 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:41:52.144547 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m16:41:52.144547 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.145554 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.146556 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:41:52.147062 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.148581 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.149600 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m16:41:52.151180 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m16:41:52.151812 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m16:41:52.151812 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:41:52.152827 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:41:52.153383 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:41:52.154010 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:52.154574 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m16:41:52.155170 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:41:52.161716 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:41:52.163814 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:41:52.165326 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:41:52.167346 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:41:52.167346 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m16:41:52.167346 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.167346 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.168916 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:41:52.170183 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.171840 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.174116 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m16:41:52.175114 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m16:41:52.175114 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m16:41:52.176120 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:52.176120 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:41:52.177121 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:41:52.177121 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:52.177121 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m16:41:52.178632 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:41:52.182744 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:41:52.184367 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:41:52.187159 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:41:52.188165 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:41:52.189675 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m16:41:52.189675 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.189675 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:52.190685 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:41:52.190685 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.193190 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:52.195553 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m16:41:52.197058 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m16:41:52.197562 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m16:41:52.197562 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:41:52.198567 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:41:52.198567 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:41:52.199570 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m16:41:52.200076 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m16:41:52.200076 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:41:52.203654 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:41:52.204716 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:41:52.207831 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:41:52.208838 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:41:52.208838 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m16:41:52.209842 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.210349 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.210349 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:41:52.210349 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.211909 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.215787 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m16:41:52.216474 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m16:41:52.217486 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m16:41:52.217486 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:41:52.217486 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:41:52.217486 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:41:52.219111 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m16:41:52.219754 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m16:41:52.220392 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:41:52.223213 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:41:52.224219 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:41:52.226250 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:41:52.227783 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:41:52.229372 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m16:41:52.229372 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.229372 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.229372 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:41:52.230945 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.231952 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.232958 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m16:41:52.234473 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m16:41:52.234473 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m16:41:52.235982 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:41:52.235982 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:41:52.236991 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:41:52.237498 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:52.237498 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m16:41:52.238505 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:41:52.248143 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:41:52.249650 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:41:52.252954 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:41:52.254064 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:41:52.255073 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m16:41:52.256071 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.256071 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.256071 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:41:52.257576 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.259583 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:41:52.261023 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m16:41:52.262547 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m16:41:52.263554 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m16:41:52.263554 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:41:52.265672 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:41:52.265672 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:41:52.265672 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:52.266680 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m16:41:52.267589 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:41:52.272318 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:41:52.272846 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:41:52.275856 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:41:52.276854 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:41:52.276854 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m16:41:52.277854 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.278361 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.278361 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:41:52.278361 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.282902 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:52.283912 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m16:41:52.284958 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m16:41:52.285958 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m16:41:52.285958 [info ] [Thread-1 (]: 57 of 97 PASS relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:41:52.285958 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:41:52.287102 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:41:52.287102 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m16:41:52.288114 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m16:41:52.288626 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:41:52.292147 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:41:52.292655 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:41:52.294860 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:41:52.295869 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:41:52.296869 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m16:41:52.297375 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.297375 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.298382 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:41:52.298382 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.299385 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.300900 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m16:41:52.301478 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m16:41:52.302031 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m16:41:52.302549 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.01s]
[0m16:41:52.302549 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:41:52.303558 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:41:52.303558 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m16:41:52.304065 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m16:41:52.304580 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:41:52.310174 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:41:52.311702 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:41:52.314824 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:41:52.315387 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:41:52.315387 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m16:41:52.316394 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.316898 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:41:52.316898 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:41:52.317402 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.318409 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.320028 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m16:41:52.320028 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m16:41:52.320028 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m16:41:52.321625 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.02s]
[0m16:41:52.321625 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:41:52.322629 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:41:52.323133 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:41:52.323133 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m16:41:52.324138 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:41:52.328150 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:41:52.329156 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:41:52.331668 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:41:52.333203 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:41:52.334723 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m16:41:52.335250 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.336310 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.336835 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:41:52.336835 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.340514 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:41:52.341519 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m16:41:52.343025 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m16:41:52.343025 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m16:41:52.344031 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:41:52.344535 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:41:52.344535 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:41:52.345544 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:41:52.347048 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m16:41:52.347048 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:41:52.352146 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:41:52.354203 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:41:52.357274 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:41:52.359257 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:41:52.359792 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m16:41:52.360840 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:41:52.361375 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:41:52.361917 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:41:52.362450 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:41:52.369208 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:41:52.370270 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m16:41:52.371778 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m16:41:52.371778 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m16:41:52.373293 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:41:52.374301 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:41:52.374301 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:41:52.375311 [info ] [Thread-1 (]: 62 of 97 SKIP relation main.dim_atividade ...................................... [[33mSKIP[0m]
[0m16:41:52.375311 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:41:52.376310 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:41:52.376310 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_atividade' to be skipped because of status 'skipped'. 
[0m16:41:52.376310 [info ] [Thread-1 (]: 63 of 97 SKIP relation main.dim_classe_instituicao ............................. [[33mSKIP[0m]
[0m16:41:52.377817 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:41:52.377817 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:41:52.377817 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_classe_instituicao' to be skipped because of status 'skipped'. 
[0m16:41:52.377817 [info ] [Thread-1 (]: 64 of 97 SKIP relation main.dim_consolidado .................................... [[33mSKIP[0m]
[0m16:41:52.379411 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:41:52.379411 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:41:52.379411 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_consolidado' to be skipped because of status 'skipped'. 
[0m16:41:52.380992 [info ] [Thread-1 (]: 65 of 97 SKIP relation main.dim_controle ....................................... [[33mSKIP[0m]
[0m16:41:52.382003 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:41:52.382510 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:41:52.382510 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_controle' to be skipped because of status 'skipped'. 
[0m16:41:52.384126 [info ] [Thread-1 (]: 66 of 97 SKIP relation main.dim_faixa_vencimento ............................... [[33mSKIP[0m]
[0m16:41:52.385140 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:41:52.385646 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:41:52.385646 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_faixa_vencimento' to be skipped because of status 'skipped'. 
[0m16:41:52.385646 [info ] [Thread-1 (]: 67 of 97 SKIP relation main.dim_porte .......................................... [[33mSKIP[0m]
[0m16:41:52.387160 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:41:52.387160 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:41:52.388168 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_porte' to be skipped because of status 'skipped'. 
[0m16:41:52.388168 [info ] [Thread-1 (]: 68 of 97 SKIP relation main.dim_produto_credito ................................ [[33mSKIP[0m]
[0m16:41:52.389166 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:41:52.390671 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:41:52.390671 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_produto_credito' to be skipped because of status 'skipped'. 
[0m16:41:52.390671 [info ] [Thread-1 (]: 69 of 97 SKIP relation main.dim_regiao ......................................... [[33mSKIP[0m]
[0m16:41:52.392179 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:41:52.392699 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:41:52.393230 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_regiao' to be skipped because of status 'skipped'. 
[0m16:41:52.393757 [info ] [Thread-1 (]: 70 of 97 SKIP relation main.dim_risco .......................................... [[33mSKIP[0m]
[0m16:41:52.394814 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:41:52.394814 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:41:52.395337 [info ] [Thread-1 (]: 71 of 97 SKIP relation main.dim_segmento ....................................... [[33mSKIP[0m]
[0m16:41:52.395337 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_risco' to be skipped because of status 'skipped'. 
[0m16:41:52.395860 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:41:52.396909 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:41:52.396909 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.dim_segmento' to be skipped because of status 'skipped'. 
[0m16:41:52.397436 [info ] [Thread-1 (]: 72 of 97 SKIP test not_null_dim_classe_instituicao_id_classe ................... [[33mSKIP[0m]
[0m16:41:52.397965 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:41:52.398493 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:41:52.398493 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267' to be skipped because of status 'skipped'. 
[0m16:41:52.399019 [info ] [Thread-1 (]: 73 of 97 SKIP test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[33mSKIP[0m]
[0m16:41:52.399527 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:41:52.399527 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:41:52.399527 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0' to be skipped because of status 'skipped'. 
[0m16:41:52.399527 [info ] [Thread-1 (]: 74 of 97 SKIP test unique_dim_classe_instituicao_id_classe ..................... [[33mSKIP[0m]
[0m16:41:52.399527 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:41:52.401064 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:41:52.401638 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19' to be skipped because of status 'skipped'. 
[0m16:41:52.402266 [info ] [Thread-1 (]: 75 of 97 SKIP test not_null_dim_consolidado_id_consolidado ..................... [[33mSKIP[0m]
[0m16:41:52.402788 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:41:52.403874 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:41:52.404479 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340' to be skipped because of status 'skipped'. 
[0m16:41:52.404479 [info ] [Thread-1 (]: 76 of 97 SKIP test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[33mSKIP[0m]
[0m16:41:52.406201 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:41:52.406734 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:41:52.407265 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e' to be skipped because of status 'skipped'. 
[0m16:41:52.407800 [info ] [Thread-1 (]: 77 of 97 SKIP test unique_dim_consolidado_id_consolidado ....................... [[33mSKIP[0m]
[0m16:41:52.408856 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:41:52.408856 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:41:52.409381 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862' to be skipped because of status 'skipped'. 
[0m16:41:52.409910 [info ] [Thread-1 (]: 78 of 97 SKIP test not_null_dim_controle_id_controle ........................... [[33mSKIP[0m]
[0m16:41:52.410444 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:41:52.410966 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:41:52.410966 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21' to be skipped because of status 'skipped'. 
[0m16:41:52.411488 [info ] [Thread-1 (]: 79 of 97 SKIP test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[33mSKIP[0m]
[0m16:41:52.412032 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:41:52.412032 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:41:52.412543 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f' to be skipped because of status 'skipped'. 
[0m16:41:52.412543 [info ] [Thread-1 (]: 80 of 97 SKIP test unique_dim_controle_id_controle ............................. [[33mSKIP[0m]
[0m16:41:52.413089 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:41:52.413089 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:41:52.413089 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c' to be skipped because of status 'skipped'. 
[0m16:41:52.414094 [info ] [Thread-1 (]: 81 of 97 SKIP relation main.fato_carteira_credito_atividade .................... [[33mSKIP[0m]
[0m16:41:52.414094 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:41:52.415094 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:41:52.415094 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_atividade' to be skipped because of status 'skipped'. 
[0m16:41:52.415599 [info ] [Thread-1 (]: 82 of 97 SKIP relation main.fato_carteira_credito_porte ........................ [[33mSKIP[0m]
[0m16:41:52.415599 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:41:52.416605 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:41:52.416605 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_porte' to be skipped because of status 'skipped'. 
[0m16:41:52.417109 [info ] [Thread-1 (]: 83 of 97 SKIP relation main.fato_carteira_credito_produto ...................... [[33mSKIP[0m]
[0m16:41:52.418150 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:41:52.418150 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:41:52.418150 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_carteira_credito_produto' to be skipped because of status 'skipped'. 
[0m16:41:52.419156 [info ] [Thread-1 (]: 84 of 97 SKIP relation main.fato_regiao_credito ................................ [[33mSKIP[0m]
[0m16:41:52.419660 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:41:52.420209 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:41:52.420209 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_regiao_credito' to be skipped because of status 'skipped'. 
[0m16:41:52.420209 [info ] [Thread-1 (]: 85 of 97 SKIP relation main.fato_risco_credito ................................. [[33mSKIP[0m]
[0m16:41:52.421214 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:41:52.422867 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:41:52.422867 [debug] [Thread-4 (]: Marking all children of 'model.bacen_ifdata_analytics.fato_risco_credito' to be skipped because of status 'skipped'. 
[0m16:41:52.422867 [info ] [Thread-1 (]: 86 of 97 SKIP test not_null_dim_segmento_id_segmento ........................... [[33mSKIP[0m]
[0m16:41:52.423878 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:41:52.424874 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:41:52.424874 [info ] [Thread-1 (]: 87 of 97 SKIP test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[33mSKIP[0m]
[0m16:41:52.424874 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e' to be skipped because of status 'skipped'. 
[0m16:41:52.426381 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:41:52.426381 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:41:52.426381 [info ] [Thread-1 (]: 88 of 97 SKIP test unique_dim_segmento_id_segmento ............................. [[33mSKIP[0m]
[0m16:41:52.427902 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e' to be skipped because of status 'skipped'. 
[0m16:41:52.427902 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:41:52.429474 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:41:52.429474 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a' to be skipped because of status 'skipped'. 
[0m16:41:52.429474 [info ] [Thread-1 (]: 89 of 97 SKIP test not_null_fato_carteira_credito_atividade_id_instituicao ..... [[33mSKIP[0m]
[0m16:41:52.431067 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:41:52.431067 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:41:52.431067 [info ] [Thread-1 (]: 90 of 97 SKIP test not_null_fato_carteira_credito_porte_id_instituicao ......... [[33mSKIP[0m]
[0m16:41:52.431067 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1' to be skipped because of status 'skipped'. 
[0m16:41:52.433170 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:41:52.433906 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:41:52.434440 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74' to be skipped because of status 'skipped'. 
[0m16:41:52.434973 [info ] [Thread-1 (]: 91 of 97 SKIP test not_null_fato_carteira_credito_produto_id_data .............. [[33mSKIP[0m]
[0m16:41:52.436035 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:41:52.436570 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:41:52.436570 [info ] [Thread-1 (]: 92 of 97 SKIP test not_null_fato_carteira_credito_produto_id_instituicao ....... [[33mSKIP[0m]
[0m16:41:52.437091 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:41:52.437610 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:41:52.437610 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5' to be skipped because of status 'skipped'. 
[0m16:41:52.438134 [info ] [Thread-1 (]: 93 of 97 SKIP test not_null_fato_regiao_credito_id_instituicao ................. [[33mSKIP[0m]
[0m16:41:52.438668 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d' to be skipped because of status 'skipped'. 
[0m16:41:52.438668 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:41:52.440185 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:41:52.440185 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836' to be skipped because of status 'skipped'. 
[0m16:41:52.440185 [info ] [Thread-1 (]: 94 of 97 SKIP test not_null_fato_regiao_credito_id_regiao ...................... [[33mSKIP[0m]
[0m16:41:52.441192 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:41:52.441192 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:41:52.441192 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21' to be skipped because of status 'skipped'. 
[0m16:41:52.442699 [info ] [Thread-1 (]: 95 of 97 SKIP test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[33mSKIP[0m]
[0m16:41:52.442699 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:41:52.442699 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:41:52.444261 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5' to be skipped because of status 'skipped'. 
[0m16:41:52.444261 [info ] [Thread-1 (]: 96 of 97 SKIP test not_null_fato_risco_credito_id_instituicao .................. [[33mSKIP[0m]
[0m16:41:52.444833 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:41:52.444833 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:41:52.445840 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4' to be skipped because of status 'skipped'. 
[0m16:41:52.445840 [info ] [Thread-1 (]: 97 of 97 SKIP test not_null_fato_risco_credito_id_nivel_risco .................. [[33mSKIP[0m]
[0m16:41:52.445840 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:41:52.446840 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' to be skipped because of status 'skipped'. 
[0m16:41:52.448350 [debug] [MainThread]: Using duckdb connection "master"
[0m16:41:52.448350 [debug] [MainThread]: On master: BEGIN
[0m16:41:52.448968 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:41:52.449482 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:41:52.449482 [debug] [MainThread]: On master: COMMIT
[0m16:41:52.449482 [debug] [MainThread]: Using duckdb connection "master"
[0m16:41:52.449482 [debug] [MainThread]: On master: COMMIT
[0m16:41:52.449482 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:41:52.451050 [debug] [MainThread]: On master: Close
[0m16:41:52.451050 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:41:52.451615 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:41:52.451615 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:41:52.451615 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a' was properly closed.
[0m16:41:52.452198 [info ] [MainThread]: 
[0m16:41:52.452710 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 6.51 seconds (6.51s).
[0m16:41:52.458829 [debug] [MainThread]: Command end result
[0m16:41:52.510735 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:41:52.514930 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:41:52.522888 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:41:52.523897 [info ] [MainThread]: 
[0m16:41:52.523897 [info ] [MainThread]: [31mCompleted with 10 errors, 0 partial successes, and 0 warnings:[0m
[0m16:41:52.524897 [info ] [MainThread]: 
[0m16:41:52.525673 [error] [MainThread]: [31mFailure in seed seed_dim_atividade (seeds\seed_dim_atividade.csv)[0m
[0m16:41:52.526682 [error] [MainThread]:   Runtime Error in seed seed_dim_atividade (seeds\seed_dim_atividade.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv"
[0m16:41:52.527188 [info ] [MainThread]: 
[0m16:41:52.527711 [error] [MainThread]: [31mFailure in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)[0m
[0m16:41:52.527711 [error] [MainThread]:   Runtime Error in seed seed_dim_classe_instituicao (seeds\seed_dim_classe_instituicao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv"
[0m16:41:52.528230 [info ] [MainThread]: 
[0m16:41:52.528230 [error] [MainThread]: [31mFailure in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)[0m
[0m16:41:52.528754 [error] [MainThread]:   Runtime Error in seed seed_dim_consolidado (seeds\seed_dim_consolidado.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv"
[0m16:41:52.528754 [info ] [MainThread]: 
[0m16:41:52.529306 [error] [MainThread]: [31mFailure in seed seed_dim_controle (seeds\seed_dim_controle.csv)[0m
[0m16:41:52.529306 [error] [MainThread]:   Runtime Error in seed seed_dim_controle (seeds\seed_dim_controle.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv"
[0m16:41:52.529836 [info ] [MainThread]: 
[0m16:41:52.529836 [error] [MainThread]: [31mFailure in seed seed_dim_faixa_vencimento (seeds\seed_dim_faixa_vencimento.csv)[0m
[0m16:41:52.530375 [error] [MainThread]:   Runtime Error in seed seed_dim_faixa_vencimento (seeds\seed_dim_faixa_vencimento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv"
[0m16:41:52.530375 [info ] [MainThread]: 
[0m16:41:52.530899 [error] [MainThread]: [31mFailure in seed seed_dim_porte (seeds\seed_dim_porte.csv)[0m
[0m16:41:52.530899 [error] [MainThread]:   Runtime Error in seed seed_dim_porte (seeds\seed_dim_porte.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv"
[0m16:41:52.530899 [info ] [MainThread]: 
[0m16:41:52.531410 [error] [MainThread]: [31mFailure in seed seed_dim_produto_credito (seeds\seed_dim_produto_credito.csv)[0m
[0m16:41:52.531410 [error] [MainThread]:   Runtime Error in seed seed_dim_produto_credito (seeds\seed_dim_produto_credito.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv"
[0m16:41:52.531934 [info ] [MainThread]: 
[0m16:41:52.531934 [error] [MainThread]: [31mFailure in seed seed_dim_regiao (seeds\seed_dim_regiao.csv)[0m
[0m16:41:52.532443 [error] [MainThread]:   Runtime Error in seed seed_dim_regiao (seeds\seed_dim_regiao.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv"
[0m16:41:52.532443 [info ] [MainThread]: 
[0m16:41:52.532954 [error] [MainThread]: [31mFailure in seed seed_dim_risco (seeds\seed_dim_risco.csv)[0m
[0m16:41:52.532954 [error] [MainThread]:   Runtime Error in seed seed_dim_risco (seeds\seed_dim_risco.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv"
[0m16:41:52.532954 [info ] [MainThread]: 
[0m16:41:52.533971 [error] [MainThread]: [31mFailure in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)[0m
[0m16:41:52.534478 [error] [MainThread]:   Runtime Error in seed seed_dim_segmento (seeds\seed_dim_segmento.csv)
  IO Error: No files found that match the pattern "src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv"
[0m16:41:52.534478 [info ] [MainThread]: 
[0m16:41:52.535985 [info ] [MainThread]: Done. PASS=51 WARN=0 ERROR=10 SKIP=36 NO-OP=0 TOTAL=97
[0m16:41:52.538041 [debug] [MainThread]: Command `dbt build` failed at 16:41:52.536992 after 8.27 seconds
[0m16:41:52.538041 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC3AD7A40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC4777B30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000017FC3CC8470>]}
[0m16:41:52.540039 [debug] [MainThread]: Flushing usage events
[0m16:41:53.354191 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:43:31.526662 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C095BF1A90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09B2574A0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09B257800>]}


============================== 16:43:31.536159 | d1d57f62-a6c6-4ea4-bd2b-425d848b1b1a ==============================
[0m16:43:31.536159 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:43:31.537172 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:43:32.114726 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09B1F4740>]}
[0m16:43:32.188894 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09D11BB90>]}
[0m16:43:32.193065 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:43:32.741077 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:43:32.877440 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m16:43:32.878945 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09B88ABD0>]}
[0m16:43:35.016259 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:43:35.017259 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09D584980>]}
[0m16:43:35.784195 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:43:35.794598 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DA902C0>]}
[0m16:43:35.927976 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:43:35.932342 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:43:36.013837 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DA09DF0>]}
[0m16:43:36.014845 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:43:36.020026 [info ] [MainThread]: 
[0m16:43:36.020026 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:43:36.021602 [info ] [MainThread]: 
[0m16:43:36.021602 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:43:36.029309 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:43:36.257718 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:43:36.257718 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:43:36.259286 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:43:37.081554 [debug] [ThreadPool]: SQL status: OK in 0.823 seconds
[0m16:43:37.083085 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:43:37.083589 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:43:37.084099 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:43:37.090697 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:43:37.090697 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:43:37.090697 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:43:37.092203 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:43:37.094379 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:43:37.094899 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:43:37.094899 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:43:37.095908 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:43:37.095908 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:43:37.096922 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:43:37.099663 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:43:37.100760 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:43:37.101844 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:43:37.103438 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:43:37.103438 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:43:37.107597 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:43:37.111778 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:43:37.111778 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:43:37.112796 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:43:37.112796 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:43:37.112796 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:43:37.113805 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:43:37.126903 [debug] [ThreadPool]: SQL status: OK in 0.013 seconds
[0m16:43:37.128471 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:43:37.130127 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:43:37.130655 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:43:37.131706 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DF439E0>]}
[0m16:43:37.132711 [debug] [MainThread]: Using duckdb connection "master"
[0m16:43:37.133217 [debug] [MainThread]: On master: BEGIN
[0m16:43:37.133217 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:43:37.133217 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:43:37.134222 [debug] [MainThread]: On master: COMMIT
[0m16:43:37.134222 [debug] [MainThread]: Using duckdb connection "master"
[0m16:43:37.134222 [debug] [MainThread]: On master: COMMIT
[0m16:43:37.134222 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:43:37.134222 [debug] [MainThread]: On master: Close
[0m16:43:37.140421 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:43:37.140421 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:43:37.141938 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:43:37.141938 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:43:37.149546 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:43:37.151054 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:43:37.181785 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:43:37.183347 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:43:37.184396 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:43:37.184396 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:43:37.185463 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.186003 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:43:37.186003 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
    UNION ALL
    SELECT * FROM portfolio_fallback
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:43:37.575865 [debug] [Thread-1 (]: SQL status: OK in 0.389 seconds
[0m16:43:37.584277 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:43:37.584277 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:43:37.586554 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.589565 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:43:37.589565 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_instituicao'
  
[0m16:43:37.592080 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.601600 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:43:37.605651 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao" rename to "dim_instituicao__dbt_backup"
[0m16:43:37.607663 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.616193 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:43:37.617194 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:43:37.618194 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.656447 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:43:37.657444 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:43:37.659444 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:43:37.669332 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:43:37.679383 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:43:37.679383 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:43:37.682891 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:37.685905 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:43:37.690914 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DBAB500>]}
[0m16:43:37.692421 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.55s]
[0m16:43:37.694966 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:43:37.695980 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:43:37.696977 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:43:37.697979 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:43:37.698974 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:43:37.707506 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:43:37.709506 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:43:37.715035 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:43:37.723543 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:43:37.725554 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:43:37.726550 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:37.728059 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:37.729072 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:43:37.729072 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL

    UNION

    -- Fallback: localizações de instituições presentes apenas nas tabelas SCR
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources

UNION

-- Sentinel para instituições sem dados de localização (cidade, uf, regiao = NULL)
SELECT
    md5(cast('' as varchar)) as id_localizacao,
    NULL as cidade,
    NULL as uf,
    NULL as regiao
    );
  
  
[0m16:43:37.802935 [debug] [Thread-1 (]: SQL status: OK in 0.072 seconds
[0m16:43:37.804963 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:43:37.804963 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:43:37.806972 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.808480 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:43:37.809490 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_localizacao'
  
[0m16:43:37.811493 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.818541 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:43:37.819561 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao" rename to "dim_localizacao__dbt_backup"
[0m16:43:37.820128 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:37.824751 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:43:37.825750 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:43:37.826752 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.829766 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:43:37.830135 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:43:37.831142 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:43:37.832653 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:37.838034 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:43:37.838542 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:43:37.840051 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.842062 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:43:37.843076 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DB894F0>]}
[0m16:43:37.844086 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.14s]
[0m16:43:37.845095 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:43:37.845603 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:43:37.845603 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m16:43:37.848331 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:43:37.848331 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:43:37.854432 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:43:37.855938 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:43:37.862199 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:43:37.863733 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:43:37.864750 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:43:37.865322 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:37.865322 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.867127 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:43:37.867127 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:43:37.884097 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:43:37.886645 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:43:37.887658 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:43:37.889643 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.892161 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:43:37.893222 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'dim_tempo'
  
[0m16:43:37.894591 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.898137 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:43:37.898137 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo" rename to "dim_tempo__dbt_backup"
[0m16:43:37.899642 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:37.904371 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:43:37.905513 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:43:37.906524 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.909060 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:43:37.910059 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:43:37.911569 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:43:37.913590 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:37.919433 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:43:37.920000 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:43:37.921516 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:37.924560 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:43:37.925571 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0ABE20CE0>]}
[0m16:43:37.926585 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.08s]
[0m16:43:37.928097 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:43:37.928648 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:43:37.929656 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:43:37.929656 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:43:37.931282 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:43:37.937357 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:43:37.938367 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:43:37.940881 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:43:37.942890 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:43:37.942890 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:43:37.942890 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:37.944470 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:37.944470 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:43:37.945477 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:43:38.637334 [debug] [Thread-1 (]: SQL status: OK in 0.692 seconds
[0m16:43:38.639853 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:43:38.639853 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:43:38.642891 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:38.645424 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:43:38.646430 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_balanco_patrimonial'
  
[0m16:43:38.647315 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:38.652818 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:43:38.653331 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial" rename to "fato_balanco_patrimonial__dbt_backup"
[0m16:43:38.654526 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:38.660391 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:43:38.660391 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:43:38.661999 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:38.663508 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:43:38.663508 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:43:38.663508 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:43:38.832625 [debug] [Thread-1 (]: SQL status: OK in 0.168 seconds
[0m16:43:38.835882 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:43:38.835882 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:43:38.839127 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:38.841369 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:43:38.841904 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DADA630>]}
[0m16:43:38.842437 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.91s]
[0m16:43:38.842951 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:43:38.843504 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:43:38.844585 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m16:43:38.845120 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:43:38.845120 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:43:38.847630 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:43:38.849137 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:43:38.852714 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:43:38.853719 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:43:38.854222 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:43:38.854222 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:38.855226 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:38.855226 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:43:38.855226 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:43:39.060727 [debug] [Thread-1 (]: SQL status: OK in 0.204 seconds
[0m16:43:39.062305 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:43:39.062819 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_capital_prudencial'
  
[0m16:43:39.063891 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:39.064955 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:43:39.065479 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_capital_prudencial'
  
[0m16:43:39.066521 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:39.069634 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:43:39.070205 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial" rename to "fato_capital_prudencial__dbt_backup"
[0m16:43:39.070205 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:39.075810 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:43:39.076810 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m16:43:39.078319 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:39.080463 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:43:39.080996 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:43:39.081532 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:43:39.105235 [debug] [Thread-1 (]: SQL status: OK in 0.023 seconds
[0m16:43:39.108774 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:43:39.108774 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m16:43:39.110280 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:39.112605 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:43:39.112605 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0ABE3FF80>]}
[0m16:43:39.113612 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.27s]
[0m16:43:39.113612 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:43:39.114613 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:43:39.115670 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m16:43:39.116834 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:43:39.117474 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:43:39.123411 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:43:39.123964 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:43:39.127930 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:43:39.129504 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:43:39.129504 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:43:39.129504 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:39.129504 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:39.131064 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:43:39.131064 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:43:39.192556 [debug] [Thread-1 (]: SQL status: OK in 0.061 seconds
[0m16:43:39.193597 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:43:39.194115 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_indexador'
  
[0m16:43:39.194628 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:39.196732 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:43:39.196732 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_indexador'
  
[0m16:43:39.197302 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:39.200810 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:43:39.201360 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador" rename to "fato_carteira_credito_indexador__dbt_backup"
[0m16:43:39.202461 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:39.205154 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:43:39.206161 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m16:43:39.207335 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:39.208723 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:43:39.209253 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:43:39.209253 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:43:39.233363 [debug] [Thread-1 (]: SQL status: OK in 0.024 seconds
[0m16:43:39.236570 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:43:39.237107 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m16:43:39.238116 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:39.240112 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:43:39.240112 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DBCD220>]}
[0m16:43:39.241392 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.12s]
[0m16:43:39.241897 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:43:39.242431 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:43:39.242946 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m16:43:39.242946 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:43:39.242946 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:43:39.250125 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:43:39.251260 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:43:39.255022 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:43:39.257047 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:43:39.257585 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:43:39.257585 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:39.258120 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:39.258120 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:43:39.259124 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:43:39.325627 [debug] [Thread-1 (]: SQL status: OK in 0.066 seconds
[0m16:43:39.326687 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:43:39.326687 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:43:39.329209 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:39.329721 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:43:39.329721 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_carteira_credito_totais'
  
[0m16:43:39.331227 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:39.335792 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:43:39.336803 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais" rename to "fato_carteira_credito_totais__dbt_backup"
[0m16:43:39.337310 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:39.341842 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:43:39.342349 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:43:39.343410 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:39.344460 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:43:39.344984 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:43:39.345512 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:43:39.481518 [debug] [Thread-1 (]: SQL status: OK in 0.136 seconds
[0m16:43:39.485881 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:43:39.486992 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:43:39.494187 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:43:39.496195 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:43:39.497197 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DFDF950>]}
[0m16:43:39.498196 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.25s]
[0m16:43:39.500195 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:43:39.500195 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:43:39.501199 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:43:39.501199 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:43:39.502708 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:43:39.510735 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:43:39.514243 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:43:39.519253 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:43:39.521254 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:43:39.521254 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:43:39.522766 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:39.523778 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:39.524781 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:43:39.526289 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:43:40.264872 [debug] [Thread-1 (]: SQL status: OK in 0.726 seconds
[0m16:43:40.266447 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:43:40.267459 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:43:40.268976 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.270101 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:43:40.270101 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:43:40.271650 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.276198 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:43:40.277197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado" rename to "fato_demonstracao_resultado__dbt_backup"
[0m16:43:40.278712 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.282751 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:43:40.282751 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:43:40.284357 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:40.285937 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:43:40.285937 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:43:40.286944 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:43:40.438740 [debug] [Thread-1 (]: SQL status: OK in 0.151 seconds
[0m16:43:40.444142 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:43:40.444647 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:43:40.447162 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:40.449171 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:43:40.451062 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DF31BE0>]}
[0m16:43:40.452190 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.95s]
[0m16:43:40.452700 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:43:40.452700 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:43:40.454206 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m16:43:40.454742 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:43:40.454742 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:43:40.461889 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:43:40.463775 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:43:40.467808 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:43:40.470133 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:43:40.470133 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:43:40.470133 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:40.472224 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.472741 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:43:40.473481 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:43:40.482679 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:43:40.484284 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:43:40.484284 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:43:40.485873 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.487383 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:43:40.487383 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_movimentacao_cambio'
  
[0m16:43:40.488387 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.492912 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:43:40.492912 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio" rename to "fato_movimentacao_cambio__dbt_backup"
[0m16:43:40.492912 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.497615 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:43:40.497615 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:43:40.498622 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:40.500130 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:43:40.500130 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:43:40.500130 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:43:40.506810 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:43:40.512746 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:43:40.512746 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:43:40.514752 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.515258 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:43:40.516265 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DF30E30>]}
[0m16:43:40.517277 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.06s]
[0m16:43:40.517277 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:43:40.518286 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:43:40.519294 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:43:40.519294 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:43:40.520303 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:43:40.526349 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:43:40.528431 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:43:40.531592 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:43:40.532600 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:43:40.533105 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:43:40.533105 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:40.534113 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.534113 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:43:40.535687 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:43:40.573623 [debug] [Thread-1 (]: SQL status: OK in 0.037 seconds
[0m16:43:40.575217 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:43:40.575740 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:43:40.576259 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.577769 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:43:40.579327 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_operacoes_clientes'
  
[0m16:43:40.580337 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.584397 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:43:40.584397 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes" rename to "fato_operacoes_clientes__dbt_backup"
[0m16:43:40.585910 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:40.588906 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:43:40.590335 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:43:40.591881 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.593455 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:43:40.593987 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:43:40.595057 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:43:40.604145 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:43:40.608247 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:43:40.609255 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:43:40.610762 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.612773 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:43:40.613278 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0ABE9FB60>]}
[0m16:43:40.613278 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.09s]
[0m16:43:40.615353 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:43:40.615353 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:43:40.616878 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:43:40.617387 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:43:40.617387 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:43:40.621508 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:43:40.623721 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:43:40.627734 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:43:40.629352 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:43:40.629352 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:43:40.629352 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:40.630918 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:40.630918 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:43:40.631926 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:43:41.346669 [debug] [Thread-1 (]: SQL status: OK in 0.714 seconds
[0m16:43:41.348257 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:43:41.348257 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:43:41.349765 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:41.352604 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:43:41.352604 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_resumo_financeiro'
  
[0m16:43:41.354116 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:41.357222 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:43:41.357222 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro" rename to "fato_resumo_financeiro__dbt_backup"
[0m16:43:41.358229 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:41.362743 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:43:41.362743 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:43:41.363248 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:41.367075 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:43:41.368081 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:43:41.368081 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:43:41.728980 [debug] [Thread-1 (]: SQL status: OK in 0.360 seconds
[0m16:43:41.735243 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:43:41.736268 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:43:41.739796 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:41.742934 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:43:41.742934 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DF32030>]}
[0m16:43:41.744681 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 1.13s]
[0m16:43:41.745692 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:43:41.746688 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:43:41.747196 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m16:43:41.749205 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m16:43:41.749713 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:43:41.749713 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:43:41.784436 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:43:41.784436 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:43:41.786043 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:41.786657 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:41.787177 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:43:41.787177 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m16:43:41.789191 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:41.799896 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:43:41.800902 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:43:41.818664 [debug] [Thread-1 (]: SQL status: OK in 0.017 seconds
[0m16:43:41.825968 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:43:41.829499 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:43:41.829499 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:43:41.831089 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:43:41.832620 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:41.834341 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:43:41.834341 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09E050F20>]}
[0m16:43:41.834341 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.09s]
[0m16:43:41.835935 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:43:41.835935 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:43:41.835935 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m16:43:41.836945 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m16:43:41.837454 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:43:41.838466 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:43:41.842992 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:43:41.842992 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m16:43:41.844588 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:41.845595 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:41.846598 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:43:41.847103 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m16:43:41.847737 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:41.851259 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:43:41.851834 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:43:41.854597 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:41.855193 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:43:41.857313 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:43:41.857313 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:43:41.858579 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:43:41.860087 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:41.860087 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m16:43:41.861702 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0ABE8E390>]}
[0m16:43:41.861702 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.02s]
[0m16:43:41.863225 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:43:41.863225 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:43:41.863225 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m16:43:41.865344 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m16:43:41.866356 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:43:41.866863 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:43:41.966655 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:43:41.967160 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m16:43:41.967160 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:41.968167 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:41.968167 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:43:41.968167 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m16:43:41.969670 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:41.971323 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:43:41.972613 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:43:41.975211 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:41.976211 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:43:41.980265 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:43:41.980265 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:43:41.981247 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:43:41.983340 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:41.984510 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m16:43:41.985659 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0ABED6960>]}
[0m16:43:41.986195 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.12s]
[0m16:43:41.986741 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:43:41.987253 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:43:41.987786 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m16:43:41.987786 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m16:43:41.988790 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:43:41.988790 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:43:41.992844 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:43:41.994431 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m16:43:41.994431 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:41.995444 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:41.995444 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:43:41.995444 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m16:43:41.996951 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:41.998535 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:43:41.998535 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:43:41.999531 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.001190 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:43:42.002865 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:43:42.003382 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:43:42.003382 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:43:42.005157 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.006167 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m16:43:42.006677 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0ABEB1040>]}
[0m16:43:42.007261 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.02s]
[0m16:43:42.007799 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:43:42.007799 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:43:42.009084 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m16:43:42.010148 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:43:42.010148 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:43:42.011752 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:43:42.016881 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:43:42.017889 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:43:42.018905 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.019984 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.021151 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:43:42.021692 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m16:43:42.022751 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:42.025270 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:43:42.027605 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:43:42.033313 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:43:42.034876 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:43:42.038234 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:43:42.039740 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:43:42.040113 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:43:42.042252 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.042770 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:43:42.042770 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0ABE525A0>]}
[0m16:43:42.043777 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.03s]
[0m16:43:42.044282 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:43:42.044862 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:43:42.045869 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m16:43:42.046870 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:43:42.047907 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:43:42.047907 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:43:42.054271 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:43:42.055166 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:43:42.055166 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.057184 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.058193 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:43:42.058193 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m16:43:42.059193 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:42.060190 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:43:42.060190 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:43:42.064070 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:42.065588 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:43:42.069143 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:43:42.069825 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:43:42.069825 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:43:42.071490 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.071490 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:43:42.072625 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09E039D30>]}
[0m16:43:42.073201 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.03s]
[0m16:43:42.073201 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:43:42.074208 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:43:42.075212 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m16:43:42.076208 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:43:42.076208 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:43:42.076208 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:43:42.081261 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:43:42.082789 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:43:42.082789 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.084421 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.084421 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:43:42.086032 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m16:43:42.087551 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.089269 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:43:42.089798 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:43:42.092445 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:42.092962 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:43:42.095163 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:43:42.095163 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:43:42.096711 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:43:42.097277 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.098287 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:43:42.099287 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DFF3890>]}
[0m16:43:42.099287 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.02s]
[0m16:43:42.100349 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:43:42.100858 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:43:42.101454 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m16:43:42.103034 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:43:42.103546 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:43:42.104763 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:43:42.112145 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:43:42.112666 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:43:42.113197 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.113739 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.114265 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:43:42.114265 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m16:43:42.114793 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:42.115872 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:43:42.116395 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:43:42.119767 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:43:42.119767 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:43:42.121371 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:43:42.123058 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:43:42.123058 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:43:42.125066 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.126645 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:43:42.126645 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0ABE90F80>]}
[0m16:43:42.127646 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.02s]
[0m16:43:42.128153 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:43:42.128153 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:43:42.129785 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m16:43:42.129785 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:43:42.129785 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:43:42.131437 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:43:42.136777 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:43:42.138020 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:43:42.138020 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.139016 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.139016 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:43:42.140523 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m16:43:42.142234 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.143799 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:43:42.144327 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:43:42.147413 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:42.148424 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:43:42.150932 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:43:42.151566 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:43:42.152120 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:43:42.153636 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.154696 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:43:42.154696 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09E033F50>]}
[0m16:43:42.154696 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.02s]
[0m16:43:42.156293 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:43:42.157855 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:43:42.158863 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m16:43:42.159864 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m16:43:42.160374 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:43:42.160374 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:43:42.163967 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:43:42.164972 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m16:43:42.165478 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.165478 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.166484 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:43:42.166988 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m16:43:42.167491 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:42.167491 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:43:42.167491 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:43:42.170169 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.171176 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:43:42.174300 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:43:42.174300 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:43:42.175307 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:43:42.177311 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.178813 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m16:43:42.180581 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09E032C90>]}
[0m16:43:42.181141 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.02s]
[0m16:43:42.182217 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:43:42.182739 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:43:42.183282 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m16:43:42.183810 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m16:43:42.184858 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:43:42.193128 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:43:42.194649 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:43:42.217411 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:43:42.219008 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:43:42.220684 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m16:43:42.220684 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.222558 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.223075 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:43:42.224135 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.225709 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.229360 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m16:43:42.229866 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m16:43:42.230874 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m16:43:42.230874 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.05s]
[0m16:43:42.231882 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:43:42.232388 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:43:42.232903 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m16:43:42.234039 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m16:43:42.235047 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:43:42.239755 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:43:42.242273 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:43:42.245198 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:43:42.246798 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:43:42.247342 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m16:43:42.247873 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.248404 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.249079 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:43:42.249611 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.251740 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.253914 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m16:43:42.255047 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m16:43:42.256053 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m16:43:42.257062 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m16:43:42.257624 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:43:42.257624 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:43:42.258631 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m16:43:42.258631 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m16:43:42.258631 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:43:42.268004 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:43:42.270139 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:43:42.272781 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:43:42.274386 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:43:42.276003 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m16:43:42.276538 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.277611 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.278137 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:43:42.278660 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:43:42.283444 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:43:42.286018 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m16:43:42.287533 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m16:43:42.287533 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m16:43:42.288539 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.03s]
[0m16:43:42.290046 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:43:42.291055 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:43:42.291055 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m16:43:42.292563 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m16:43:42.293069 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:43:42.303056 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:43:42.304767 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:43:42.307924 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:43:42.309928 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:43:42.310434 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m16:43:42.310434 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.312070 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.313085 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:43:42.313591 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.315114 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.317682 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m16:43:42.319343 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m16:43:42.319847 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m16:43:42.320356 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.03s]
[0m16:43:42.321364 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:43:42.321868 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:43:42.322885 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m16:43:42.322885 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m16:43:42.323891 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:43:42.331003 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:43:42.333455 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:43:42.337703 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:43:42.338708 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:43:42.340213 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m16:43:42.340213 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.341222 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.341222 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:43:42.342222 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.350943 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:43:42.354112 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m16:43:42.354676 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m16:43:42.354676 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m16:43:42.356253 [info ] [Thread-1 (]: 26 of 97 PASS relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[32mPASS[0m in 0.03s]
[0m16:43:42.356253 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:43:42.356253 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:43:42.357257 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m16:43:42.357762 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m16:43:42.357762 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:43:42.362866 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:43:42.364888 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:43:42.369708 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:43:42.371335 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:43:42.371928 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m16:43:42.373009 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.374644 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:42.375177 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:43:42.375936 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:43:42.380633 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:43:42.384201 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m16:43:42.386211 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m16:43:42.387732 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m16:43:42.389730 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.03s]
[0m16:43:42.390238 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:43:42.391806 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:43:42.392327 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m16:43:42.393430 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m16:43:42.394951 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:43:42.401272 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:43:42.402878 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:43:42.405547 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:43:42.406062 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:43:42.407069 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m16:43:42.407577 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.408106 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.408106 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:43:42.409114 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.410112 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.410615 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m16:43:42.411619 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m16:43:42.411619 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m16:43:42.411619 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.02s]
[0m16:43:42.413137 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:43:42.413137 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:43:42.414740 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m16:43:42.415329 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m16:43:42.415329 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:43:42.419940 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:43:42.428296 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:43:42.431316 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:43:42.433851 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:43:42.434357 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m16:43:42.434357 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.434357 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.435864 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:43:42.435864 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:43:42.439743 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:43:42.442655 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m16:43:42.444252 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m16:43:42.444897 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m16:43:42.445966 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.03s]
[0m16:43:42.446494 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:43:42.447024 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:43:42.447555 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m16:43:42.448087 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m16:43:42.448614 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:43:42.456234 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:43:42.457407 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:43:42.459917 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:43:42.461511 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:43:42.462651 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m16:43:42.463662 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.464660 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.465167 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:43:42.466220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.467273 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.469477 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m16:43:42.470553 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m16:43:42.470553 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m16:43:42.471561 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:43:42.473250 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:43:42.473250 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:43:42.473250 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m16:43:42.474258 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m16:43:42.475274 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:43:42.479386 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:43:42.480983 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:43:42.485450 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:43:42.487733 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:43:42.488830 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m16:43:42.489894 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.491011 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.491726 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:43:42.492740 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.494288 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.495798 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m16:43:42.496826 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m16:43:42.497373 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m16:43:42.497909 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:43:42.497909 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:43:42.500112 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:43:42.500112 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:43:42.501116 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m16:43:42.501619 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:43:42.507730 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:43:42.508745 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:43:42.511830 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:43:42.513342 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:43:42.514850 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m16:43:42.515860 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.516363 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.516890 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:43:42.517401 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.522184 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:43:42.524282 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m16:43:42.525866 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m16:43:42.526388 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m16:43:42.526959 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:43:42.528007 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:43:42.528007 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:43:42.528007 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:43:42.529580 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m16:43:42.529580 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:43:42.537651 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:43:42.538171 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:43:42.541218 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:43:42.542725 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:43:42.544893 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m16:43:42.544893 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.545900 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.546900 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:43:42.547406 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.557233 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:43:42.560328 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m16:43:42.561714 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m16:43:42.563232 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m16:43:42.564885 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:43:42.565392 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:43:42.565955 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:43:42.567010 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m16:43:42.567540 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m16:43:42.568603 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:43:42.572760 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:43:42.574767 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:43:42.580955 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:43:42.582898 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:43:42.583914 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m16:43:42.583914 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.585122 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.585627 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:43:42.585627 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.587253 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.589776 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m16:43:42.590787 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m16:43:42.590787 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m16:43:42.592293 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:43:42.592813 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:43:42.592813 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:43:42.595052 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m16:43:42.596061 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m16:43:42.596061 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:43:42.600781 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:43:42.603878 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:43:42.607022 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:43:42.608535 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:43:42.608535 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m16:43:42.608535 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.610913 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.610913 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:43:42.612426 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.613981 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.615449 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m16:43:42.617458 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m16:43:42.617458 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m16:43:42.617458 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:43:42.619587 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:43:42.620133 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:43:42.620133 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:43:42.621766 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m16:43:42.622774 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:43:42.631180 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:43:42.632836 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:43:42.635806 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:43:42.636812 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:43:42.638198 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m16:43:42.638198 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.639704 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.639704 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:43:42.640709 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.645368 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:43:42.648459 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m16:43:42.649967 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m16:43:42.650975 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m16:43:42.651543 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:43:42.652701 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:43:42.653217 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:43:42.654331 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:43:42.654931 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m16:43:42.654931 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:43:42.664692 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:43:42.666219 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:43:42.670265 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:43:42.672896 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:43:42.672896 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m16:43:42.674167 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.675162 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.675162 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:43:42.676162 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.681337 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:43:42.684156 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m16:43:42.684156 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m16:43:42.685771 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m16:43:42.686786 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:43:42.687291 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:43:42.688300 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:43:42.688300 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m16:43:42.689298 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m16:43:42.689298 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:43:42.692820 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:43:42.694835 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:43:42.697703 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:43:42.698366 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:43:42.699872 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m16:43:42.699872 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.701439 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.702040 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:43:42.702040 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.702687 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.704202 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m16:43:42.705228 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m16:43:42.706276 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m16:43:42.707313 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.02s]
[0m16:43:42.708318 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:43:42.708318 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:43:42.709826 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m16:43:42.710408 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m16:43:42.710408 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:43:42.720320 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:43:42.721331 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:43:42.725567 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:43:42.728529 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:43:42.729597 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m16:43:42.730128 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.731203 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.731745 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:43:42.732801 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.734520 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.736608 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m16:43:42.738163 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m16:43:42.738163 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m16:43:42.739143 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.03s]
[0m16:43:42.740145 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:43:42.741642 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:43:42.742147 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:43:42.742664 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m16:43:42.743179 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:43:42.750117 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:43:42.752231 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:43:42.755068 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:43:42.757687 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:43:42.758694 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m16:43:42.758694 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.760206 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.760206 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:43:42.761811 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.765039 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:43:42.767125 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m16:43:42.769135 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m16:43:42.769792 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m16:43:42.771375 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:43:42.772390 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:43:42.772910 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:43:42.773927 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:43:42.774926 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m16:43:42.774926 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:43:42.782353 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:43:42.785211 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:43:42.787847 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:43:42.790356 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:43:42.790356 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m16:43:42.791865 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.791865 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.792877 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:43:42.793384 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.798131 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:43:42.799639 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m16:43:42.801223 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m16:43:42.801865 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m16:43:42.802951 [info ] [Thread-1 (]: 41 of 97 PASS relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:43:42.804597 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:43:42.805183 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:43:42.805183 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m16:43:42.806189 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m16:43:42.806189 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:43:42.812502 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:43:42.814631 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:43:42.818473 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:43:42.820085 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:43:42.820619 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m16:43:42.820619 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.822133 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.822639 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:43:42.823265 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.824271 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.826936 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m16:43:42.828440 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m16:43:42.828440 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m16:43:42.829447 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.02s]
[0m16:43:42.829447 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:43:42.831051 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:43:42.831051 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m16:43:42.831051 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m16:43:42.832797 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:43:42.838354 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:43:42.839860 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:43:42.844580 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:43:42.846587 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:43:42.847095 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m16:43:42.847624 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.848686 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.849216 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:43:42.849216 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.850272 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.852920 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m16:43:42.854514 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m16:43:42.854514 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m16:43:42.855572 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.02s]
[0m16:43:42.856439 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:43:42.857446 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:43:42.858458 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:43:42.858458 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m16:43:42.860095 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:43:42.866776 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:43:42.867345 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:43:42.870056 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:43:42.873315 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:43:42.873315 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m16:43:42.874325 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.875323 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.876332 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:43:42.876332 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.879424 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:43:42.880991 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m16:43:42.883111 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m16:43:42.884119 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m16:43:42.885719 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:43:42.886784 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:43:42.888031 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:43:42.888576 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:43:42.889663 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m16:43:42.890194 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:43:42.895900 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:43:42.897425 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:43:42.901840 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:43:42.904040 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:43:42.904595 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m16:43:42.904595 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.905180 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.906190 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:43:42.906698 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.913068 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:43:42.915807 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m16:43:42.916863 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m16:43:42.917871 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m16:43:42.918989 [info ] [Thread-1 (]: 45 of 97 PASS relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:43:42.920067 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:43:42.920067 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:43:42.920067 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m16:43:42.921642 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m16:43:42.921642 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:43:42.925164 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:43:42.926669 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:43:42.931412 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:43:42.933765 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:43:42.934275 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m16:43:42.934810 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.935869 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.936398 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:43:42.937467 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.938534 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.940061 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m16:43:42.940061 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m16:43:42.941467 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m16:43:42.941973 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.02s]
[0m16:43:42.942983 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:43:42.943489 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:43:42.944497 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m16:43:42.944497 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m16:43:42.945504 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:43:42.950194 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:43:42.952252 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:43:42.956042 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:43:42.958407 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:43:42.958947 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m16:43:42.959486 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.960534 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.961591 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:43:42.961591 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.963129 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.965449 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m16:43:42.966524 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m16:43:42.968048 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m16:43:42.969057 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:43:42.969669 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:43:42.970228 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:43:42.971236 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:43:42.971741 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m16:43:42.972248 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:43:42.977783 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:43:42.981300 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:43:42.987648 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:43:42.988698 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:43:42.988698 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m16:43:42.988698 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:42.990215 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:42.990215 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:43:42.990215 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:42.995465 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:43:42.997609 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m16:43:42.999615 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m16:43:43.000121 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m16:43:43.001127 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:43:43.002278 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:43:43.002796 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:43:43.003315 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:43:43.004457 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m16:43:43.005110 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:43:43.011709 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:43:43.013349 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:43:43.016956 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:43:43.019616 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:43:43.020178 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m16:43:43.021187 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.021695 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.022702 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:43:43.022702 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.033076 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:43:43.035226 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m16:43:43.036807 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m16:43:43.037347 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m16:43:43.038399 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:43:43.038929 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:43:43.038929 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:43:43.040445 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m16:43:43.040445 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m16:43:43.040445 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:43:43.045591 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:43:43.048613 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:43:43.052390 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:43:43.055926 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:43:43.058642 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m16:43:43.059354 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.060396 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.060966 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:43:43.061499 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.062559 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.064346 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m16:43:43.065428 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m16:43:43.066435 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m16:43:43.067538 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.03s]
[0m16:43:43.069720 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:43:43.070267 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:43:43.070267 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m16:43:43.071277 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m16:43:43.071277 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:43:43.078147 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:43:43.079736 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:43:43.083840 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:43:43.085852 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:43:43.085852 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m16:43:43.086862 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.089199 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.090714 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:43:43.090714 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.095838 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:43.098591 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m16:43:43.100707 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m16:43:43.101774 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m16:43:43.102307 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.03s]
[0m16:43:43.104491 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:43:43.105089 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:43:43.106096 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:43:43.106602 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m16:43:43.107107 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:43:43.114060 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:43:43.117601 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:43:43.121184 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:43:43.124385 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:43:43.124915 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m16:43:43.125457 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.125982 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.126505 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:43:43.126505 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.128072 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.131355 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m16:43:43.132881 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m16:43:43.133891 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m16:43:43.134399 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:43:43.135904 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:43:43.136573 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:43:43.137088 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:43:43.137632 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m16:43:43.137632 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:43:43.148373 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:43:43.150887 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:43:43.155146 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:43:43.157273 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:43:43.157817 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m16:43:43.158508 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.160243 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.160243 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:43:43.160243 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.164023 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:43.166544 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m16:43:43.168300 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m16:43:43.168300 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m16:43:43.168300 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:43:43.169809 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:43:43.169809 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:43:43.170313 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m16:43:43.170313 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m16:43:43.171321 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:43:43.177040 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:43:43.178041 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:43:43.182803 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:43:43.184834 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:43:43.185895 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m16:43:43.186432 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.187496 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.188023 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:43:43.188550 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.190125 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.191170 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m16:43:43.192730 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m16:43:43.193260 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m16:43:43.194269 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:43:43.194774 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:43:43.195789 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:43:43.195789 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m16:43:43.196782 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m16:43:43.197287 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:43:43.201720 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:43:43.202780 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:43:43.204988 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:43:43.207332 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:43:43.208341 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m16:43:43.208341 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.209850 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.210437 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:43:43.210437 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.212185 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.214494 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m16:43:43.216084 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m16:43:43.217145 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m16:43:43.217683 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:43:43.219200 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:43:43.219767 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:43:43.220320 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:43:43.221334 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m16:43:43.222810 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:43:43.229036 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:43:43.231198 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:43:43.234755 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:43:43.237073 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:43:43.237602 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m16:43:43.238128 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.238664 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.239186 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:43:43.240227 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.243005 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:43:43.245287 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m16:43:43.247385 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m16:43:43.248393 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m16:43:43.249392 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:43:43.249392 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:43:43.249392 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:43:43.251100 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:43:43.252225 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m16:43:43.252737 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:43:43.258706 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:43:43.263151 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:43:43.269552 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:43:43.271663 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:43:43.272198 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m16:43:43.272713 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.273270 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.274275 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:43:43.274275 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.279390 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:43:43.281558 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m16:43:43.282787 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m16:43:43.282787 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m16:43:43.284392 [info ] [Thread-1 (]: 57 of 97 PASS relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:43:43.284392 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:43:43.286462 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:43:43.286983 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m16:43:43.288041 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m16:43:43.288041 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:43:43.292865 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:43:43.295434 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:43:43.298583 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:43:43.299584 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:43:43.299584 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m16:43:43.301420 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.301980 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.302620 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:43:43.303657 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.304876 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.306388 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m16:43:43.307903 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m16:43:43.308909 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m16:43:43.309910 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.02s]
[0m16:43:43.310416 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:43:43.311023 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:43:43.312030 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m16:43:43.312030 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m16:43:43.313035 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:43:43.320206 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:43:43.321717 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:43:43.326005 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:43:43.328695 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:43:43.329209 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m16:43:43.329727 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.330286 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.332809 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:43:43.332809 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.334965 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.336472 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m16:43:43.337527 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m16:43:43.338542 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m16:43:43.338542 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.03s]
[0m16:43:43.340050 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:43:43.341058 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:43:43.342059 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:43:43.342562 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m16:43:43.343067 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:43:43.351246 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:43:43.352936 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:43:43.356093 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:43:43.357125 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:43:43.357678 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m16:43:43.357678 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.358685 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.358685 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:43:43.360192 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.364825 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:43:43.367376 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m16:43:43.367881 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m16:43:43.369395 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m16:43:43.369951 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:43:43.369951 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:43:43.369951 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:43:43.371500 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:43:43.371500 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m16:43:43.371500 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:43:43.378791 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:43:43.381454 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:43:43.384132 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:43:43.386715 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:43:43.387849 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m16:43:43.387849 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.388854 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.388854 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:43:43.388854 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:43.398296 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:43:43.399435 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m16:43:43.401991 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m16:43:43.401991 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m16:43:43.403587 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:43:43.404149 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:43:43.404713 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:43:43.405473 [info ] [Thread-1 (]: 62 of 97 START sql table model main.dim_atividade .............................. [RUN]
[0m16:43:43.405473 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m16:43:43.406981 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:43:43.411641 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:43:43.413796 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:43:43.421535 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:43:43.423147 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:43:43.424153 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:43:43.424153 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:43.425153 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.425153 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:43:43.425153 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:43:43.427161 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.429895 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:43:43.431413 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:43:43.431413 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:43.434613 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:43:43.435758 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:43:43.436770 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:43:43.439294 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:43.442970 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:43:43.443515 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:43:43.446083 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:43.447593 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:43:43.448602 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09E05F8F0>]}
[0m16:43:44.354370 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:43:44.358512 [info ] [Thread-1 (]: 62 of 97 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.04s]
[0m16:43:44.360043 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:43:44.361054 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:43:44.361564 [info ] [Thread-1 (]: 63 of 97 START sql table model main.dim_classe_instituicao ..................... [RUN]
[0m16:43:44.361564 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:43:44.363070 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:43:44.367893 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:43:44.370120 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:43:44.375717 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:43:44.377951 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:43:44.378594 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:43:44.379114 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.381239 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:44.381781 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:43:44.383041 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:43:44.385096 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.391126 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:43:44.392134 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:43:44.393151 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.397738 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:43:44.397738 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:43:44.399415 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:43:44.400983 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:44.405510 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:43:44.406399 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:43:44.406905 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:44.409438 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:43:44.411436 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DF7ADE0>]}
[0m16:43:44.411436 [info ] [Thread-1 (]: 63 of 97 OK created sql table model main.dim_classe_instituicao ................ [[32mOK[0m in 0.05s]
[0m16:43:44.414955 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:43:44.415961 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:43:44.417342 [info ] [Thread-1 (]: 64 of 97 START sql table model main.dim_consolidado ............................ [RUN]
[0m16:43:44.417847 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:43:44.417847 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:43:44.423393 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:43:44.425404 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:43:44.433980 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:43:44.435976 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:43:44.436980 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:43:44.437488 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.438496 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.438496 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:43:44.439495 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:43:44.441495 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.446858 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:43:44.447371 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:43:44.448376 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:44.450379 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:43:44.451384 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:43:44.452426 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:43:44.453607 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.457344 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:43:44.458350 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:43:44.459767 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:44.461541 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:43:44.462551 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0ABEA8860>]}
[0m16:43:44.463974 [info ] [Thread-1 (]: 64 of 97 OK created sql table model main.dim_consolidado ....................... [[32mOK[0m in 0.04s]
[0m16:43:44.464724 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:43:44.466242 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:43:44.467250 [info ] [Thread-1 (]: 65 of 97 START sql table model main.dim_controle ............................... [RUN]
[0m16:43:44.468248 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:43:44.469249 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:43:44.473584 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:43:44.475594 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:43:44.482742 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:43:44.484755 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:43:44.485752 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:43:44.485752 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.487261 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.488269 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:43:44.488269 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:43:44.490268 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.494792 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:43:44.494792 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:43:44.495787 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.499310 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:43:44.500307 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:43:44.501310 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:43:44.503281 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.507343 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:43:44.507343 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:43:44.508884 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:44.510391 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:43:44.512923 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DC62120>]}
[0m16:43:44.513434 [info ] [Thread-1 (]: 65 of 97 OK created sql table model main.dim_controle .......................... [[32mOK[0m in 0.04s]
[0m16:43:44.514441 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:43:44.515949 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:43:44.516957 [info ] [Thread-1 (]: 66 of 97 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m16:43:44.517834 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:43:44.518536 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:43:44.524035 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:43:44.526042 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:43:44.531563 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:43:44.533071 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:43:44.534423 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:43:44.535081 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.536080 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.536587 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:43:44.537160 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:43:44.538918 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.544985 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:43:44.545990 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:43:44.546992 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.549633 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:43:44.550297 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:43:44.550297 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:43:44.553350 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.557371 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:43:44.558020 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:43:44.560027 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.562027 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:43:44.563534 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0AC25A780>]}
[0m16:43:44.564545 [info ] [Thread-1 (]: 66 of 97 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.05s]
[0m16:43:44.566159 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:43:44.566159 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:43:44.568396 [info ] [Thread-1 (]: 67 of 97 START sql table model main.dim_porte .................................. [RUN]
[0m16:43:44.569405 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m16:43:44.569910 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:43:44.580607 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:43:44.583159 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:43:44.587611 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:43:44.591634 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:43:44.591634 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:43:44.591634 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.593669 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.593669 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:43:44.595175 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:43:44.597191 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.602698 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:43:44.603706 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:43:44.605723 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.608304 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:43:44.608304 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:43:44.609303 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:43:44.612331 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.617959 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:43:44.617959 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:43:44.618965 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:44.621968 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:43:44.622967 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09DF7AA50>]}
[0m16:43:44.623473 [info ] [Thread-1 (]: 67 of 97 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.05s]
[0m16:43:44.625483 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:43:44.625483 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:43:44.626482 [info ] [Thread-1 (]: 68 of 97 START sql table model main.dim_produto_credito ........................ [RUN]
[0m16:43:44.627993 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:43:44.629002 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:43:44.638588 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:43:44.640812 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:43:44.646090 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:43:44.649096 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:43:44.650113 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:43:44.650113 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.652125 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.653633 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:43:44.654643 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:43:44.657305 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.662847 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:43:44.663858 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:43:44.664854 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.667862 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:43:44.671456 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:43:44.673978 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:43:44.675982 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.681498 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:43:44.683037 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:43:44.685048 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.687059 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:43:44.689056 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0AC2816A0>]}
[0m16:43:44.689736 [info ] [Thread-1 (]: 68 of 97 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.06s]
[0m16:43:44.691752 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:43:44.692763 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:43:44.693778 [info ] [Thread-1 (]: 69 of 97 START sql table model main.dim_regiao ................................. [RUN]
[0m16:43:44.695285 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:43:44.696297 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:43:44.700117 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:43:44.703120 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:43:44.708497 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:43:44.711497 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:43:44.711497 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:43:44.715561 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.718557 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:43:44.718557 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:43:44.719565 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:43:44.721559 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.726579 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:43:44.727587 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:43:44.729098 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.731201 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:43:44.731201 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:43:44.732717 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:43:44.736735 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:43:44.740366 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:43:44.741374 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:43:44.743292 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.744801 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:43:44.746587 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09E02C350>]}
[0m16:43:44.747600 [info ] [Thread-1 (]: 69 of 97 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.05s]
[0m16:43:44.750241 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:43:44.751760 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:43:44.754341 [info ] [Thread-1 (]: 70 of 97 START sql table model main.dim_risco .................................. [RUN]
[0m16:43:44.755330 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:43:44.756378 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:43:44.762018 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:43:44.763626 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:43:44.770952 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:43:44.773458 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:43:44.774468 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:43:44.775467 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.777475 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:44.778008 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:43:44.778008 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:43:44.780071 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.787119 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:43:44.787119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:43:44.789105 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.791576 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:43:44.792613 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:43:44.793132 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:43:44.799196 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:43:44.807108 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:43:44.808117 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:43:44.809567 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:44.811749 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:43:44.812758 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0AC298620>]}
[0m16:43:44.813972 [info ] [Thread-1 (]: 70 of 97 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.06s]
[0m16:43:44.815475 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:43:44.815475 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:43:44.816481 [info ] [Thread-1 (]: 71 of 97 START sql table model main.dim_segmento ............................... [RUN]
[0m16:43:44.817554 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:43:44.818064 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:43:44.825961 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:43:44.827954 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:43:44.831082 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:43:44.832882 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:43:44.833904 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:43:44.833904 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.834955 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.834955 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:43:44.834955 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:43:44.835954 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.840906 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:43:44.840906 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:43:44.841909 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:44.843015 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:43:44.843015 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:43:44.843015 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:43:44.848315 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:43:44.852198 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:43:44.852718 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:43:44.853883 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:44.856053 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:43:44.856053 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09D9D0F80>]}
[0m16:43:44.857059 [info ] [Thread-1 (]: 71 of 97 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.04s]
[0m16:43:44.857604 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:43:44.857604 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:43:44.857604 [info ] [Thread-1 (]: 72 of 97 START test not_null_dim_classe_instituicao_id_classe .................. [RUN]
[0m16:43:44.858609 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m16:43:44.860119 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:43:44.865366 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:43:44.867382 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:43:44.870477 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:43:44.872502 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:43:44.873030 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m16:43:44.874042 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.875040 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.876048 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:43:44.876048 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m16:43:44.877049 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.879563 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m16:43:44.881201 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m16:43:44.881201 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m16:43:44.882723 [info ] [Thread-1 (]: 72 of 97 PASS not_null_dim_classe_instituicao_id_classe ........................ [[32mPASS[0m in 0.02s]
[0m16:43:44.884958 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:43:44.885969 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:43:44.886987 [info ] [Thread-1 (]: 73 of 97 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m16:43:44.888002 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m16:43:44.888996 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:43:44.895687 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:43:44.897191 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:43:44.900863 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:43:44.903016 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:43:44.903522 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m16:43:44.904072 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.904646 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.905274 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:43:44.905826 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:44.907423 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:44.910507 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m16:43:44.911516 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m16:43:44.911516 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m16:43:44.912530 [info ] [Thread-1 (]: 73 of 97 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:43:44.913045 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:43:44.913045 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:43:44.914051 [info ] [Thread-1 (]: 74 of 97 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m16:43:44.914051 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m16:43:44.915052 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:43:44.919176 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:43:44.920466 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:43:44.926201 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:43:44.927205 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:43:44.927205 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m16:43:44.928193 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.928728 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:44.929236 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:43:44.929236 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:43:44.934464 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:43:44.936992 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m16:43:44.939127 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m16:43:44.940127 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m16:43:44.940127 [info ] [Thread-1 (]: 74 of 97 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.03s]
[0m16:43:44.941235 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:43:44.942255 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:43:44.942763 [info ] [Thread-1 (]: 75 of 97 START test not_null_dim_consolidado_id_consolidado .................... [RUN]
[0m16:43:44.942763 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m16:43:44.944353 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:43:44.949633 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:43:44.953120 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:43:44.958512 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:43:44.961673 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:43:44.963198 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m16:43:44.964211 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:44.965215 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:44.966972 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:43:44.967626 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m16:43:44.970809 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:44.974037 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m16:43:44.976034 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m16:43:44.976555 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m16:43:44.978105 [info ] [Thread-1 (]: 75 of 97 PASS not_null_dim_consolidado_id_consolidado .......................... [[32mPASS[0m in 0.03s]
[0m16:43:44.979117 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:43:44.980432 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:43:44.982158 [info ] [Thread-1 (]: 76 of 97 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m16:43:44.982675 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m16:43:44.984274 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:43:44.994391 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:43:44.996921 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:43:45.003297 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:43:45.007135 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:43:45.007797 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m16:43:45.008813 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:45.008813 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.010325 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:43:45.010325 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:45.013179 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:43:45.017963 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m16:43:45.023898 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m16:43:45.024900 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m16:43:45.028421 [info ] [Thread-1 (]: 76 of 97 PASS relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[32mPASS[0m in 0.05s]
[0m16:43:45.030961 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:43:45.031510 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:43:45.033028 [info ] [Thread-1 (]: 77 of 97 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m16:43:45.034546 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m16:43:45.034546 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:43:45.056459 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:43:45.059178 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:43:45.065530 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:43:45.071615 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:43:45.073131 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m16:43:45.075143 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:45.076143 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.077653 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:43:45.078178 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:43:45.081297 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:45.084352 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m16:43:45.086371 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m16:43:45.087620 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m16:43:45.088670 [info ] [Thread-1 (]: 77 of 97 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.05s]
[0m16:43:45.091063 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:43:45.092574 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:43:45.093080 [info ] [Thread-1 (]: 78 of 97 START test not_null_dim_controle_id_controle .......................... [RUN]
[0m16:43:45.094088 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m16:43:45.094088 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:43:45.102130 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:43:45.104103 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:43:45.107630 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:43:45.109786 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:43:45.110795 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m16:43:45.110795 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:45.112301 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.112806 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:43:45.113814 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m16:43:45.114816 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.118851 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m16:43:45.121002 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m16:43:45.121541 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m16:43:45.122600 [info ] [Thread-1 (]: 78 of 97 PASS not_null_dim_controle_id_controle ................................ [[32mPASS[0m in 0.03s]
[0m16:43:45.123744 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:43:45.124823 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:43:45.125361 [info ] [Thread-1 (]: 79 of 97 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m16:43:45.126432 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m16:43:45.126974 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:43:45.135374 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:43:45.137643 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:43:45.145890 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:43:45.149207 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:43:45.149711 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m16:43:45.150718 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:45.152259 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.152796 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:43:45.153803 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:45.156640 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:45.158746 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m16:43:45.161263 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m16:43:45.162094 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m16:43:45.163128 [info ] [Thread-1 (]: 79 of 97 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.04s]
[0m16:43:45.164398 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:43:45.165430 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:43:45.166630 [info ] [Thread-1 (]: 80 of 97 START test unique_dim_controle_id_controle ............................ [RUN]
[0m16:43:45.167309 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m16:43:45.167815 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:43:45.175040 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:43:45.177048 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:43:45.180142 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:43:45.181663 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:43:45.182675 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m16:43:45.182675 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:45.182675 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.184273 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:43:45.184273 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:43:45.187378 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:45.188385 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m16:43:45.189890 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m16:43:45.190895 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m16:43:45.191897 [info ] [Thread-1 (]: 80 of 97 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.02s]
[0m16:43:45.192912 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:43:45.192912 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:43:45.194508 [info ] [Thread-1 (]: 81 of 97 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:43:45.195515 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:43:45.196076 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:43:45.201105 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:43:45.203299 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:43:45.209257 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:43:45.210878 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:43:45.211622 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:43:45.212156 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:45.213222 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.214229 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:43:45.214229 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:43:45.284888 [debug] [Thread-1 (]: SQL status: OK in 0.069 seconds
[0m16:43:45.288710 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:43:45.289774 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:43:45.290842 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.292433 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:43:45.292955 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:43:45.293490 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:43:45.295536 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.297542 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:43:45.297542 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:43:45.298546 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:45.301055 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:43:45.301625 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09E034650>]}
[0m16:43:45.303264 [info ] [Thread-1 (]: 81 of 97 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 0.11s]
[0m16:43:45.304613 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:43:45.305177 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:43:45.306689 [info ] [Thread-1 (]: 82 of 97 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:43:45.307194 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:43:45.307194 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:43:45.313219 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:43:45.315332 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:43:45.320084 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:43:45.321620 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:43:45.322126 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:43:45.322631 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:45.323148 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.323148 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:43:45.323148 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:43:45.577864 [debug] [Thread-1 (]: SQL status: OK in 0.253 seconds
[0m16:43:45.585703 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:43:45.586713 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:43:45.587746 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.591182 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:43:45.592235 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:43:45.592749 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:43:45.610077 [debug] [Thread-1 (]: SQL status: OK in 0.017 seconds
[0m16:43:45.613365 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:43:45.614880 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:43:45.615496 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:45.617520 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:43:45.617520 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0AC2D82C0>]}
[0m16:43:45.619107 [info ] [Thread-1 (]: 82 of 97 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.31s]
[0m16:43:45.619670 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:43:45.620205 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:43:45.620723 [info ] [Thread-1 (]: 83 of 97 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:43:45.622288 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:43:45.622802 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:43:45.627925 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:43:45.629495 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:43:45.633061 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:43:45.634572 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:43:45.634572 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:43:45.634572 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:45.636080 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.637601 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:43:45.638609 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:43:45.734618 [debug] [Thread-1 (]: SQL status: OK in 0.096 seconds
[0m16:43:45.738679 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:43:45.738679 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:43:45.738679 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:45.741196 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:43:45.742197 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:43:45.742197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:43:45.742706 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.745955 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:43:45.746953 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:43:45.747460 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:45.749978 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:43:45.750988 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09D9AB080>]}
[0m16:43:45.751495 [info ] [Thread-1 (]: 83 of 97 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 0.13s]
[0m16:43:45.752069 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:43:45.752069 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:43:45.753076 [info ] [Thread-1 (]: 84 of 97 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:43:45.754188 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:43:45.754188 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:43:45.758891 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:43:45.760491 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:43:45.764958 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:43:45.766632 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:43:45.766632 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:43:45.767172 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:45.767740 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:45.769255 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:43:45.769255 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:43:46.031023 [debug] [Thread-1 (]: SQL status: OK in 0.261 seconds
[0m16:43:46.034072 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:43:46.034578 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:43:46.035343 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:46.036903 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:43:46.036903 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:43:46.038180 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:43:46.048777 [debug] [Thread-1 (]: SQL status: OK in 0.010 seconds
[0m16:43:46.056600 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:43:46.057217 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:43:46.058226 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.060226 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:43:46.061740 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0AC2F7500>]}
[0m16:43:46.063257 [info ] [Thread-1 (]: 84 of 97 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.31s]
[0m16:43:46.063257 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:43:46.065647 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:43:46.066680 [info ] [Thread-1 (]: 85 of 97 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:43:46.067760 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:43:46.069285 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:43:46.073849 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:43:46.075238 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:43:46.079527 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:43:46.081479 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:43:46.082015 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:43:46.082015 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.083036 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.084100 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:43:46.084627 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:43:46.438229 [debug] [Thread-1 (]: SQL status: OK in 0.353 seconds
[0m16:43:46.440299 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:43:46.440299 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:43:46.441845 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:46.442851 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:43:46.443358 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:43:46.443358 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:43:46.553333 [debug] [Thread-1 (]: SQL status: OK in 0.110 seconds
[0m16:43:46.557084 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:43:46.557623 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:43:46.558163 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:43:46.559749 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:43:46.560266 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'd1d57f62-a6c6-4ea4-bd2b-425d848b1b1a', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0AC2F83B0>]}
[0m16:43:46.561365 [info ] [Thread-1 (]: 85 of 97 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.49s]
[0m16:43:46.561886 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:43:46.562426 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:43:46.562950 [info ] [Thread-1 (]: 86 of 97 START test not_null_dim_segmento_id_segmento .......................... [RUN]
[0m16:43:46.564031 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m16:43:46.564559 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:43:46.570915 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:43:46.572510 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:43:46.576867 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:43:46.579639 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:43:46.580218 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m16:43:46.580836 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.582002 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.582002 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:43:46.583220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m16:43:46.583814 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.586337 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m16:43:46.587345 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m16:43:46.587345 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m16:43:46.588343 [info ] [Thread-1 (]: 86 of 97 PASS not_null_dim_segmento_id_segmento ................................ [[32mPASS[0m in 0.02s]
[0m16:43:46.589854 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:43:46.589854 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:43:46.590864 [info ] [Thread-1 (]: 87 of 97 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m16:43:46.591864 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m16:43:46.591864 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:43:46.598889 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:43:46.600884 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:43:46.605412 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:43:46.607929 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:43:46.608932 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m16:43:46.609929 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.610932 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.611932 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:43:46.613438 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:46.616987 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:43:46.619989 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m16:43:46.622988 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m16:43:46.624115 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m16:43:46.625113 [info ] [Thread-1 (]: 87 of 97 PASS relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[32mPASS[0m in 0.03s]
[0m16:43:46.626114 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:43:46.627629 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:43:46.627629 [info ] [Thread-1 (]: 88 of 97 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m16:43:46.628643 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m16:43:46.629641 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:43:46.639211 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:43:46.640210 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:43:46.644728 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:43:46.646742 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:43:46.646742 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m16:43:46.647741 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.648739 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.648739 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:43:46.649250 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:43:46.651841 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:46.654458 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m16:43:46.656169 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m16:43:46.656743 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m16:43:46.657919 [info ] [Thread-1 (]: 88 of 97 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.03s]
[0m16:43:46.659711 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:43:46.659711 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:43:46.660981 [info ] [Thread-1 (]: 89 of 97 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m16:43:46.661573 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m16:43:46.662143 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:43:46.667882 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:43:46.669663 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:43:46.672086 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:43:46.673671 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:43:46.674804 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m16:43:46.675494 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.676809 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.676809 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:43:46.678008 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:46.680048 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.682158 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m16:43:46.684077 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m16:43:46.685169 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m16:43:46.685792 [info ] [Thread-1 (]: 89 of 97 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m16:43:46.688141 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:43:46.689151 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:43:46.689746 [info ] [Thread-1 (]: 90 of 97 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m16:43:46.690966 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m16:43:46.691530 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:43:46.698529 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:43:46.700955 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:43:46.703559 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:43:46.705424 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:43:46.705424 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m16:43:46.705995 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.706869 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.707376 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:43:46.708553 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:46.709706 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.711423 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m16:43:46.713820 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m16:43:46.714504 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m16:43:46.715731 [info ] [Thread-1 (]: 90 of 97 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:43:46.716372 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:43:46.716954 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:43:46.717604 [info ] [Thread-1 (]: 91 of 97 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m16:43:46.718737 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m16:43:46.718737 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:43:46.724651 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:43:46.725807 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:43:46.730499 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:43:46.732697 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:43:46.733290 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m16:43:46.733863 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.736081 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:43:46.736590 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:43:46.737182 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:43:46.738790 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.740375 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m16:43:46.742892 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m16:43:46.744434 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m16:43:46.745446 [info ] [Thread-1 (]: 91 of 97 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.03s]
[0m16:43:46.746443 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:43:46.747441 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:43:46.747441 [info ] [Thread-1 (]: 92 of 97 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m16:43:46.748449 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m16:43:46.749444 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:43:46.753030 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:43:46.755043 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:43:46.761573 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:43:46.765130 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:43:46.766126 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m16:43:46.766126 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.767126 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.768121 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:43:46.768121 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:46.769121 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.771646 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m16:43:46.773156 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m16:43:46.773156 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m16:43:46.774168 [info ] [Thread-1 (]: 92 of 97 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.03s]
[0m16:43:46.775168 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:43:46.777175 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:43:46.779180 [info ] [Thread-1 (]: 93 of 97 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m16:43:46.780185 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m16:43:46.780185 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:43:46.786792 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:43:46.787883 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:43:46.791871 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:43:46.793621 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:43:46.794773 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m16:43:46.794773 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.795351 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.795924 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:43:46.796503 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:46.797710 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.799991 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m16:43:46.801747 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m16:43:46.802342 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m16:43:46.803486 [info ] [Thread-1 (]: 93 of 97 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.02s]
[0m16:43:46.804046 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:43:46.804590 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:43:46.805309 [info ] [Thread-1 (]: 94 of 97 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m16:43:46.805909 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m16:43:46.806674 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:43:46.812524 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:43:46.814219 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:43:46.817854 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:43:46.819596 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:43:46.820175 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m16:43:46.820175 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.821395 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.821960 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:43:46.821960 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m16:43:46.823471 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.825995 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m16:43:46.828010 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m16:43:46.828010 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m16:43:46.829523 [info ] [Thread-1 (]: 94 of 97 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.02s]
[0m16:43:46.831032 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:43:46.832046 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:43:46.833046 [info ] [Thread-1 (]: 95 of 97 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m16:43:46.833046 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m16:43:46.834898 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:43:46.839092 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:43:46.840605 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:43:46.843153 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:43:46.844669 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:43:46.844669 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m16:43:46.845190 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.845190 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.845190 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:43:46.846719 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:43:46.850845 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:43:46.852352 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m16:43:46.853378 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m16:43:46.853378 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m16:43:46.853915 [info ] [Thread-1 (]: 95 of 97 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.02s]
[0m16:43:46.854460 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:43:46.855010 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:43:46.855524 [info ] [Thread-1 (]: 96 of 97 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m16:43:46.856039 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m16:43:46.856039 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:43:46.860074 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:43:46.861620 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:43:46.863134 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:43:46.864638 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:43:46.864638 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m16:43:46.865646 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.866659 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.867220 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:43:46.867220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:43:46.868226 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.869228 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m16:43:46.870239 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m16:43:46.870239 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m16:43:46.870239 [info ] [Thread-1 (]: 96 of 97 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.01s]
[0m16:43:46.871246 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:43:46.871752 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:43:46.872256 [info ] [Thread-1 (]: 97 of 97 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m16:43:46.872256 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m16:43:46.872770 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:43:46.877790 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:43:46.877790 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:43:46.880928 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:43:46.881934 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:43:46.882440 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m16:43:46.882954 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:43:46.882954 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.883961 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:43:46.883961 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m16:43:46.884465 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:43:46.885978 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m16:43:46.886985 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m16:43:46.888247 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m16:43:46.888247 [info ] [Thread-1 (]: 97 of 97 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.02s]
[0m16:43:46.888247 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:43:46.890761 [debug] [MainThread]: Using duckdb connection "master"
[0m16:43:46.890761 [debug] [MainThread]: On master: BEGIN
[0m16:43:46.890761 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:43:46.890761 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:43:46.892270 [debug] [MainThread]: On master: COMMIT
[0m16:43:46.892270 [debug] [MainThread]: Using duckdb connection "master"
[0m16:43:46.892792 [debug] [MainThread]: On master: COMMIT
[0m16:43:46.892792 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:43:46.892792 [debug] [MainThread]: On master: Close
[0m16:43:46.892792 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:43:46.894352 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:43:46.894352 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:43:46.894352 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m16:43:46.895361 [info ] [MainThread]: 
[0m16:43:46.895361 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 10.87 seconds (10.87s).
[0m16:43:46.904619 [debug] [MainThread]: Command end result
[0m16:43:46.951136 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:43:46.954268 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:43:46.962559 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:43:46.963069 [info ] [MainThread]: 
[0m16:43:46.963591 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:43:46.963591 [info ] [MainThread]: 
[0m16:43:46.964120 [info ] [MainThread]: Done. PASS=97 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=97
[0m16:43:46.964120 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:43:46.965630 [debug] [MainThread]: Command `dbt build` succeeded at 16:43:46.965630 after 15.84 seconds
[0m16:43:46.965630 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C095BF1A90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C0981EE7B0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001C09BBFBCB0>]}
[0m16:43:46.965630 [debug] [MainThread]: Flushing usage events
[0m16:43:47.734241 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:44:55.145659 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226BBC6F110>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226BF9143E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226BF914B30>]}


============================== 16:44:55.154306 | 89443cb4-642f-4c95-b0cf-6348dd6c7b6f ==============================
[0m16:44:55.154306 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:44:55.155186 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'False', 'invocation_command': 'dbt build --no-partial-parse', 'indirect_selection': 'eager', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:44:55.444149 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226BFBB2360>]}
[0m16:44:55.532530 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226BC7DA450>]}
[0m16:44:55.535207 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:44:55.840021 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:44:55.841694 [debug] [MainThread]: Partial parsing not enabled
[0m16:44:57.460169 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:44:57.461681 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C13AF380>]}
[0m16:44:58.202798 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:44:58.219733 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1644830>]}
[0m16:44:58.336982 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:44:58.340755 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:44:58.422714 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1399220>]}
[0m16:44:58.423854 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:44:58.431309 [info ] [MainThread]: 
[0m16:44:58.432854 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:44:58.432854 [info ] [MainThread]: 
[0m16:44:58.433866 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:44:58.440063 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:44:58.613377 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:44:58.614892 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:44:58.614892 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:44:59.303383 [debug] [ThreadPool]: SQL status: OK in 0.688 seconds
[0m16:44:59.304430 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:44:59.305479 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:44:59.305996 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:44:59.310018 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:44:59.310018 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:44:59.310018 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:44:59.311644 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:44:59.313156 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:44:59.313156 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:44:59.314163 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:44:59.314163 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:44:59.314163 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:44:59.315163 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:44:59.315669 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:44:59.315669 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:44:59.316674 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:44:59.317213 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:44:59.317213 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:44:59.320684 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:44:59.325480 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:44:59.325480 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:44:59.326491 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:44:59.326491 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:44:59.326491 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:44:59.327491 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:44:59.339926 [debug] [ThreadPool]: SQL status: OK in 0.012 seconds
[0m16:44:59.340471 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:44:59.343494 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:44:59.344148 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:44:59.345193 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C152E810>]}
[0m16:44:59.345720 [debug] [MainThread]: Using duckdb connection "master"
[0m16:44:59.345720 [debug] [MainThread]: On master: BEGIN
[0m16:44:59.346245 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:44:59.346767 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:44:59.346767 [debug] [MainThread]: On master: COMMIT
[0m16:44:59.347291 [debug] [MainThread]: Using duckdb connection "master"
[0m16:44:59.347291 [debug] [MainThread]: On master: COMMIT
[0m16:44:59.347820 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:44:59.348348 [debug] [MainThread]: On master: Close
[0m16:44:59.352030 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:44:59.353035 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:44:59.353542 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:44:59.354128 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:44:59.363743 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:44:59.365252 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:44:59.399739 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:44:59.400801 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:44:59.401345 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:44:59.401916 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:44:59.402453 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:44:59.402971 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:44:59.402971 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
    UNION ALL
    SELECT * FROM portfolio_fallback
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:44:59.639470 [debug] [Thread-1 (]: SQL status: OK in 0.235 seconds
[0m16:44:59.646695 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:44:59.647295 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:44:59.648303 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:44:59.664786 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:44:59.665377 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:44:59.665377 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:44:59.674869 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:44:59.681066 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:44:59.681693 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:44:59.682825 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:44:59.686720 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:44:59.689876 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1A611C0>]}
[0m16:44:59.690886 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.33s]
[0m16:44:59.692895 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:44:59.692895 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:44:59.694479 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:44:59.695487 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:44:59.695487 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:44:59.701746 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:44:59.703980 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:44:59.711283 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:44:59.712924 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:44:59.713461 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:44:59.713461 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:44:59.714528 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:44:59.715062 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:44:59.715613 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL

    UNION

    -- Fallback: localizações de instituições presentes apenas nas tabelas SCR
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources

UNION

-- Sentinel para instituições sem dados de localização (cidade, uf, regiao = NULL)
SELECT
    md5(cast('' as varchar)) as id_localizacao,
    NULL as cidade,
    NULL as uf,
    NULL as regiao
    );
  
  
[0m16:44:59.783199 [debug] [Thread-1 (]: SQL status: OK in 0.067 seconds
[0m16:44:59.785789 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:44:59.785789 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:44:59.787850 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:44:59.787850 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:44:59.789976 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:44:59.789976 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:44:59.794842 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:44:59.799118 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:44:59.799646 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:44:59.799646 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:44:59.800655 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:44:59.801679 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B32030>]}
[0m16:44:59.802290 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.11s]
[0m16:44:59.802832 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:44:59.803359 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:44:59.804468 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m16:44:59.805045 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:44:59.805652 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:44:59.810197 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:44:59.811838 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:44:59.815998 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:44:59.817590 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:44:59.818129 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:44:59.818687 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:44:59.819264 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:44:59.819264 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:44:59.819806 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:44:59.833013 [debug] [Thread-1 (]: SQL status: OK in 0.013 seconds
[0m16:44:59.837708 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:44:59.838717 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:44:59.840230 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:44:59.843297 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:44:59.844308 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:44:59.844815 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:44:59.849066 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:44:59.851685 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:44:59.852363 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:44:59.853404 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:44:59.855158 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:44:59.855158 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B629F0>]}
[0m16:44:59.856166 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.05s]
[0m16:44:59.857178 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:44:59.857762 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:44:59.857762 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:44:59.858768 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:44:59.858768 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:44:59.865300 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:44:59.866361 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:44:59.869129 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:44:59.870708 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:44:59.871220 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:44:59.871220 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:44:59.871220 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:44:59.871220 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:44:59.872731 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:45:00.541064 [debug] [Thread-1 (]: SQL status: OK in 0.668 seconds
[0m16:45:00.547313 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:45:00.547821 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:45:00.552835 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:00.555354 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:45:00.555884 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:45:00.557896 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:45:00.828006 [debug] [Thread-1 (]: SQL status: OK in 0.269 seconds
[0m16:45:00.831199 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:45:00.831199 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:45:00.832727 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:00.834320 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:45:00.834320 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B6FDD0>]}
[0m16:45:00.835924 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.98s]
[0m16:45:00.837434 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:45:00.837434 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:45:00.838440 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m16:45:00.838440 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:45:00.838440 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:45:00.844601 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:00.846612 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:45:00.853422 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:00.855172 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:00.856181 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:45:00.856690 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:00.857197 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:00.858207 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:00.859208 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:45:01.160253 [debug] [Thread-1 (]: SQL status: OK in 0.299 seconds
[0m16:45:01.165907 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:01.166429 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m16:45:01.168016 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:01.170121 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:45:01.170121 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:01.170642 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:45:01.185853 [debug] [Thread-1 (]: SQL status: OK in 0.015 seconds
[0m16:45:01.189884 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:01.189884 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m16:45:01.190894 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:01.193515 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:45:01.194041 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B4DF10>]}
[0m16:45:01.195115 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.36s]
[0m16:45:01.196676 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:45:01.197181 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:45:01.198234 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m16:45:01.198761 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:45:01.200276 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:45:01.207465 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:01.208473 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:45:01.214127 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:01.216638 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:01.217235 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:45:01.217235 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:01.219246 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:01.219753 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:01.220839 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:45:01.297306 [debug] [Thread-1 (]: SQL status: OK in 0.076 seconds
[0m16:45:01.302046 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:01.302046 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m16:45:01.303557 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:01.304677 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:45:01.306292 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:01.306292 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:45:01.376532 [debug] [Thread-1 (]: SQL status: OK in 0.070 seconds
[0m16:45:01.379630 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:01.379630 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m16:45:01.381312 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:01.382835 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:45:01.383844 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B4DE20>]}
[0m16:45:01.385848 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.19s]
[0m16:45:01.388378 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:45:01.389038 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:45:01.391077 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m16:45:01.393117 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:45:01.394631 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:45:01.400628 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:01.402357 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:45:01.408528 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:01.410038 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:01.411683 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:45:01.411683 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:01.413771 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:01.415278 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:01.416294 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:45:01.492463 [debug] [Thread-1 (]: SQL status: OK in 0.074 seconds
[0m16:45:01.497673 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:01.499189 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:45:01.500195 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:01.501792 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:45:01.502386 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:01.502894 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:45:01.641550 [debug] [Thread-1 (]: SQL status: OK in 0.137 seconds
[0m16:45:01.645350 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:01.645873 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:45:01.647640 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:01.650229 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:45:01.651237 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B4B530>]}
[0m16:45:01.651766 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.26s]
[0m16:45:01.652982 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:45:01.652982 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:45:01.654082 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:45:01.655162 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:45:01.655695 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:45:01.662641 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:01.665663 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:45:01.671283 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:01.673919 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:01.673919 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:45:01.674920 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:01.675920 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:01.675920 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:01.676921 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:45:02.213546 [debug] [Thread-1 (]: SQL status: OK in 0.536 seconds
[0m16:45:02.217152 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:02.217655 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:45:02.217655 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:02.219225 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:45:02.219225 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:02.220231 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:45:02.390022 [debug] [Thread-1 (]: SQL status: OK in 0.170 seconds
[0m16:45:02.393576 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:02.394080 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:45:02.394639 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:02.395643 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:45:02.395643 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1A3F170>]}
[0m16:45:02.397147 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.74s]
[0m16:45:02.398160 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:45:02.398872 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:45:02.399884 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m16:45:02.400897 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:45:02.401498 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:45:02.406305 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:02.407905 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:45:02.410554 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:02.412124 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:02.412124 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:45:02.413131 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:02.414333 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:02.414849 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:02.415381 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:45:02.422762 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:45:02.426900 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:02.426900 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:45:02.428947 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:02.432119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:45:02.432119 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:02.432119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:45:02.442121 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:45:02.444668 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:02.444668 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:45:02.445674 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:02.448189 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:45:02.449078 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226CF933470>]}
[0m16:45:02.449606 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.05s]
[0m16:45:02.450697 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:45:02.450697 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:45:02.452786 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:45:02.453318 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:45:02.453841 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:45:02.457056 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:02.458657 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:45:02.464969 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:02.466562 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:02.466562 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:45:02.466562 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:02.467569 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:02.467569 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:02.467569 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:45:02.506639 [debug] [Thread-1 (]: SQL status: OK in 0.038 seconds
[0m16:45:02.509338 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:02.509869 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:45:02.510383 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:02.511927 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:45:02.511927 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:02.512433 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:45:02.527003 [debug] [Thread-1 (]: SQL status: OK in 0.014 seconds
[0m16:45:02.529111 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:02.529649 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:45:02.530180 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:02.531226 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:45:02.531749 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1A4BAD0>]}
[0m16:45:02.531749 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.08s]
[0m16:45:02.532938 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:45:02.532938 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:45:02.533481 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:45:02.534000 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:45:02.534531 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:45:02.539198 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:02.540198 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:45:02.544385 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:02.545395 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:02.545395 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:45:02.546905 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:02.547501 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:02.547501 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:02.547501 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:45:02.923049 [debug] [Thread-1 (]: SQL status: OK in 0.375 seconds
[0m16:45:02.926561 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:02.926561 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:45:02.926561 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:02.928081 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:45:02.928081 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:02.928081 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:45:03.195457 [debug] [Thread-1 (]: SQL status: OK in 0.266 seconds
[0m16:45:03.199738 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:03.199738 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:45:03.199738 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:03.201848 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:45:03.202433 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226CF973F20>]}
[0m16:45:03.202945 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.67s]
[0m16:45:03.203464 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:45:03.204062 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:45:03.204647 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m16:45:03.205186 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m16:45:03.205186 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:45:03.206190 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:45:03.226811 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:03.226811 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:45:03.226811 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.227811 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:03.228313 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:03.228912 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m16:45:03.232507 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:03.242235 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:03.243809 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:03.266401 [debug] [Thread-1 (]: SQL status: OK in 0.022 seconds
[0m16:45:03.271590 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:03.273101 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:45:03.274105 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:03.274105 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:45:03.276659 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:03.278174 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:45:03.279177 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226CF972810>]}
[0m16:45:03.279680 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.07s]
[0m16:45:03.279680 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:45:03.279680 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:45:03.281185 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m16:45:03.281185 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m16:45:03.282715 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:45:03.282715 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:45:03.290036 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:45:03.290558 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m16:45:03.290558 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.291084 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:03.291612 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:45:03.291612 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m16:45:03.293122 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.294160 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:45:03.294724 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:03.295728 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.297231 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:45:03.299237 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:45:03.299237 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:45:03.299742 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:45:03.303347 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:03.305333 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m16:45:03.306341 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B455E0>]}
[0m16:45:03.307861 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.03s]
[0m16:45:03.308979 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:45:03.310207 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:45:03.310737 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m16:45:03.311334 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m16:45:03.311866 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:45:03.312394 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:45:03.317812 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:45:03.319388 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m16:45:03.320396 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.321408 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.321408 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:45:03.321408 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m16:45:03.323589 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:03.325198 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:45:03.325198 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:03.328207 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:03.329221 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:45:03.332748 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:45:03.333431 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:45:03.334441 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:45:03.338320 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:03.339772 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m16:45:03.340301 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C13D2B70>]}
[0m16:45:03.340885 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.03s]
[0m16:45:03.341994 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:45:03.342544 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:45:03.343062 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m16:45:03.344132 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m16:45:03.344673 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:45:03.344673 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:45:03.348276 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:45:03.348276 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m16:45:03.348276 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.349279 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.349783 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:45:03.349783 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m16:45:03.350786 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:03.351895 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:45:03.351895 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:03.354077 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.354611 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:45:03.357233 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:45:03.357737 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:45:03.357737 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:45:03.360254 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:03.361870 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m16:45:03.363387 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C157AEA0>]}
[0m16:45:03.364060 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.02s]
[0m16:45:03.365699 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:45:03.366243 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:45:03.366777 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m16:45:03.367307 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:45:03.367837 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:45:03.367837 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:45:03.371631 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:03.372221 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:45:03.372734 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.373268 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.373268 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:03.373268 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m16:45:03.374274 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:03.375275 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:03.376273 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:03.380384 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:03.382897 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:03.386922 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:45:03.387937 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:03.388468 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:45:03.392682 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:03.394287 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:45:03.394814 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B98A70>]}
[0m16:45:03.395341 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.03s]
[0m16:45:03.396398 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:45:03.396925 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:45:03.397459 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m16:45:03.398466 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:45:03.398466 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:45:03.399465 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:45:03.404721 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:03.404721 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:45:03.406311 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.406311 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.407317 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:03.407317 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m16:45:03.408482 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.411053 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:03.412058 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:03.415751 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:03.418092 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:03.421281 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:45:03.421810 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:03.421810 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:45:03.424422 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:03.425427 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:45:03.425427 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B98530>]}
[0m16:45:03.426431 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.03s]
[0m16:45:03.426431 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:45:03.427430 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:45:03.427430 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m16:45:03.428433 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:45:03.428940 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:45:03.429445 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:45:03.433949 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:03.434963 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:45:03.435958 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.436466 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.436973 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:03.436973 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m16:45:03.438981 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.440488 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:03.440488 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:03.443216 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:03.444275 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:03.447212 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:45:03.447747 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:03.447747 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:45:03.449260 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.449260 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:45:03.450265 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B91B50>]}
[0m16:45:03.450265 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.02s]
[0m16:45:03.451265 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:45:03.451265 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:45:03.451768 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m16:45:03.452826 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:45:03.452826 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:45:03.453338 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:45:03.457061 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:03.457626 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:45:03.457626 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.457626 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:03.458631 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:03.458631 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m16:45:03.458631 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:03.460137 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:03.460137 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:03.462844 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:03.463536 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:03.467647 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:45:03.469277 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:03.470794 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:45:03.479296 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:45:03.480306 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:45:03.481304 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1399790>]}
[0m16:45:03.481811 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.03s]
[0m16:45:03.482833 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:45:03.484345 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:45:03.485353 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m16:45:03.486871 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:45:03.486871 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:45:03.487879 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:45:03.494399 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:03.494399 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:45:03.495401 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.496416 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.497413 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:03.497413 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m16:45:03.498414 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.500589 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:03.500589 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:03.504107 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:03.505521 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:03.508865 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:45:03.510380 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:03.510380 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:45:03.516625 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:03.521609 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:45:03.523866 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C13D29F0>]}
[0m16:45:03.525384 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.04s]
[0m16:45:03.529022 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:45:03.529540 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:45:03.530546 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m16:45:03.532871 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m16:45:03.533377 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:45:03.534384 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:45:03.541655 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:45:03.541655 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m16:45:03.542658 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.543931 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.543931 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:45:03.544939 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m16:45:03.546064 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:03.547782 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:45:03.548949 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:03.552651 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:03.553717 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:45:03.557095 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:45:03.558148 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:45:03.558148 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:45:03.564189 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:03.565768 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m16:45:03.566768 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B557C0>]}
[0m16:45:03.567765 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.03s]
[0m16:45:03.576305 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:45:03.577811 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:45:03.580169 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m16:45:03.581176 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m16:45:03.581176 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:45:03.594920 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:45:03.596929 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:45:03.624341 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:45:03.626349 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:45:03.627352 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m16:45:03.627858 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.629567 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.630074 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:45:03.631083 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:03.634604 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:03.640113 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m16:45:03.641628 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m16:45:03.642628 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m16:45:03.643134 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.06s]
[0m16:45:03.647128 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:45:03.647633 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:45:03.648642 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m16:45:03.650159 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m16:45:03.651166 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:45:03.657714 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:45:03.659723 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:45:03.663754 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:45:03.667272 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:45:03.667272 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m16:45:03.668283 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.669280 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.670789 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:45:03.671466 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:45:03.672990 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.676006 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m16:45:03.678012 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m16:45:03.678012 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m16:45:03.679521 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.03s]
[0m16:45:03.686002 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:45:03.687015 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:45:03.688015 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m16:45:03.689012 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m16:45:03.689012 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:45:03.699687 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:45:03.701696 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:45:03.705723 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:45:03.708262 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:45:03.709265 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m16:45:03.710261 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.714297 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:03.715501 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:45:03.716515 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:03.721316 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:03.724862 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m16:45:03.726871 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m16:45:03.726871 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m16:45:03.729104 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.04s]
[0m16:45:03.732636 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:45:03.733267 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:45:03.733267 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m16:45:03.734777 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m16:45:03.735788 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:45:03.742767 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:45:03.743638 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:45:03.748157 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:45:03.751154 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:45:03.752662 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m16:45:03.753670 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.758409 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:03.758409 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:45:03.759414 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:45:03.761932 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.764463 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m16:45:03.766465 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m16:45:03.767202 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m16:45:03.768216 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.03s]
[0m16:45:03.770736 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:45:03.771257 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:45:03.771257 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m16:45:03.772773 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m16:45:03.773360 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:45:03.782086 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:45:03.783098 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:45:03.787116 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:45:03.790533 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:45:03.790533 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m16:45:03.791540 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.792540 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.793045 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:45:03.793562 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:03.799852 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:03.802367 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m16:45:03.803883 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m16:45:03.804999 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m16:45:03.805335 [info ] [Thread-1 (]: 26 of 97 PASS relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[32mPASS[0m in 0.03s]
[0m16:45:03.806341 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:45:03.807697 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:45:03.808349 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m16:45:03.809352 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m16:45:03.809352 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:45:03.816907 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:45:03.817910 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:45:03.822951 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:45:03.828616 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:45:03.829619 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m16:45:03.830619 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.831125 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.832633 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:45:03.832633 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:03.837650 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:03.839994 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m16:45:03.840652 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m16:45:03.842680 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m16:45:03.844121 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.04s]
[0m16:45:03.846196 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:45:03.846720 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:45:03.847239 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m16:45:03.847916 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m16:45:03.848925 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:45:03.858966 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:45:03.861480 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:45:03.866234 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:45:03.869243 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:45:03.870242 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m16:45:03.871243 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.872751 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:03.873759 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:45:03.874758 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:03.876408 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.879429 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m16:45:03.881442 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m16:45:03.881442 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m16:45:03.882952 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.04s]
[0m16:45:03.884835 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:45:03.884835 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:45:03.886354 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m16:45:03.887361 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m16:45:03.888364 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:45:03.895392 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:45:03.903614 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:45:03.910295 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:45:03.912343 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:45:03.913400 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m16:45:03.914442 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.916459 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:03.917464 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:45:03.918460 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:03.923085 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:03.926616 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m16:45:03.927420 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m16:45:03.928930 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m16:45:03.929940 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.04s]
[0m16:45:03.935983 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:45:03.936980 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:45:03.937977 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m16:45:03.938975 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m16:45:03.939976 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:45:03.948408 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:45:03.950284 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:45:03.955839 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:45:03.957838 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:45:03.958348 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m16:45:03.959047 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.960553 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.961561 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:45:03.961561 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:03.964083 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.966498 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m16:45:03.968506 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m16:45:03.969509 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m16:45:03.970510 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.03s]
[0m16:45:03.973039 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:45:03.973545 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:45:03.974048 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m16:45:03.975056 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m16:45:03.976569 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:45:03.984210 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:45:03.986431 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:45:03.990369 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:45:03.992416 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:45:03.993935 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m16:45:03.994772 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:03.995278 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:03.996843 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:45:03.997421 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:03.999433 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.001295 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m16:45:04.002827 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m16:45:04.003838 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m16:45:04.004853 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.03s]
[0m16:45:04.006307 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:45:04.007317 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:45:04.008326 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:04.010327 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m16:45:04.010840 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:45:04.023090 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:45:04.025098 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:45:04.032558 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:45:04.034075 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:45:04.035238 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m16:45:04.035238 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.035743 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.035743 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:45:04.036750 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.040772 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:04.040772 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m16:45:04.042811 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m16:45:04.044389 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m16:45:04.045404 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.04s]
[0m16:45:04.045404 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:45:04.046921 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:45:04.046921 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:04.047519 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m16:45:04.047519 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:45:04.124804 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:45:04.125804 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:45:04.128310 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:45:04.130382 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:45:04.130382 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m16:45:04.130382 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.131736 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.131736 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:45:04.132740 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.138373 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:45:04.140890 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m16:45:04.142396 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m16:45:04.142902 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m16:45:04.142902 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.10s]
[0m16:45:04.142902 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:45:04.144464 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:45:04.144464 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m16:45:04.145470 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m16:45:04.145470 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:45:04.149139 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:45:04.151653 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:45:04.153736 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:45:04.155198 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:45:04.155198 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m16:45:04.155198 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.156209 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.156721 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:45:04.157234 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.158246 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.159246 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m16:45:04.160247 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m16:45:04.160757 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m16:45:04.160757 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:45:04.161763 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:45:04.161763 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:45:04.163103 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m16:45:04.164110 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m16:45:04.164110 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:45:04.167656 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:45:04.167656 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:45:04.171261 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:45:04.171261 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:45:04.172792 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m16:45:04.172792 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.172792 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.173805 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:45:04.173805 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.174805 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.176799 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m16:45:04.178305 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m16:45:04.178305 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m16:45:04.179311 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:45:04.180317 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:45:04.180317 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:45:04.181326 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:04.181326 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m16:45:04.181326 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:45:04.185987 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:45:04.186999 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:45:04.190051 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:45:04.190565 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:45:04.190565 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m16:45:04.190565 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.192076 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.192601 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:45:04.192601 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.195655 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:04.197172 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m16:45:04.197172 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m16:45:04.198179 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m16:45:04.198179 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:45:04.199686 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:45:04.199686 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:45:04.199686 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:04.199686 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m16:45:04.201204 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:45:04.206143 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:45:04.206143 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:45:04.210080 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:45:04.211741 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:45:04.212748 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m16:45:04.212748 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.213252 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.213252 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:45:04.213252 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.220167 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:45:04.221791 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m16:45:04.222795 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m16:45:04.223297 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m16:45:04.223297 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:45:04.224806 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:45:04.224806 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:45:04.225819 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m16:45:04.225819 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m16:45:04.226815 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:45:04.230341 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:45:04.232347 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:45:04.234387 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:45:04.237034 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:45:04.237542 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m16:45:04.237542 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.238548 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.238548 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:45:04.238548 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.240053 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.243079 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m16:45:04.245094 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m16:45:04.245094 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m16:45:04.245094 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.02s]
[0m16:45:04.247299 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:45:04.248304 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:45:04.249304 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m16:45:04.249809 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m16:45:04.249809 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:45:04.255283 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:45:04.257303 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:45:04.260465 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:45:04.261981 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:45:04.262487 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m16:45:04.262487 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.264025 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.264025 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:45:04.265022 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.265528 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.267543 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m16:45:04.267543 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m16:45:04.267543 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m16:45:04.269170 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m16:45:04.269747 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:45:04.270285 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:45:04.270285 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:04.271806 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m16:45:04.271806 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:45:04.276333 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:45:04.277839 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:45:04.281017 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:45:04.282022 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:45:04.282022 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m16:45:04.282526 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.283044 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.283044 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:45:04.283044 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.286062 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:04.287573 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m16:45:04.288577 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m16:45:04.288577 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m16:45:04.288577 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:45:04.290081 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:45:04.291085 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:45:04.291085 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:04.291085 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m16:45:04.292085 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:45:04.297116 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:45:04.297628 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:45:04.299139 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:45:04.301146 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:45:04.301146 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m16:45:04.301651 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.302258 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.302824 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:45:04.302824 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.306419 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:04.307539 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m16:45:04.308544 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m16:45:04.308544 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m16:45:04.310049 [info ] [Thread-1 (]: 41 of 97 PASS relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:45:04.310049 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:45:04.310049 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:45:04.310049 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m16:45:04.311722 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m16:45:04.312728 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:45:04.319275 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:45:04.320282 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:45:04.322810 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:45:04.323816 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:45:04.324820 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m16:45:04.324820 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.325831 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.325831 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:45:04.325831 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.327830 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.329338 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m16:45:04.329338 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m16:45:04.330344 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m16:45:04.330344 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.02s]
[0m16:45:04.331346 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:45:04.331853 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:45:04.331853 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m16:45:04.332876 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m16:45:04.332876 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:45:04.337413 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:45:04.338422 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:45:04.340948 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:45:04.342448 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:45:04.342959 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m16:45:04.342959 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.342959 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.342959 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:45:04.342959 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.344614 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.346624 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m16:45:04.347128 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m16:45:04.347128 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m16:45:04.348133 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.02s]
[0m16:45:04.349647 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:45:04.349647 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:45:04.349647 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:04.351843 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m16:45:04.351843 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:45:04.356533 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:45:04.357590 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:45:04.360107 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:45:04.360107 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:45:04.361699 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m16:45:04.361699 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.362708 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.363578 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:45:04.364085 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.366606 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:04.367112 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m16:45:04.368119 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m16:45:04.369127 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m16:45:04.369691 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:45:04.370236 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:45:04.371243 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:45:04.371748 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:04.372253 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m16:45:04.372253 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:45:04.375783 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:45:04.377784 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:45:04.379967 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:45:04.381483 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:45:04.381483 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m16:45:04.381483 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.383000 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.384012 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:45:04.384520 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.387536 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:04.388542 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m16:45:04.390049 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m16:45:04.391055 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m16:45:04.391055 [info ] [Thread-1 (]: 45 of 97 PASS relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:45:04.392560 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:45:04.393072 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:45:04.394076 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m16:45:04.394580 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m16:45:04.395276 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:45:04.399371 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:45:04.400883 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:45:04.404185 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:45:04.406201 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:45:04.406201 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m16:45:04.407207 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.407711 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.407711 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:45:04.407711 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.408716 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.410917 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m16:45:04.411923 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m16:45:04.412430 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m16:45:04.412951 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.02s]
[0m16:45:04.413956 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:45:04.413956 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:45:04.414957 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m16:45:04.415460 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m16:45:04.415460 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:45:04.420359 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:45:04.421365 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:45:04.422901 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:45:04.425044 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:45:04.425044 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m16:45:04.426055 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.426736 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.426736 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:45:04.426736 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.428257 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.429778 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m16:45:04.431285 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m16:45:04.431285 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m16:45:04.431285 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:45:04.432828 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:45:04.432828 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:45:04.434510 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:04.434510 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m16:45:04.434510 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:45:04.440134 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:45:04.441144 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:45:04.445317 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:45:04.447833 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:45:04.447833 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m16:45:04.449347 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.450327 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.450327 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:45:04.451858 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.457265 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:04.460100 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m16:45:04.461111 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m16:45:04.462614 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m16:45:04.463139 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:45:04.465266 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:45:04.466097 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:45:04.466926 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:04.467447 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m16:45:04.467447 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:45:04.476279 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:45:04.479366 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:45:04.484568 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:45:04.487387 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:45:04.488396 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m16:45:04.488396 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.489914 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.491411 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:45:04.491920 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.500436 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:45:04.503994 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m16:45:04.506565 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m16:45:04.507637 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m16:45:04.508212 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:45:04.509221 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:45:04.510732 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:45:04.510732 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m16:45:04.511740 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m16:45:04.512752 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:45:04.518642 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:45:04.521637 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:45:04.525778 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:45:04.527343 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:45:04.527897 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m16:45:04.528906 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.529922 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.530496 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:45:04.531508 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.533611 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.535909 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m16:45:04.537921 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m16:45:04.538851 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m16:45:04.539357 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.03s]
[0m16:45:04.540876 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:45:04.541886 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:45:04.542899 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m16:45:04.544414 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m16:45:04.544414 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:45:04.554695 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:45:04.556744 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:45:04.560517 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:45:04.563042 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:45:04.564053 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m16:45:04.565062 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.573092 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:45:04.574421 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:45:04.575509 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.576645 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.578159 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m16:45:04.579734 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m16:45:04.579734 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m16:45:04.581324 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.04s]
[0m16:45:04.581324 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:45:04.583641 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:45:04.584710 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:04.585233 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m16:45:04.586280 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:45:04.594527 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:45:04.595536 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:45:04.601445 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:45:04.604091 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:45:04.605157 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m16:45:04.605705 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.606239 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.606774 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:45:04.607315 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.609513 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:04.611642 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m16:45:04.611642 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m16:45:04.611642 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m16:45:04.613861 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:45:04.613861 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:45:04.614871 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:45:04.615443 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:04.616453 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m16:45:04.616453 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:45:04.622843 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:45:04.623851 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:45:04.626607 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:45:04.628169 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:45:04.628701 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m16:45:04.629016 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.630205 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.631286 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:45:04.631828 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.634489 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:04.638097 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m16:45:04.640115 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m16:45:04.641179 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m16:45:04.641179 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:45:04.642683 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:45:04.642683 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:45:04.644262 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m16:45:04.645410 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m16:45:04.645410 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:45:04.652712 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:45:04.655757 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:45:04.660966 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:45:04.661485 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:45:04.661485 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m16:45:04.663010 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.664019 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.664019 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:45:04.664019 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.666073 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.669254 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m16:45:04.670858 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m16:45:04.671916 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m16:45:04.672451 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.03s]
[0m16:45:04.673482 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:45:04.674027 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:45:04.674027 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m16:45:04.675032 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m16:45:04.675032 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:45:04.682973 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:45:04.685158 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:45:04.689284 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:45:04.691356 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:45:04.691878 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m16:45:04.692923 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.692923 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.694523 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:45:04.695537 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.697043 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.698052 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m16:45:04.699559 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m16:45:04.699559 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m16:45:04.701744 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.03s]
[0m16:45:04.702879 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:45:04.703395 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:45:04.703987 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:04.705118 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m16:45:04.706126 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:45:04.717289 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:45:04.718365 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:45:04.720521 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:45:04.721535 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:45:04.722991 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m16:45:04.722991 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.723668 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.724682 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:45:04.724682 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.728191 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:04.729719 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m16:45:04.729719 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m16:45:04.731228 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m16:45:04.731228 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:45:04.732756 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:45:04.732756 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:45:04.734353 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:04.734353 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m16:45:04.734353 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:45:04.743913 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:45:04.745528 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:45:04.748181 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:45:04.749729 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:45:04.749729 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m16:45:04.749729 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.751241 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.751836 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:45:04.751836 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.756280 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:04.759015 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m16:45:04.760525 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m16:45:04.761560 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m16:45:04.762616 [info ] [Thread-1 (]: 57 of 97 PASS relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:45:04.763147 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:45:04.764664 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:45:04.765673 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m16:45:04.766814 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m16:45:04.767540 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:45:04.773883 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:45:04.774965 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:45:04.777818 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:45:04.780005 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:45:04.781161 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m16:45:04.781161 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.781161 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.782677 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:45:04.782677 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.784303 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.786553 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m16:45:04.787074 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m16:45:04.788081 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m16:45:04.788081 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.02s]
[0m16:45:04.789081 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:45:04.790081 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:45:04.790587 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m16:45:04.790587 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m16:45:04.792095 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:45:04.797989 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:45:04.799615 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:45:04.803522 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:45:04.805181 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:45:04.805716 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m16:45:04.805716 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.806233 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.806233 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:45:04.807243 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.807756 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.808763 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m16:45:04.808763 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m16:45:04.810275 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m16:45:04.810275 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.02s]
[0m16:45:04.811918 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:45:04.811918 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:45:04.812857 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:04.813869 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m16:45:04.813869 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:45:04.821829 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:45:04.823935 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:45:04.831911 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:45:04.834174 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:45:04.834717 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m16:45:04.834717 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.836741 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.836741 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:45:04.837751 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.842835 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:04.844424 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m16:45:04.845430 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m16:45:04.846937 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m16:45:04.848119 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:45:04.848119 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:45:04.849634 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:45:04.849634 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:04.849634 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m16:45:04.851145 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:45:04.858210 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:45:04.859208 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:45:04.863233 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:45:04.865351 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:45:04.866868 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m16:45:04.867375 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.868963 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.869549 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:45:04.870130 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:04.878924 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:45:04.880014 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m16:45:04.881536 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m16:45:04.881536 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m16:45:04.881536 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:45:04.881536 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:45:04.883655 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:45:04.884214 [info ] [Thread-1 (]: 62 of 97 START sql table model main.dim_atividade .............................. [RUN]
[0m16:45:04.885758 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m16:45:04.885758 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:45:04.888448 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:04.889980 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:45:04.893047 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:04.895619 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:04.896630 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:45:04.897138 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.898755 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.899282 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:04.899811 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:45:04.900864 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.904665 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:04.905267 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:45:04.906442 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:04.907576 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:45:04.907576 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:04.907576 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:45:04.910150 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:04.911778 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:04.911778 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:45:04.913282 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:04.914932 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:45:04.915528 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226CF948D10>]}
[0m16:45:04.916541 [info ] [Thread-1 (]: 62 of 97 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.03s]
[0m16:45:04.916541 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:45:04.917882 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:45:04.917882 [info ] [Thread-1 (]: 63 of 97 START sql table model main.dim_classe_instituicao ..................... [RUN]
[0m16:45:04.920176 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:45:04.921183 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:45:04.925896 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:04.927460 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:45:04.930128 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:04.931139 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:04.931139 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:45:04.931139 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:04.932982 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.933993 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:04.933993 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:45:04.936052 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:04.940602 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:04.941316 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:45:04.941316 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:04.942843 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:45:04.942843 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:04.942843 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:45:04.945490 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:04.948015 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:04.949525 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:45:04.949525 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:04.951652 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:45:04.952468 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B74DD0>]}
[0m16:45:12.066699 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:45:12.072048 [info ] [Thread-1 (]: 63 of 97 OK created sql table model main.dim_classe_instituicao ................ [[32mOK[0m in 0.03s]
[0m16:45:12.075094 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:45:12.076604 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:45:12.076604 [info ] [Thread-1 (]: 64 of 97 START sql table model main.dim_consolidado ............................ [RUN]
[0m16:45:12.079124 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:45:12.080125 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:45:12.085168 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:12.087482 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:45:12.092820 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:12.095142 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:12.096143 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:45:12.096652 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.097685 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.098694 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:12.098694 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:45:12.100204 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.106050 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:12.106583 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:45:12.107758 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.110039 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:45:12.110866 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:12.110866 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:45:12.114979 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:12.119132 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:12.120133 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:45:12.121133 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.123650 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:45:12.124649 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226CF918710>]}
[0m16:45:12.125574 [info ] [Thread-1 (]: 64 of 97 OK created sql table model main.dim_consolidado ....................... [[32mOK[0m in 0.05s]
[0m16:45:12.126508 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:45:12.127514 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:45:12.128200 [info ] [Thread-1 (]: 65 of 97 START sql table model main.dim_controle ............................... [RUN]
[0m16:45:12.129267 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:45:12.129922 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:45:12.134688 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:12.137697 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:45:12.142719 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:12.144727 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:12.144727 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:45:12.145736 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.146735 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.148556 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:12.148556 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:45:12.152071 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.156994 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:12.157529 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:45:12.159182 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.160693 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:45:12.161701 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:12.161701 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:45:12.165718 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:12.172095 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:12.173103 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:45:12.174114 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:12.176125 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:45:12.177125 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226CF94FB60>]}
[0m16:45:12.178126 [info ] [Thread-1 (]: 65 of 97 OK created sql table model main.dim_controle .......................... [[32mOK[0m in 0.05s]
[0m16:45:12.180075 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:45:12.180075 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:45:12.184124 [info ] [Thread-1 (]: 66 of 97 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m16:45:12.192938 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:45:12.193946 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:45:12.197958 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:12.200465 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:45:12.205121 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:12.211673 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:12.213177 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:45:12.214186 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.216195 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:12.216195 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:12.217196 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:45:12.218194 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.224220 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:12.224220 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:45:12.226226 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.228133 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:45:12.228638 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:12.229653 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:45:12.235685 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:12.238696 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:12.238696 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:45:12.240728 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:12.242734 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:45:12.243239 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226CF9B1730>]}
[0m16:45:12.244747 [info ] [Thread-1 (]: 66 of 97 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.05s]
[0m16:45:12.251308 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:45:12.251814 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:45:12.252822 [info ] [Thread-1 (]: 67 of 97 START sql table model main.dim_porte .................................. [RUN]
[0m16:45:12.255239 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m16:45:12.255239 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:45:12.260253 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:12.261831 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:45:12.267359 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:12.269360 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:12.269360 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:45:12.270359 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.270948 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.271955 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:12.272965 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:45:12.275491 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.279286 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:12.280793 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:45:12.281801 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.283306 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:45:12.284311 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:12.285318 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:45:12.291364 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:45:12.294880 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:12.295888 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:45:12.297392 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:12.299401 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:45:12.300400 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226CF9C3D40>]}
[0m16:45:12.300906 [info ] [Thread-1 (]: 67 of 97 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.05s]
[0m16:45:12.302511 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:45:12.303023 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:45:12.304029 [info ] [Thread-1 (]: 68 of 97 START sql table model main.dim_produto_credito ........................ [RUN]
[0m16:45:12.305422 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:45:12.305422 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:45:12.312434 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:12.313950 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:45:12.319956 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:12.320957 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:12.321957 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:45:12.322957 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.323463 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.324471 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:12.325472 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:45:12.327093 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.330584 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:12.331582 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:45:12.333096 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.335119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:45:12.335119 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:12.336120 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:45:12.342750 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:45:12.347286 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:12.347286 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:45:12.348286 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:12.350285 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:45:12.351287 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226CF977920>]}
[0m16:45:12.352794 [info ] [Thread-1 (]: 68 of 97 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.05s]
[0m16:45:12.353803 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:45:12.353803 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:45:12.355316 [info ] [Thread-1 (]: 69 of 97 START sql table model main.dim_regiao ................................. [RUN]
[0m16:45:12.356328 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:45:12.357329 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:45:12.361328 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:12.363845 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:45:12.368359 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:12.370363 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:12.371363 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:45:12.371363 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.372876 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.373888 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:12.374900 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:45:12.376908 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:12.382942 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:12.383952 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:45:12.385473 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.387482 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:45:12.388481 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:12.389075 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:45:12.396327 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:45:12.400502 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:12.401007 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:45:12.402015 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:12.403532 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:45:12.405540 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1644C50>]}
[0m16:45:12.406547 [info ] [Thread-1 (]: 69 of 97 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.05s]
[0m16:45:12.407549 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:45:12.408547 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:45:12.409343 [info ] [Thread-1 (]: 70 of 97 START sql table model main.dim_risco .................................. [RUN]
[0m16:45:12.409343 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:45:12.410850 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:45:12.415400 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:12.417408 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:45:12.424024 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:12.426031 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:12.427032 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:45:12.427032 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.428540 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.429315 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:12.429315 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:45:12.431321 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.435412 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:12.436936 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:45:12.437942 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:12.438945 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:45:12.440453 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:12.440453 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:45:12.448001 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:45:12.450804 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:12.452313 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:45:12.452820 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:12.455832 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:45:12.455832 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1A7CC50>]}
[0m16:45:12.458360 [info ] [Thread-1 (]: 70 of 97 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.05s]
[0m16:45:12.460361 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:45:12.460361 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:45:12.461357 [info ] [Thread-1 (]: 71 of 97 START sql table model main.dim_segmento ............................... [RUN]
[0m16:45:12.462871 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:45:12.464389 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:45:12.468451 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:12.470973 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:45:12.475492 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:12.478328 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:12.478328 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:45:12.479338 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.480852 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.480852 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:12.481864 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:45:12.483376 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.488908 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:12.489907 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:45:12.490907 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:12.493415 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:45:12.494423 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:12.494423 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:45:12.497993 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:12.501520 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:12.501520 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:45:12.503029 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:12.506047 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:45:12.506740 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B71190>]}
[0m16:45:12.507750 [info ] [Thread-1 (]: 71 of 97 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.04s]
[0m16:45:12.508750 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:45:12.509748 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:45:12.510255 [info ] [Thread-1 (]: 72 of 97 START test not_null_dim_classe_instituicao_id_classe .................. [RUN]
[0m16:45:12.510763 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m16:45:12.511775 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:45:12.517620 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:45:12.518131 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:45:12.520332 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:45:12.521337 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:45:12.521842 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m16:45:12.522346 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.522860 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.522860 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:45:12.523866 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m16:45:12.524900 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.525881 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m16:45:12.526864 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m16:45:12.527872 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m16:45:12.528384 [info ] [Thread-1 (]: 72 of 97 PASS not_null_dim_classe_instituicao_id_classe ........................ [[32mPASS[0m in 0.02s]
[0m16:45:12.528384 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:45:12.529392 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:45:12.529392 [info ] [Thread-1 (]: 73 of 97 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m16:45:12.531018 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m16:45:12.531018 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:45:12.540932 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:45:12.541932 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:45:12.544495 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:45:12.545500 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:45:12.546500 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m16:45:12.547006 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.547511 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.548516 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:45:12.550020 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:12.552144 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.553662 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m16:45:12.554702 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m16:45:12.554702 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m16:45:12.554702 [info ] [Thread-1 (]: 73 of 97 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:45:12.556256 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:45:12.556256 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:45:12.557261 [info ] [Thread-1 (]: 74 of 97 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m16:45:12.557764 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m16:45:12.558769 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:45:12.563881 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:45:12.565387 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:45:12.568406 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:45:12.569505 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:45:12.569505 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m16:45:12.569505 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.570512 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.570512 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:45:12.571014 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:12.573032 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:12.575037 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m16:45:12.576039 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m16:45:12.577039 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m16:45:12.577039 [info ] [Thread-1 (]: 74 of 97 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.02s]
[0m16:45:12.578040 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:45:12.578550 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:45:12.579555 [info ] [Thread-1 (]: 75 of 97 START test not_null_dim_consolidado_id_consolidado .................... [RUN]
[0m16:45:12.579555 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m16:45:12.580560 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:45:12.584610 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:45:12.587634 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:45:12.588642 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:45:12.590148 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:45:12.591153 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m16:45:12.591153 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.592153 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.592657 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:45:12.592657 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m16:45:12.593170 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.594680 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m16:45:12.596687 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m16:45:12.597192 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m16:45:12.597192 [info ] [Thread-1 (]: 75 of 97 PASS not_null_dim_consolidado_id_consolidado .......................... [[32mPASS[0m in 0.02s]
[0m16:45:12.598197 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:45:12.599197 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:45:12.599700 [info ] [Thread-1 (]: 76 of 97 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m16:45:12.600704 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m16:45:12.601228 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:45:12.608523 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:45:12.610028 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:45:12.613189 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:45:12.614697 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:45:12.615798 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m16:45:12.616314 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.616314 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.617319 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:45:12.617822 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:12.619327 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.621347 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m16:45:12.622867 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m16:45:12.622867 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m16:45:12.624874 [info ] [Thread-1 (]: 76 of 97 PASS relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[32mPASS[0m in 0.02s]
[0m16:45:12.624874 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:45:12.624874 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:45:12.626382 [info ] [Thread-1 (]: 77 of 97 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m16:45:12.626382 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m16:45:12.627980 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:45:12.631180 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:45:12.632707 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:45:12.637397 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:45:12.638409 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:45:12.639920 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m16:45:12.639920 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.640927 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.642434 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:45:12.642940 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:12.644969 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:12.646976 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m16:45:12.648483 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m16:45:12.648483 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m16:45:12.649486 [info ] [Thread-1 (]: 77 of 97 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.02s]
[0m16:45:12.649992 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:45:12.651003 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:45:12.651592 [info ] [Thread-1 (]: 78 of 97 START test not_null_dim_controle_id_controle .......................... [RUN]
[0m16:45:12.652111 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m16:45:12.652111 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:45:12.656272 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:45:12.657784 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:45:12.660294 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:45:12.661897 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:45:12.662413 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m16:45:12.662413 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.662926 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.663932 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:45:12.663932 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m16:45:12.664932 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.665435 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m16:45:12.666442 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m16:45:12.666442 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m16:45:12.667835 [info ] [Thread-1 (]: 78 of 97 PASS not_null_dim_controle_id_controle ................................ [[32mPASS[0m in 0.02s]
[0m16:45:12.667835 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:45:12.667835 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:45:12.669413 [info ] [Thread-1 (]: 79 of 97 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m16:45:12.670015 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m16:45:12.670015 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:45:12.674143 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:45:12.675142 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:45:12.678143 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:45:12.679682 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:45:12.679682 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m16:45:12.679682 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.681270 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.681270 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:45:12.681270 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:12.682801 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.684484 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m16:45:12.686140 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m16:45:12.687716 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m16:45:12.689713 [info ] [Thread-1 (]: 79 of 97 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.02s]
[0m16:45:12.691166 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:45:12.692165 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:45:12.693191 [info ] [Thread-1 (]: 80 of 97 START test unique_dim_controle_id_controle ............................ [RUN]
[0m16:45:12.693191 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m16:45:12.694708 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:45:12.698225 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:45:12.699224 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:45:12.701254 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:45:12.702456 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:45:12.702974 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m16:45:12.703490 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.704801 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.705310 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:45:12.705640 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:12.708641 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:12.712363 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m16:45:12.714403 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m16:45:12.714911 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m16:45:12.716999 [info ] [Thread-1 (]: 80 of 97 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.02s]
[0m16:45:12.719440 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:45:12.720852 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:45:12.721866 [info ] [Thread-1 (]: 81 of 97 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:45:12.723396 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:45:12.726425 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:45:12.738331 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:12.740332 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:45:12.746230 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:12.748753 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:12.749748 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:45:12.750257 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.751265 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.752782 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:12.753792 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:45:12.827617 [debug] [Thread-1 (]: SQL status: OK in 0.073 seconds
[0m16:45:12.835111 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:12.836112 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:45:12.837234 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.838248 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:45:12.839755 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:12.839755 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:45:12.845677 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:12.850013 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:12.851655 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:45:12.852716 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:12.854403 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:45:12.855001 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226CF97CBC0>]}
[0m16:45:12.855632 [info ] [Thread-1 (]: 81 of 97 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 0.13s]
[0m16:45:12.856173 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:45:12.857180 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:45:12.857686 [info ] [Thread-1 (]: 82 of 97 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:45:12.858696 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:45:12.858696 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:45:12.861813 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:12.862991 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:45:12.869019 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:12.871023 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:12.872031 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:45:12.873023 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:12.873532 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:12.874544 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:12.874544 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:45:13.108235 [debug] [Thread-1 (]: SQL status: OK in 0.233 seconds
[0m16:45:13.112910 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:13.112910 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:45:13.114918 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:13.115423 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:45:13.116428 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:13.116428 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:45:13.132677 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:45:13.138050 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:13.138050 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:45:13.139052 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:13.142069 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:45:13.143078 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226C1B400B0>]}
[0m16:45:13.144091 [info ] [Thread-1 (]: 82 of 97 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.29s]
[0m16:45:13.145197 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:45:13.146320 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:45:13.146850 [info ] [Thread-1 (]: 83 of 97 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:45:13.147375 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:45:13.147900 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:45:13.153914 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:13.155034 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:45:13.158619 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:13.160127 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:13.160127 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:45:13.160127 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:13.161739 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:13.161739 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:13.161739 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:45:13.256238 [debug] [Thread-1 (]: SQL status: OK in 0.094 seconds
[0m16:45:13.260561 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:13.260561 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:45:13.261567 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:13.262724 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:45:13.262724 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:13.262724 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:45:13.267289 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:13.272216 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:13.272736 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:45:13.273886 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:13.275456 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:45:13.276463 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226D0A28A10>]}
[0m16:45:13.276463 [info ] [Thread-1 (]: 83 of 97 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 0.13s]
[0m16:45:13.277469 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:45:13.278462 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:45:13.279470 [info ] [Thread-1 (]: 84 of 97 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:45:13.279470 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:45:13.279470 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:45:13.284059 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:13.284564 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:45:13.288511 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:13.290258 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:13.290258 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:45:13.290258 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:13.291368 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:13.291873 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:13.291873 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:45:13.544347 [debug] [Thread-1 (]: SQL status: OK in 0.252 seconds
[0m16:45:13.548468 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:13.548468 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:45:13.549470 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:13.549980 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:45:13.550988 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:13.550988 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:45:13.581138 [debug] [Thread-1 (]: SQL status: OK in 0.030 seconds
[0m16:45:13.584290 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:13.585298 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:45:13.586297 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:13.587810 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:45:13.587810 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226D0A4FFB0>]}
[0m16:45:13.588809 [info ] [Thread-1 (]: 84 of 97 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.31s]
[0m16:45:13.589810 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:45:13.589810 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:45:13.590315 [info ] [Thread-1 (]: 85 of 97 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:45:13.590315 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:45:13.591821 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:45:13.595502 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:13.597010 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:45:13.601764 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:13.603353 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:13.603890 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:45:13.604416 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:13.605927 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:13.606969 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:13.608063 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:45:13.963313 [debug] [Thread-1 (]: SQL status: OK in 0.355 seconds
[0m16:45:13.966430 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:13.966430 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:45:13.967680 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:13.967680 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:45:13.969313 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:13.969900 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:45:14.071431 [debug] [Thread-1 (]: SQL status: OK in 0.102 seconds
[0m16:45:14.073955 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:14.074955 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:45:14.074955 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:14.075952 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:45:14.076967 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '89443cb4-642f-4c95-b0cf-6348dd6c7b6f', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226CF976ED0>]}
[0m16:45:14.077593 [info ] [Thread-1 (]: 85 of 97 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.49s]
[0m16:45:14.078120 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:45:14.078120 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:45:14.078120 [info ] [Thread-1 (]: 86 of 97 START test not_null_dim_segmento_id_segmento .......................... [RUN]
[0m16:45:14.079740 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m16:45:14.079740 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:45:14.084402 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:45:14.084402 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:45:14.087417 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:45:14.088421 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:45:14.088421 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m16:45:14.089929 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:14.089929 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:14.089929 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:45:14.090937 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m16:45:14.090937 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.092967 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m16:45:14.094545 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m16:45:14.094545 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m16:45:14.095552 [info ] [Thread-1 (]: 86 of 97 PASS not_null_dim_segmento_id_segmento ................................ [[32mPASS[0m in 0.02s]
[0m16:45:14.096550 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:45:14.096550 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:45:14.097980 [info ] [Thread-1 (]: 87 of 97 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m16:45:14.098498 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m16:45:14.098498 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:45:14.103675 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:45:14.105265 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:45:14.107930 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:45:14.108937 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:45:14.108937 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m16:45:14.109963 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:14.110472 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.111026 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:45:14.111568 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:14.113907 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:14.116118 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m16:45:14.117198 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m16:45:14.117723 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m16:45:14.117723 [info ] [Thread-1 (]: 87 of 97 PASS relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[32mPASS[0m in 0.02s]
[0m16:45:14.119239 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:45:14.119239 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:45:14.120251 [info ] [Thread-1 (]: 88 of 97 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m16:45:14.121294 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m16:45:14.121294 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:45:14.126457 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:45:14.127963 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:45:14.129623 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:45:14.131193 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:45:14.131193 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m16:45:14.131193 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:14.132710 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.132710 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:45:14.132710 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:14.134282 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.136887 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m16:45:14.137969 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m16:45:14.138582 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m16:45:14.138582 [info ] [Thread-1 (]: 88 of 97 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.02s]
[0m16:45:14.140620 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:45:14.140620 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:45:14.142134 [info ] [Thread-1 (]: 89 of 97 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m16:45:14.142654 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m16:45:14.143704 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:45:14.147964 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:45:14.149019 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:45:14.150080 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:45:14.152744 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:45:14.152744 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m16:45:14.153751 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:14.154258 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.154770 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:45:14.155300 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:14.156325 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.157410 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m16:45:14.158417 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m16:45:14.158417 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m16:45:14.158417 [info ] [Thread-1 (]: 89 of 97 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m16:45:14.159924 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:45:14.160537 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:45:14.160537 [info ] [Thread-1 (]: 90 of 97 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m16:45:14.160537 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m16:45:14.161541 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:45:14.165575 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:45:14.167092 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:45:14.173803 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:45:14.175370 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:45:14.176422 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m16:45:14.177011 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:14.178044 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.178044 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:45:14.178044 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:14.179609 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.181228 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m16:45:14.182744 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m16:45:14.182744 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m16:45:14.184441 [info ] [Thread-1 (]: 90 of 97 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:45:14.185061 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:45:14.185061 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:45:14.186067 [info ] [Thread-1 (]: 91 of 97 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m16:45:14.186067 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m16:45:14.187108 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:45:14.191142 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:45:14.193168 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:45:14.195858 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:45:14.197583 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:45:14.198207 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m16:45:14.198741 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:14.199589 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.200095 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:45:14.200095 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:14.202245 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.205107 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m16:45:14.206179 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m16:45:14.207437 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m16:45:14.208080 [info ] [Thread-1 (]: 91 of 97 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.02s]
[0m16:45:14.209364 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:45:14.210548 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:45:14.211123 [info ] [Thread-1 (]: 92 of 97 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m16:45:14.212281 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m16:45:14.212797 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:45:14.220382 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:45:14.223729 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:45:14.226706 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:45:14.228444 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:45:14.228444 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m16:45:14.229451 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:14.230963 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.230963 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:45:14.231973 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:14.233989 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.236010 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m16:45:14.239521 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m16:45:14.239521 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m16:45:14.241528 [info ] [Thread-1 (]: 92 of 97 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.03s]
[0m16:45:14.241528 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:45:14.243041 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:45:14.243041 [info ] [Thread-1 (]: 93 of 97 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m16:45:14.246057 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m16:45:14.249060 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:45:14.260479 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:45:14.261479 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:45:14.267000 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:45:14.269003 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:45:14.270000 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m16:45:14.270000 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:14.271003 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.272005 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:45:14.272005 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:14.274021 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.277048 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m16:45:14.278052 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m16:45:14.279074 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m16:45:14.279074 [info ] [Thread-1 (]: 93 of 97 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.03s]
[0m16:45:14.281048 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:45:14.282047 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:45:14.282047 [info ] [Thread-1 (]: 94 of 97 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m16:45:14.283551 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m16:45:14.283551 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:45:14.290582 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:45:14.291581 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:45:14.296624 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:45:14.297623 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:45:14.298629 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m16:45:14.299621 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:14.300621 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.300621 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:45:14.301621 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m16:45:14.303140 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.305666 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m16:45:14.306676 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m16:45:14.307677 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m16:45:14.309678 [info ] [Thread-1 (]: 94 of 97 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.03s]
[0m16:45:14.311678 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:45:14.311678 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:45:14.313183 [info ] [Thread-1 (]: 95 of 97 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m16:45:14.314191 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m16:45:14.315190 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:45:14.324244 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:45:14.326254 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:45:14.331777 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:45:14.334298 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:45:14.335311 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m16:45:14.336310 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:14.337309 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.337309 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:45:14.338817 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:14.342826 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:14.345378 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m16:45:14.347368 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m16:45:14.348370 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m16:45:14.349370 [info ] [Thread-1 (]: 95 of 97 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.04s]
[0m16:45:14.350887 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:45:14.350887 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:45:14.353395 [info ] [Thread-1 (]: 96 of 97 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m16:45:14.354406 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m16:45:14.354406 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:45:14.361939 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:45:14.363454 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:45:14.366478 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:45:14.368479 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:45:14.368479 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m16:45:14.369480 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:14.369480 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.370479 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:45:14.370985 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:14.373510 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.375524 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m16:45:14.378520 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m16:45:14.379521 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m16:45:14.380522 [info ] [Thread-1 (]: 96 of 97 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.03s]
[0m16:45:14.381519 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:45:14.382028 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:45:14.382028 [info ] [Thread-1 (]: 97 of 97 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m16:45:14.383034 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m16:45:14.383034 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:45:14.389051 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:45:14.391053 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:45:14.394608 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:45:14.395616 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:45:14.396628 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m16:45:14.397135 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:14.397135 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.398142 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:45:14.398142 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m16:45:14.399143 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:14.401709 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m16:45:14.402835 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m16:45:14.402835 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m16:45:14.403845 [info ] [Thread-1 (]: 97 of 97 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.02s]
[0m16:45:14.404352 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:45:14.406986 [debug] [MainThread]: Using duckdb connection "master"
[0m16:45:14.407520 [debug] [MainThread]: On master: BEGIN
[0m16:45:14.408048 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:45:14.408575 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:45:14.409098 [debug] [MainThread]: On master: COMMIT
[0m16:45:14.409655 [debug] [MainThread]: Using duckdb connection "master"
[0m16:45:14.410204 [debug] [MainThread]: On master: COMMIT
[0m16:45:14.410762 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:45:14.411319 [debug] [MainThread]: On master: Close
[0m16:45:14.411829 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:45:14.411829 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:45:14.411829 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:45:14.412840 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m16:45:14.413344 [info ] [MainThread]: 
[0m16:45:14.413894 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 15.98 seconds (15.98s).
[0m16:45:14.426214 [debug] [MainThread]: Command end result
[0m16:45:14.475859 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:45:14.483903 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:45:14.492162 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:45:14.492692 [info ] [MainThread]: 
[0m16:45:14.493249 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:45:14.493249 [info ] [MainThread]: 
[0m16:45:14.494256 [info ] [MainThread]: Done. PASS=97 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=97
[0m16:45:14.494766 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:45:14.495775 [debug] [MainThread]: Command `dbt build` succeeded at 16:45:14.495775 after 19.56 seconds
[0m16:45:14.495775 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226BECF2D20>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226BECF2F00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000226BD31D5B0>]}
[0m16:45:14.496779 [debug] [MainThread]: Flushing usage events
[0m16:45:15.284548 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:45:38.749120 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B8360DF40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B85F15A30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B85F143E0>]}


============================== 16:45:38.756553 | 8d2eabe8-b2d9-4e18-9079-183c36821e17 ==============================
[0m16:45:38.756553 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:45:38.757563 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:45:39.038619 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B86BFAD20>]}
[0m16:45:39.119411 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B85D67A70>]}
[0m16:45:39.124971 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:45:39.466285 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:45:39.702291 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m16:45:39.702805 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m16:45:39.702805 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m16:45:39.709427 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:45:39.751902 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B87E5F7D0>]}
[0m16:45:39.849297 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:45:39.853514 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:45:39.977886 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B883545F0>]}
[0m16:45:39.978392 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:45:39.990073 [info ] [MainThread]: 
[0m16:45:39.991080 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:45:39.991080 [info ] [MainThread]: 
[0m16:45:39.992079 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:45:39.999428 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:45:40.231169 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:45:40.231169 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:45:40.232685 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:45:40.892699 [debug] [ThreadPool]: SQL status: OK in 0.661 seconds
[0m16:45:40.894803 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:45:40.894803 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:45:40.895807 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:45:40.901989 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:45:40.901989 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:45:40.901989 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:45:40.903497 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:45:40.904581 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:45:40.905146 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:45:40.905146 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:45:40.905146 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:45:40.905146 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:45:40.906152 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:45:40.907160 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:45:40.907160 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:45:40.907160 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:45:40.907709 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:45:40.907709 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:45:40.911226 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:45:40.915431 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:45:40.915431 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:45:40.915431 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:45:40.916446 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:45:40.916446 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:45:40.916446 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:45:40.929460 [debug] [ThreadPool]: SQL status: OK in 0.012 seconds
[0m16:45:40.931022 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:45:40.932027 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:45:40.932532 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:45:40.933040 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B888ADE50>]}
[0m16:45:40.933040 [debug] [MainThread]: Using duckdb connection "master"
[0m16:45:40.933040 [debug] [MainThread]: On master: BEGIN
[0m16:45:40.934044 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:45:40.934044 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:45:40.934044 [debug] [MainThread]: On master: COMMIT
[0m16:45:40.934044 [debug] [MainThread]: Using duckdb connection "master"
[0m16:45:40.934044 [debug] [MainThread]: On master: COMMIT
[0m16:45:40.935467 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:45:40.935467 [debug] [MainThread]: On master: Close
[0m16:45:40.941132 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:45:40.941132 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:45:40.942132 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:45:40.942132 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:45:40.950841 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:45:40.951401 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:45:40.976485 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:45:40.976485 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:45:40.978346 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:45:40.978346 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:45:40.978346 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:40.979852 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:45:40.979852 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
    UNION ALL
    SELECT * FROM portfolio_fallback
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:45:41.203848 [debug] [Thread-1 (]: SQL status: OK in 0.223 seconds
[0m16:45:41.211717 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:45:41.211717 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:45:41.213228 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:41.226713 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:45:41.228413 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:45:41.228413 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:45:41.239827 [debug] [Thread-1 (]: SQL status: OK in 0.011 seconds
[0m16:45:41.247450 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:45:41.247450 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:45:41.248456 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:41.250966 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:45:41.253605 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B8899B410>]}
[0m16:45:41.254109 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.31s]
[0m16:45:41.255211 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:45:41.256217 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:45:41.257228 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:45:41.257741 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:45:41.258749 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:45:41.262817 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:45:41.264053 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:45:41.268074 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:45:41.269580 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:45:41.270121 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:45:41.270121 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:41.271852 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:41.272432 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:45:41.272432 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL

    UNION

    -- Fallback: localizações de instituições presentes apenas nas tabelas SCR
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources

UNION

-- Sentinel para instituições sem dados de localização (cidade, uf, regiao = NULL)
SELECT
    md5(cast('' as varchar)) as id_localizacao,
    NULL as cidade,
    NULL as uf,
    NULL as regiao
    );
  
  
[0m16:45:41.333914 [debug] [Thread-1 (]: SQL status: OK in 0.061 seconds
[0m16:45:41.337081 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:45:41.337081 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:45:41.338086 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:41.339087 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:45:41.339087 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:45:41.339087 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:45:41.345161 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:45:41.348288 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:45:41.348288 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:45:41.348288 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:41.349793 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:45:41.349793 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B8899C9E0>]}
[0m16:45:41.349793 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.09s]
[0m16:45:41.351298 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:45:41.351298 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:45:41.352457 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m16:45:41.352976 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:45:41.353490 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:45:41.357195 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:45:41.358204 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:45:41.360717 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:45:41.361723 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:45:41.361723 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:45:41.361723 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:41.362735 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:41.363243 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:45:41.363243 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:45:41.377179 [debug] [Thread-1 (]: SQL status: OK in 0.014 seconds
[0m16:45:41.379690 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:45:41.379690 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:45:41.379690 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:41.381253 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:45:41.382260 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:45:41.382765 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:45:41.385940 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:41.387976 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:45:41.388999 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:45:41.388999 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:41.390512 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:45:41.390512 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B889A7410>]}
[0m16:45:41.390512 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.04s]
[0m16:45:41.392532 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:45:41.393049 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:45:41.393049 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:45:41.394055 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:45:41.394558 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:45:41.400092 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:45:41.401668 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:45:41.406007 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:45:41.407017 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:45:41.407017 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:45:41.407017 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:41.408020 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:41.408526 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:45:41.408526 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:45:41.871224 [debug] [Thread-1 (]: SQL status: OK in 0.462 seconds
[0m16:45:41.875616 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:45:41.876613 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:45:41.876613 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:41.879779 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:45:41.879779 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:45:41.879779 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:45:42.059998 [debug] [Thread-1 (]: SQL status: OK in 0.178 seconds
[0m16:45:42.062591 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:45:42.063117 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:45:42.063117 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:42.065124 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:45:42.065124 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B889CA600>]}
[0m16:45:42.066975 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.67s]
[0m16:45:42.067552 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:45:42.067552 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:45:42.069140 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m16:45:42.070412 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:45:42.070412 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:45:42.075467 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:42.076476 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:45:42.079585 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:42.081153 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:42.081153 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:45:42.081153 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:42.082739 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:42.082739 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:42.084316 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:45:42.290805 [debug] [Thread-1 (]: SQL status: OK in 0.205 seconds
[0m16:45:42.294518 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:42.295527 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m16:45:42.296526 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:42.297539 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:45:42.298546 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:42.299547 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:45:42.332809 [debug] [Thread-1 (]: SQL status: OK in 0.033 seconds
[0m16:45:42.337915 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:45:42.338454 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m16:45:42.340056 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:42.342188 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:45:42.344104 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B87E5EC30>]}
[0m16:45:42.345196 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.27s]
[0m16:45:42.346843 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:45:42.348252 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:45:42.349873 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m16:45:42.350920 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:45:42.351518 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:45:42.356806 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:42.358446 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:45:42.364079 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:42.365136 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:42.366653 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:45:42.367156 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:42.368669 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:42.369682 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:42.370684 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:45:42.464437 [debug] [Thread-1 (]: SQL status: OK in 0.092 seconds
[0m16:45:42.471791 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:42.472800 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m16:45:42.474690 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:42.476281 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:45:42.477367 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:42.477910 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:45:42.625808 [debug] [Thread-1 (]: SQL status: OK in 0.148 seconds
[0m16:45:42.629220 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:45:42.629220 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m16:45:42.629752 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:42.631278 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:45:42.632825 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B889EF9E0>]}
[0m16:45:42.632825 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.28s]
[0m16:45:42.636120 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:45:42.637488 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:45:42.637488 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m16:45:42.640005 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:45:42.640005 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:45:42.650657 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:42.656434 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:45:42.661067 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:42.662700 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:42.663316 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:45:42.663316 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:42.664841 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:42.667650 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:42.667650 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:45:42.750102 [debug] [Thread-1 (]: SQL status: OK in 0.081 seconds
[0m16:45:42.754491 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:42.754491 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:45:42.755095 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:42.757674 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:45:42.757674 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:42.758209 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:45:42.919348 [debug] [Thread-1 (]: SQL status: OK in 0.160 seconds
[0m16:45:42.924072 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:45:42.925072 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:45:42.926074 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:42.928191 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:45:42.929707 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B88333C80>]}
[0m16:45:42.931230 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.29s]
[0m16:45:42.932770 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:45:42.933279 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:45:42.934289 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:45:42.935302 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:45:42.936814 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:45:42.943085 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:42.946093 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:45:42.952939 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:42.956236 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:42.956779 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:45:42.957863 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:42.958434 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:42.958960 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:42.959601 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:45:43.676915 [debug] [Thread-1 (]: SQL status: OK in 0.717 seconds
[0m16:45:43.682747 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:43.683756 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:45:43.684971 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:43.686489 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:45:43.687174 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:43.688183 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:45:43.939043 [debug] [Thread-1 (]: SQL status: OK in 0.250 seconds
[0m16:45:43.943064 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:45:43.944194 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:45:43.945779 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:43.947288 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:45:43.948297 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B88A038C0>]}
[0m16:45:43.948879 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 1.01s]
[0m16:45:43.949393 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:45:43.950961 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:45:43.951971 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m16:45:43.952999 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:45:43.952999 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:45:43.956271 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:43.957282 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:45:43.961966 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:43.962997 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:43.964004 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:45:43.964004 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:43.965963 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:43.966507 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:43.967519 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:45:43.976507 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:45:43.979587 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:43.980399 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:45:43.981597 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:43.984634 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:45:43.985642 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:43.985642 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:45:44.009793 [debug] [Thread-1 (]: SQL status: OK in 0.022 seconds
[0m16:45:44.014056 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:45:44.014628 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:45:44.016107 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:44.018251 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:45:44.019320 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B8894E480>]}
[0m16:45:44.020371 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.07s]
[0m16:45:44.022121 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:45:44.022638 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:45:44.023172 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:45:44.025083 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:45:44.025613 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:45:44.031704 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:44.034256 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:45:44.038366 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:44.040902 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:44.045528 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:45:44.053559 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:44.061576 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:45:44.061576 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:44.063087 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:45:44.107813 [debug] [Thread-1 (]: SQL status: OK in 0.043 seconds
[0m16:45:44.112907 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:44.113915 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:45:44.115424 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:44.118448 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:45:44.119445 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:44.119951 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:45:44.155817 [debug] [Thread-1 (]: SQL status: OK in 0.035 seconds
[0m16:45:44.163663 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:45:44.163663 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:45:44.165170 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:44.168517 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:45:44.169526 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B9678D9D0>]}
[0m16:45:44.170537 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.14s]
[0m16:45:44.171798 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:45:44.173068 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:45:44.174077 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:45:44.176078 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:45:44.177076 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:45:44.194660 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:44.236836 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:45:44.254542 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:44.274853 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:44.276867 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:45:44.277865 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:44.290910 [debug] [Thread-1 (]: SQL status: OK in 0.010 seconds
[0m16:45:44.303965 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:44.303965 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:45:45.449419 [debug] [Thread-1 (]: SQL status: OK in 1.143 seconds
[0m16:45:45.454240 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:45.454240 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:45:45.455248 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:45.456259 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:45:45.456259 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:45.457266 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:45:45.745768 [debug] [Thread-1 (]: SQL status: OK in 0.288 seconds
[0m16:45:45.748312 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:45:45.749336 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:45:45.749336 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:45.752166 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:45:45.752675 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B8881ED80>]}
[0m16:45:45.752675 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 1.58s]
[0m16:45:45.753680 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:45:45.754185 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:45:45.754185 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m16:45:45.755192 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m16:45:45.756320 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:45:45.756320 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:45:45.779781 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:45.780270 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:45:45.780270 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:45.781285 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.781285 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:45.781285 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m16:45:45.782812 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.794506 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:45.795516 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:45.807251 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:45:45.813366 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:45.816996 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:45:45.817502 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:45:45.817502 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:45:45.820270 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:45.821275 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:45:45.822790 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B87FC4920>]}
[0m16:45:45.823802 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.07s]
[0m16:45:45.824810 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:45:45.824810 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:45:45.826307 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m16:45:45.826307 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m16:45:45.826307 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:45:45.827911 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:45:45.832112 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:45:45.832628 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m16:45:45.833160 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:45.833160 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.834176 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:45:45.834176 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m16:45:45.834176 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:45.836953 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:45:45.836953 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:45.839961 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:45.841053 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:45:45.843753 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:45:45.844760 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:45:45.844760 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:45:45.846774 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:45.847377 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m16:45:45.848385 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B889BDC10>]}
[0m16:45:45.849390 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.02s]
[0m16:45:45.849390 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:45:45.849390 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:45:45.850993 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m16:45:45.853573 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m16:45:45.854170 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:45:45.854753 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:45:45.858907 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:45:45.859922 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m16:45:45.859922 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:45.860545 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.861551 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:45:45.861551 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m16:45:45.862757 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:45.863784 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:45:45.863784 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:45.866283 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:45.867488 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:45:45.871973 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:45:45.873009 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:45:45.873009 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:45:45.876016 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:45.877024 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m16:45:45.877024 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B88A0D070>]}
[0m16:45:45.878023 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.02s]
[0m16:45:45.878023 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:45:45.879618 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:45:45.879618 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m16:45:45.879618 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m16:45:45.879618 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:45:45.881237 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:45:45.887424 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:45:45.887424 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m16:45:45.887424 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:45.888433 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.888433 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:45:45.889944 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m16:45:45.889944 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:45.891470 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:45:45.891992 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:45.894015 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:45.894595 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:45:45.897627 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:45:45.897627 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:45:45.898637 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:45:45.899639 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:45.901386 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m16:45:45.901959 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B88170830>]}
[0m16:45:45.902513 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.02s]
[0m16:45:45.903024 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:45:45.903536 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:45:45.904108 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m16:45:45.904672 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:45:45.904672 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:45:45.904672 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:45:45.909790 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:45.910300 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:45:45.910300 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:45.910300 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.910300 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:45.911893 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m16:45:45.912635 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:45.914694 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:45.914694 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:45.917394 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:45.917394 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:45.919551 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:45:45.920146 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:45:45.920146 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:45:45.921154 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.921665 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:45:45.922678 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B88944D40>]}
[0m16:45:45.922678 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.02s]
[0m16:45:45.924688 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:45:45.924688 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:45:45.925687 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m16:45:45.926689 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:45:45.927687 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:45:45.928193 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:45:45.932755 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:45.934364 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:45:45.934364 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:45.934364 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.934364 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:45.935957 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m16:45:45.935957 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:45.936974 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:45.936974 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:45.940198 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:45.940198 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:45.942772 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:45:45.944367 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:45:45.944367 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:45:45.947504 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:45.948515 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:45:45.949514 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B88401310>]}
[0m16:45:45.950022 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.02s]
[0m16:45:45.950022 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:45:45.951032 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:45:45.952189 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m16:45:45.953716 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:45:45.954220 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:45:45.954220 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:45:45.957812 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:45.958816 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:45:45.958816 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:45.960327 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.960327 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:45.960327 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m16:45:45.961888 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.961888 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:45.963237 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:45.965476 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:45.966485 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:45.968073 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:45:45.968073 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:45:45.968073 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:45:45.970254 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.971271 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:45:45.974099 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B889DF0E0>]}
[0m16:45:45.975089 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.02s]
[0m16:45:45.976092 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:45:45.976092 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:45:45.977093 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m16:45:45.977093 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:45:45.977093 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:45:45.977093 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:45:45.981448 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:45.981448 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:45:45.981448 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:45.981448 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.981448 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:45.983744 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m16:45:45.984279 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:45.986346 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:45.986346 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:45.988880 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:45.990389 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:45.991897 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:45:45.992905 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:45:45.992905 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:45:45.995563 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:45.997072 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:45:45.997072 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B889876B0>]}
[0m16:45:45.997072 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.02s]
[0m16:45:45.998595 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:45:45.998595 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:45:45.999602 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m16:45:45.999602 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:45:46.001197 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:45:46.001197 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:45:46.007098 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:46.007098 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:45:46.007684 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.007684 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.008694 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:46.008694 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m16:45:46.008694 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.010208 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:46.010208 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:46.014492 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:46.015002 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:46.017118 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:45:46.017627 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:45:46.017627 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:45:46.021415 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:46.022954 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:45:46.022954 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B967C7E90>]}
[0m16:45:46.023963 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.02s]
[0m16:45:46.024962 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:45:46.025962 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:45:46.026965 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m16:45:46.028476 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m16:45:46.029485 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:45:46.029485 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:45:46.037330 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:45:46.037330 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m16:45:46.038338 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.038338 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.038338 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:45:46.038338 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m16:45:46.040861 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.042369 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:45:46.042875 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:45:46.045471 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:46.046475 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:45:46.049927 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:45:46.049927 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:45:46.050939 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:45:46.054891 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:46.056407 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m16:45:46.057525 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B967BDCA0>]}
[0m16:45:46.057525 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.03s]
[0m16:45:46.058667 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:45:46.060176 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:45:46.060176 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m16:45:46.061714 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m16:45:46.061714 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:45:46.078169 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:45:46.078169 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:45:46.101858 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:45:46.104081 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:45:46.104751 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m16:45:46.106369 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.106936 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.107510 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:45:46.107510 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.110333 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:46.116271 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m16:45:46.117477 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m16:45:46.119048 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m16:45:46.119745 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.06s]
[0m16:45:46.121344 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:45:46.121344 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:45:46.121344 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m16:45:46.124021 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m16:45:46.125029 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:45:46.131372 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:45:46.133902 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:45:46.137437 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:45:46.138946 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:45:46.138946 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m16:45:46.139957 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.141031 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.141031 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:45:46.141031 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.142535 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.144567 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m16:45:46.146575 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m16:45:46.146575 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m16:45:46.147663 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m16:45:46.148168 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:45:46.149173 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:45:46.149173 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m16:45:46.150179 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m16:45:46.150687 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:45:46.158574 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:45:46.160086 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:45:46.164204 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:45:46.165204 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:45:46.165204 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m16:45:46.166849 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.167468 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.167468 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:45:46.169050 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:46.172729 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:46.174737 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m16:45:46.175736 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m16:45:46.176749 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m16:45:46.176749 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.03s]
[0m16:45:46.178495 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:45:46.179504 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:45:46.180011 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m16:45:46.181019 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m16:45:46.183068 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:45:46.187094 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:45:46.188247 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:45:46.192896 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:45:46.194466 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:45:46.195474 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m16:45:46.195474 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.196981 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.197569 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:45:46.197569 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.199579 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.201096 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m16:45:46.202238 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m16:45:46.202759 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m16:45:46.203828 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m16:45:46.204975 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:45:46.204975 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:45:46.205982 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m16:45:46.207286 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m16:45:46.207286 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:45:46.218164 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:45:46.219974 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:45:46.222822 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:45:46.223835 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:45:46.224834 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m16:45:46.225841 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.225841 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.225841 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:45:46.226845 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.230940 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:46.233018 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m16:45:46.234530 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m16:45:46.234530 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m16:45:46.234530 [info ] [Thread-1 (]: 26 of 97 PASS relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[32mPASS[0m in 0.03s]
[0m16:45:46.236036 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:45:46.237045 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:45:46.237045 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m16:45:46.238293 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m16:45:46.238293 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:45:46.245446 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:45:46.246956 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:45:46.250214 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:45:46.251936 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:45:46.252508 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m16:45:46.253029 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.254660 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.255202 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:45:46.255202 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:46.258720 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:46.260842 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m16:45:46.262940 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m16:45:46.263483 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m16:45:46.264014 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.03s]
[0m16:45:46.265605 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:45:46.266137 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:45:46.266652 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m16:45:46.267713 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m16:45:46.268241 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:45:46.273756 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:45:46.275362 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:45:46.280045 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:45:46.281085 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:45:46.281623 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m16:45:46.282152 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.282666 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:46.283202 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:45:46.283202 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.284715 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.286740 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m16:45:46.287748 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m16:45:46.288255 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m16:45:46.288255 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.02s]
[0m16:45:46.289763 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:45:46.289763 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:45:46.290773 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m16:45:46.291280 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m16:45:46.292286 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:45:46.300172 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:45:46.301674 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:45:46.305839 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:45:46.307396 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:45:46.308406 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m16:45:46.308406 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.309923 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.310497 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:45:46.310497 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:46.314766 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:46.316897 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m16:45:46.317402 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m16:45:46.317402 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m16:45:46.319511 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.03s]
[0m16:45:46.320085 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:45:46.320085 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:45:46.321746 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m16:45:46.322610 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m16:45:46.323128 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:45:46.328165 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:45:46.330294 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:45:46.335874 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:45:46.337896 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:45:46.337896 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m16:45:46.338904 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.339903 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.339903 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:45:46.341195 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.342702 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.344862 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m16:45:46.345874 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m16:45:46.345874 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m16:45:46.346876 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:45:46.348389 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:45:46.348389 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:45:46.348389 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m16:45:46.350171 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m16:45:46.350171 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:45:46.356909 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:45:46.357463 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:45:46.359986 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:45:46.362015 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:45:46.362631 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m16:45:46.363198 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.363198 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.364203 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:45:46.364714 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.366296 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.368317 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m16:45:46.369356 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m16:45:46.370364 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m16:45:46.371560 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:45:46.371560 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:45:46.373082 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:45:46.373605 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:46.374194 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m16:45:46.375201 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:45:46.385915 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:45:46.389050 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:45:46.390561 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:45:46.393087 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:45:46.393087 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m16:45:46.393087 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.394365 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.395373 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:45:46.395373 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.401495 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:46.404254 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m16:45:46.405262 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m16:45:46.405768 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m16:45:46.406273 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:45:46.407794 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:45:46.408802 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:45:46.408802 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:46.409805 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m16:45:46.410390 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:45:46.417399 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:45:46.418971 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:45:46.421881 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:45:46.423403 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:45:46.424413 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m16:45:46.424413 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.425420 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.426068 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:45:46.426068 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.432659 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:45:46.434703 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m16:45:46.436219 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m16:45:46.436722 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m16:45:46.436722 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:45:46.437729 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:45:46.438734 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:45:46.439730 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m16:45:46.440235 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m16:45:46.440235 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:45:46.445838 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:45:46.447354 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:45:46.449871 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:45:46.451487 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:45:46.452065 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m16:45:46.453079 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.453588 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.454366 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:45:46.454928 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.456435 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.459035 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m16:45:46.460034 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m16:45:46.460542 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m16:45:46.461550 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:45:46.461550 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:45:46.463025 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:45:46.463025 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m16:45:46.464033 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m16:45:46.465033 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:45:46.470349 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:45:46.471361 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:45:46.474532 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:45:46.476538 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:45:46.476538 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m16:45:46.478047 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.478047 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.478047 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:45:46.478047 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.479639 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.481241 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m16:45:46.482767 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m16:45:46.482767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m16:45:46.484365 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:45:46.485940 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:45:46.486948 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:45:46.486948 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:46.488788 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m16:45:46.489302 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:45:46.495517 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:45:46.497028 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:45:46.499554 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:45:46.502325 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:45:46.502841 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m16:45:46.503357 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.504526 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.505095 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:45:46.505095 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.510203 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:46.511820 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m16:45:46.513334 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m16:45:46.513334 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m16:45:46.515722 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:45:46.517243 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:45:46.517243 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:45:46.517243 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:46.518925 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m16:45:46.518925 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:45:46.524088 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:45:46.526093 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:45:46.528088 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:45:46.529602 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:45:46.529602 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m16:45:46.529602 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.532228 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.532733 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:45:46.532733 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.540145 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:45:46.543220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m16:45:46.544293 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m16:45:46.544881 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m16:45:46.544881 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:45:46.545889 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:45:46.547396 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:45:46.547396 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m16:45:46.548407 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m16:45:46.549404 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:45:46.554770 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:45:46.556348 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:45:46.558571 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:45:46.560078 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:45:46.560078 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m16:45:46.560078 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.561714 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.561714 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:45:46.562723 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.563230 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.565746 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m16:45:46.566785 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m16:45:46.567294 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m16:45:46.567294 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.02s]
[0m16:45:46.568299 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:45:46.568299 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:45:46.569304 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m16:45:46.570820 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m16:45:46.571325 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:45:46.575858 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:45:46.577867 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:45:46.584885 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:45:46.586903 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:45:46.586903 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m16:45:46.586903 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.587912 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.587912 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:45:46.587912 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.588912 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.591934 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m16:45:46.593449 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m16:45:46.594455 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m16:45:46.594455 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m16:45:46.597912 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:45:46.598591 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:45:46.599585 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:46.600088 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m16:45:46.600088 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:45:46.605066 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:45:46.606072 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:45:46.608665 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:45:46.610171 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:45:46.610171 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m16:45:46.610171 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.612415 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.612939 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:45:46.612939 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.616459 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:46.619039 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m16:45:46.620230 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m16:45:46.620230 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m16:45:46.621236 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:45:46.622246 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:45:46.622246 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:45:46.622766 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:46.623773 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m16:45:46.623773 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:45:46.631090 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:45:46.633143 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:45:46.637596 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:45:46.638604 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:45:46.640114 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m16:45:46.640114 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.641123 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.642128 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:45:46.642635 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.648471 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:45:46.649976 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m16:45:46.651565 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m16:45:46.652155 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m16:45:46.653163 [info ] [Thread-1 (]: 41 of 97 PASS relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:45:46.654277 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:45:46.654884 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:45:46.655891 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m16:45:46.656396 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m16:45:46.656901 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:45:46.663929 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:45:46.664930 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:45:46.667457 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:45:46.669040 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:45:46.669809 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m16:45:46.670360 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.671368 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.671368 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:45:46.671873 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.672900 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.674759 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m16:45:46.675767 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m16:45:46.676766 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m16:45:46.677772 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.02s]
[0m16:45:46.678279 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:45:46.678279 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:45:46.679285 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m16:45:46.679285 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m16:45:46.679285 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:45:46.682803 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:45:46.684318 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:45:46.687331 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:45:46.689929 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:45:46.690436 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m16:45:46.690436 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.690436 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.691943 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:45:46.692950 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.693454 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.696991 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m16:45:46.697602 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m16:45:46.698609 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m16:45:46.698609 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.02s]
[0m16:45:46.700113 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:45:46.700113 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:45:46.701119 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:46.701731 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m16:45:46.702307 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:45:46.711442 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:45:46.712449 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:45:46.715490 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:45:46.717005 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:45:46.717508 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m16:45:46.717508 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.717508 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.717508 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:45:46.719091 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.722408 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:46.724110 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m16:45:46.725947 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m16:45:46.726949 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m16:45:46.727943 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:45:46.728447 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:45:46.729456 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:45:46.730467 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:46.731467 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m16:45:46.731974 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:45:46.738313 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:45:46.740823 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:45:46.742832 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:45:46.745415 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:45:46.745415 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m16:45:46.745415 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.746922 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.747511 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:45:46.747511 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.752162 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:46.753672 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m16:45:46.754678 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m16:45:46.755181 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m16:45:46.755181 [info ] [Thread-1 (]: 45 of 97 PASS relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:45:46.756185 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:45:46.757192 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:45:46.757696 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m16:45:46.758700 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m16:45:46.758700 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:45:46.762814 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:45:46.763318 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:45:46.767318 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:45:46.769326 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:45:46.769831 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m16:45:46.770337 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.770337 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.771851 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:45:46.772357 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.773889 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.774889 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m16:45:46.775896 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m16:45:46.775896 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m16:45:46.776895 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.02s]
[0m16:45:46.778403 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:45:46.778403 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:45:46.779411 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m16:45:46.779411 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m16:45:46.781016 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:45:46.784245 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:45:46.786834 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:45:46.788350 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:45:46.789860 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:45:46.790866 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m16:45:46.790866 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.792374 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.792374 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:45:46.793021 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.793021 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.795649 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m16:45:46.797157 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m16:45:46.797787 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m16:45:46.798367 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:45:46.798367 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:45:46.799375 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:45:46.799881 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:46.800888 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m16:45:46.800888 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:45:46.808364 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:45:46.809871 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:45:46.812987 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:45:46.815050 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:45:46.815764 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m16:45:46.816386 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.817396 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.817904 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:45:46.817904 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.824041 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:46.827045 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m16:45:46.828553 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m16:45:46.829172 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m16:45:46.829685 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:45:46.830301 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:45:46.831308 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:45:46.831812 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:46.832322 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m16:45:46.832322 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:45:46.837100 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:45:46.838114 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:45:46.840105 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:45:46.842836 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:45:46.843343 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m16:45:46.844353 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.844793 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.845784 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:45:46.845784 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.854095 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:45:46.856258 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m16:45:46.857280 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m16:45:46.857280 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m16:45:46.858293 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:45:46.859896 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:45:46.860404 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:45:46.861413 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m16:45:46.862718 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m16:45:46.862718 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:45:46.868272 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:45:46.870292 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:45:46.873607 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:45:46.874234 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:45:46.875245 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m16:45:46.876259 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.877251 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.877251 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:45:46.877251 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.879282 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.881313 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m16:45:46.881313 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m16:45:46.883103 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m16:45:46.884114 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:45:46.884114 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:45:46.885694 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:45:46.885694 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m16:45:46.886703 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m16:45:46.887220 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:45:46.892286 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:45:46.892795 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:45:46.897525 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:45:46.898534 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:45:46.899533 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m16:45:46.899533 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.899533 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.901141 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:45:46.901141 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.902792 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.905085 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m16:45:46.907505 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m16:45:46.908058 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m16:45:46.909066 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:45:46.910066 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:45:46.910573 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:45:46.911579 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:46.912757 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m16:45:46.912757 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:45:46.921108 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:45:46.922686 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:45:46.925747 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:45:46.928254 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:45:46.928254 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m16:45:46.928254 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.929260 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.930512 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:45:46.931019 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.933068 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:46.934585 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m16:45:46.936092 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m16:45:46.937248 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m16:45:46.938776 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:45:46.938776 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:45:46.940285 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:45:46.940285 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:46.941293 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m16:45:46.942294 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:45:46.948487 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:45:46.949996 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:45:46.954691 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:45:46.957324 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:45:46.957832 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m16:45:46.957832 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.959338 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.959867 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:45:46.960524 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.964074 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:46.966591 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m16:45:46.966591 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m16:45:46.967824 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m16:45:46.967824 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:45:46.969399 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:45:46.969399 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:45:46.970414 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m16:45:46.971807 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m16:45:46.973062 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:45:46.978444 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:45:46.979965 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:45:46.983003 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:45:46.984010 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:45:46.984010 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m16:45:46.985273 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:46.985778 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.985778 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:45:46.985778 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:46.986785 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:46.988824 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m16:45:46.990322 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m16:45:46.990322 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m16:45:46.991836 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:45:46.992914 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:45:46.992914 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:45:46.994630 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m16:45:46.995638 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m16:45:46.995638 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:45:47.002422 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:45:47.004037 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:45:47.007287 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:45:47.009820 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:45:47.010758 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m16:45:47.010758 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:47.012278 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.012784 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:45:47.012784 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:47.014796 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.017534 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m16:45:47.020272 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m16:45:47.021340 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m16:45:47.021851 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.03s]
[0m16:45:47.022889 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:45:47.023915 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:45:47.024899 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:47.026407 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m16:45:47.026407 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:45:47.037429 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:45:47.038437 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:45:47.041978 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:45:47.042996 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:45:47.044593 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m16:45:47.044593 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:47.046190 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.047202 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:45:47.047714 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:47.052321 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:47.054538 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m16:45:47.056081 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m16:45:47.056590 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m16:45:47.057654 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:45:47.058663 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:45:47.058663 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:45:47.058663 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:47.060170 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m16:45:47.060170 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:45:47.068377 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:45:47.069386 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:45:47.073804 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:45:47.083529 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:45:47.084147 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m16:45:47.086156 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:47.086662 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.088669 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:45:47.090176 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:47.095933 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:47.099967 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m16:45:47.099967 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m16:45:47.101475 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m16:45:47.102059 [info ] [Thread-1 (]: 57 of 97 PASS relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:45:47.103065 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:45:47.103573 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:45:47.104138 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m16:45:47.104772 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m16:45:47.104772 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:45:47.111599 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:45:47.112897 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:45:47.116462 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:45:47.119237 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:45:47.119237 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m16:45:47.120247 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:47.120247 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.121782 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:45:47.121782 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:47.123304 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.126320 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m16:45:47.127829 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m16:45:47.127829 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m16:45:47.129509 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.02s]
[0m16:45:47.131080 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:45:47.132088 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:45:47.132595 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m16:45:47.134125 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m16:45:47.134125 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:45:47.140996 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:45:47.143008 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:45:47.144649 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:45:47.148181 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:45:47.148690 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m16:45:47.148690 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:47.150198 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.150198 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:45:47.151208 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:47.151785 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.154815 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m16:45:47.156616 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m16:45:47.157184 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m16:45:47.157754 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.02s]
[0m16:45:47.158764 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:45:47.159763 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:45:47.160794 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:45:47.161804 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m16:45:47.162312 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:45:47.169556 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:45:47.171688 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:45:47.175214 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:45:47.177214 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:45:47.178212 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m16:45:47.178212 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:47.180002 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.181524 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:45:47.181524 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:47.188579 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:47.191086 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m16:45:47.192096 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m16:45:47.193104 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m16:45:47.193612 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:45:47.196409 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:45:47.196409 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:45:47.197917 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:45:47.197917 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m16:45:47.197917 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:45:47.207258 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:45:47.208781 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:45:47.212766 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:45:47.213774 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:45:47.214772 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m16:45:47.215278 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:47.216292 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.216799 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:45:47.217806 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:47.226950 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:45:47.228455 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m16:45:47.229466 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m16:45:47.231441 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m16:45:47.232530 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:45:47.233052 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:45:47.234060 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:45:47.234060 [info ] [Thread-1 (]: 62 of 97 START sql table model main.dim_atividade .............................. [RUN]
[0m16:45:47.235619 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m16:45:47.235619 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:45:47.240741 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:47.242773 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:45:47.251749 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:47.254703 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:47.254703 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:45:47.256288 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:47.256288 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.257804 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:47.257804 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:45:47.260324 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.266442 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:47.267451 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:45:47.268972 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.272708 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:45:47.273717 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:47.273717 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:45:47.275717 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.279839 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:45:47.281360 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:45:47.282887 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.284971 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:45:47.286482 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B968C2330>]}
[0m16:45:47.286989 [info ] [Thread-1 (]: 62 of 97 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.05s]
[0m16:45:47.288513 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:45:47.289529 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:45:47.290519 [info ] [Thread-1 (]: 63 of 97 START sql table model main.dim_classe_instituicao ..................... [RUN]
[0m16:45:47.290519 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:45:47.292116 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:45:47.295708 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:47.297214 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:45:47.302113 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:47.304708 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:47.305155 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:45:47.305155 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:47.307313 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.308322 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:47.308322 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:45:47.312864 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:47.317532 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:47.317532 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:45:47.319771 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.321530 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:45:47.322690 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:47.323699 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:45:47.329737 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:47.335898 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:45:47.336432 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:45:47.337976 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.340470 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:45:47.340470 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B889763F0>]}
[0m16:45:47.342986 [info ] [Thread-1 (]: 63 of 97 OK created sql table model main.dim_classe_instituicao ................ [[32mOK[0m in 0.05s]
[0m16:45:47.344502 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:45:47.344502 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:45:47.345512 [info ] [Thread-1 (]: 64 of 97 START sql table model main.dim_consolidado ............................ [RUN]
[0m16:45:47.345512 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:45:47.347338 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:45:47.352107 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:47.356246 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:45:47.366952 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:47.369413 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:47.370424 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:45:47.370424 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:47.372562 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.373110 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:47.373110 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:45:47.375534 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.381220 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:47.382739 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:45:47.386201 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:47.388503 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:45:47.390015 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:47.390015 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:45:47.407593 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:45:47.410111 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:45:47.411772 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:45:47.412780 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:47.414914 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:45:47.415519 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B968D69C0>]}
[0m16:45:48.408310 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:45:48.412127 [info ] [Thread-1 (]: 64 of 97 OK created sql table model main.dim_consolidado ....................... [[32mOK[0m in 0.07s]
[0m16:45:48.412631 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:45:48.413641 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:45:48.414638 [info ] [Thread-1 (]: 65 of 97 START sql table model main.dim_controle ............................... [RUN]
[0m16:45:48.414638 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:45:48.415886 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:45:48.419077 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:48.420323 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:45:48.425899 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:48.426896 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:48.427905 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:45:48.427905 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.427905 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.429486 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:48.429486 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:45:48.431068 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.434655 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:48.435660 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:45:48.437710 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.441229 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:45:48.441229 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:48.442746 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:45:48.444886 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:48.448506 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:45:48.448506 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:45:48.449508 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:48.451019 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:45:48.452194 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B8851A030>]}
[0m16:45:48.452710 [info ] [Thread-1 (]: 65 of 97 OK created sql table model main.dim_controle .......................... [[32mOK[0m in 0.04s]
[0m16:45:48.454230 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:45:48.454753 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:45:48.455274 [info ] [Thread-1 (]: 66 of 97 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m16:45:48.456293 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:45:48.456293 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:45:48.460564 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:48.461572 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:45:48.465540 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:48.467639 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:48.468144 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:45:48.468144 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.470091 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.470091 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:48.471798 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:45:48.473324 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.478373 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:48.478373 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:45:48.479383 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.481028 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:45:48.481028 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:48.481028 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:45:48.484932 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:48.492683 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:45:48.493198 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:45:48.494720 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:48.497433 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:45:48.497433 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B968F22D0>]}
[0m16:45:48.498444 [info ] [Thread-1 (]: 66 of 97 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.04s]
[0m16:45:48.499440 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:45:48.499440 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:45:48.499440 [info ] [Thread-1 (]: 67 of 97 START sql table model main.dim_porte .................................. [RUN]
[0m16:45:48.501350 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m16:45:48.501350 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:45:48.504723 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:48.507289 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:45:48.512758 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:48.513268 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:48.514778 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:45:48.515369 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.516381 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.516381 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:48.516899 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:45:48.518410 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.521476 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:48.522518 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:45:48.523035 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.525046 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:45:48.526054 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:48.527054 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:45:48.529567 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:48.532991 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:45:48.533996 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:45:48.534498 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:48.537530 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:45:48.537530 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B889A81D0>]}
[0m16:45:48.538536 [info ] [Thread-1 (]: 67 of 97 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.04s]
[0m16:45:48.538536 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:45:48.540046 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:45:48.541055 [info ] [Thread-1 (]: 68 of 97 START sql table model main.dim_produto_credito ........................ [RUN]
[0m16:45:48.542054 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:45:48.542567 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:45:48.545613 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:48.547115 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:45:48.551358 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:48.553002 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:48.553523 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:45:48.554186 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.555192 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.555704 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:48.556209 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:45:48.558489 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.564036 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:48.565544 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:45:48.566555 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.567672 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:45:48.569258 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:48.569258 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:45:48.573819 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:48.577849 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:45:48.577849 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:45:48.579468 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:48.582489 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:45:48.583032 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B96923B30>]}
[0m16:45:48.584045 [info ] [Thread-1 (]: 68 of 97 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.04s]
[0m16:45:48.584045 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:45:48.585374 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:45:48.585884 [info ] [Thread-1 (]: 69 of 97 START sql table model main.dim_regiao ................................. [RUN]
[0m16:45:48.586892 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:45:48.587404 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:45:48.591926 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:48.592988 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:45:48.597860 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:48.600378 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:48.600890 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:45:48.601399 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.602601 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.603122 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:48.603122 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:45:48.605218 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.611722 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:48.613770 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:45:48.616289 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.619825 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:45:48.622564 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:48.623088 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:45:48.627103 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:48.631646 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:45:48.633178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:45:48.634185 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:48.635707 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:45:48.637226 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B96851AC0>]}
[0m16:45:48.637226 [info ] [Thread-1 (]: 69 of 97 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.05s]
[0m16:45:48.638234 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:45:48.638234 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:45:48.639743 [info ] [Thread-1 (]: 70 of 97 START sql table model main.dim_risco .................................. [RUN]
[0m16:45:48.640755 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:45:48.640755 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:45:48.644370 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:48.647409 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:45:48.653532 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:48.654790 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:48.655339 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:45:48.656345 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.657362 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.658373 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:48.660197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:45:48.662216 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.667391 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:48.667391 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:45:48.669581 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.671685 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:45:48.672694 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:48.672694 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:45:48.676702 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:48.679726 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:45:48.681234 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:45:48.682752 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:48.684426 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:45:48.684426 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B889A9C70>]}
[0m16:45:48.685996 [info ] [Thread-1 (]: 70 of 97 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.04s]
[0m16:45:48.687003 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:45:48.688210 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:45:48.689212 [info ] [Thread-1 (]: 71 of 97 START sql table model main.dim_segmento ............................... [RUN]
[0m16:45:48.690213 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:45:48.690716 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:45:48.694713 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:48.696890 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:45:48.704873 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:48.706900 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:48.707601 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:45:48.707601 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.708608 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.708608 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:48.710113 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:45:48.711704 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.717269 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:48.717269 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:45:48.719311 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.720660 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:45:48.721668 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:48.721668 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:45:48.726966 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:48.729989 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:45:48.730998 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:45:48.733063 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.734894 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:45:48.735899 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B9691A5D0>]}
[0m16:45:48.736907 [info ] [Thread-1 (]: 71 of 97 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.05s]
[0m16:45:48.738098 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:45:48.739101 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:45:48.739101 [info ] [Thread-1 (]: 72 of 97 START test not_null_dim_classe_instituicao_id_classe .................. [RUN]
[0m16:45:48.740603 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m16:45:48.740603 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:45:48.746848 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:45:48.748446 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:45:48.751556 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:45:48.752678 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:45:48.752678 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m16:45:48.753686 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.754198 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.754707 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:45:48.754707 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m16:45:48.755226 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.757483 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m16:45:48.758492 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m16:45:48.758492 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m16:45:48.760590 [info ] [Thread-1 (]: 72 of 97 PASS not_null_dim_classe_instituicao_id_classe ........................ [[32mPASS[0m in 0.02s]
[0m16:45:48.761598 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:45:48.762612 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:45:48.763132 [info ] [Thread-1 (]: 73 of 97 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m16:45:48.763132 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m16:45:48.764654 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:45:48.772968 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:45:48.773976 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:45:48.777075 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:45:48.779587 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:45:48.779587 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m16:45:48.781197 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.781197 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.783294 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:45:48.783294 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:48.786965 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:48.788491 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m16:45:48.790000 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m16:45:48.791530 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m16:45:48.792053 [info ] [Thread-1 (]: 73 of 97 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:45:48.793063 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:45:48.793063 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:45:48.794168 [info ] [Thread-1 (]: 74 of 97 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m16:45:48.794773 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m16:45:48.794773 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:45:48.799295 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:45:48.802225 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:45:48.806094 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:45:48.807699 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:45:48.807699 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m16:45:48.808708 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.808708 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.810217 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:45:48.810217 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:48.811819 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:48.815064 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m16:45:48.815570 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m16:45:48.816577 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m16:45:48.818705 [info ] [Thread-1 (]: 74 of 97 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.02s]
[0m16:45:48.822702 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:45:48.823209 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:45:48.824222 [info ] [Thread-1 (]: 75 of 97 START test not_null_dim_consolidado_id_consolidado .................... [RUN]
[0m16:45:48.825219 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m16:45:48.826228 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:45:48.837089 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:45:48.838899 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:45:48.842923 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:45:48.845170 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:45:48.845759 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m16:45:48.845759 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.845759 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.847266 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:45:48.847266 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m16:45:48.849277 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.850891 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m16:45:48.852416 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m16:45:48.852945 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m16:45:48.854043 [info ] [Thread-1 (]: 75 of 97 PASS not_null_dim_consolidado_id_consolidado .......................... [[32mPASS[0m in 0.03s]
[0m16:45:48.855188 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:45:48.855188 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:45:48.856204 [info ] [Thread-1 (]: 76 of 97 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m16:45:48.857962 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m16:45:48.857962 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:45:48.867169 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:45:48.871516 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:45:48.878543 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:45:48.881550 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:45:48.883060 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m16:45:48.884867 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.887121 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:48.888649 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:45:48.889660 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:48.891170 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:48.894953 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m16:45:48.896964 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m16:45:48.897477 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m16:45:48.898488 [info ] [Thread-1 (]: 76 of 97 PASS relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[32mPASS[0m in 0.04s]
[0m16:45:48.900402 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:45:48.901928 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:45:48.902939 [info ] [Thread-1 (]: 77 of 97 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m16:45:48.904453 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m16:45:48.905475 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:45:48.919755 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:45:48.925284 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:45:48.933088 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:45:48.938220 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:45:48.939214 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m16:45:48.939812 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.941148 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.942157 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:45:48.942683 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:48.946980 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:48.950101 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m16:45:48.951622 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m16:45:48.953132 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m16:45:48.954142 [info ] [Thread-1 (]: 77 of 97 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.05s]
[0m16:45:48.956857 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:45:48.958854 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:45:48.960364 [info ] [Thread-1 (]: 78 of 97 START test not_null_dim_controle_id_controle .......................... [RUN]
[0m16:45:48.962682 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m16:45:48.964691 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:45:48.976278 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:45:48.978295 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:45:48.983315 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:45:48.984830 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:45:48.986841 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m16:45:48.986841 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:48.988728 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.988728 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:45:48.989739 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m16:45:48.991247 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:48.996786 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m16:45:48.998782 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m16:45:49.000434 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m16:45:49.006485 [info ] [Thread-1 (]: 78 of 97 PASS not_null_dim_controle_id_controle ................................ [[32mPASS[0m in 0.04s]
[0m16:45:49.009501 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:45:49.010501 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:45:49.011010 [info ] [Thread-1 (]: 79 of 97 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m16:45:49.012018 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m16:45:49.013029 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:45:49.022662 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:45:49.024670 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:45:49.031200 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:45:49.033722 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:45:49.033722 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m16:45:49.035233 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:49.044671 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:45:49.045681 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:45:49.045681 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:49.047683 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:49.051203 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m16:45:49.052723 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m16:45:49.053733 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m16:45:49.054734 [info ] [Thread-1 (]: 79 of 97 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.04s]
[0m16:45:49.056745 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:45:49.056745 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:45:49.057744 [info ] [Thread-1 (]: 80 of 97 START test unique_dim_controle_id_controle ............................ [RUN]
[0m16:45:49.059692 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m16:45:49.060779 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:45:49.067340 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:45:49.069339 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:45:49.073867 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:45:49.076881 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:45:49.076881 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m16:45:49.078391 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:49.080411 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:49.081427 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:45:49.081427 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:49.084734 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:49.086745 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m16:45:49.088729 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m16:45:49.089728 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m16:45:49.090725 [info ] [Thread-1 (]: 80 of 97 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.03s]
[0m16:45:49.091234 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:45:49.092740 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:45:49.093754 [info ] [Thread-1 (]: 81 of 97 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:45:49.094750 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:45:49.095759 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:45:49.102735 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:49.104749 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:45:49.110262 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:49.113300 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:49.114637 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:45:49.115144 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:49.116657 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:49.116657 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:49.117664 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:45:49.199930 [debug] [Thread-1 (]: SQL status: OK in 0.081 seconds
[0m16:45:49.205863 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:49.207376 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:45:49.208907 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:49.210420 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:45:49.210420 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:49.211426 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:45:49.217519 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m16:45:49.222251 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:45:49.222768 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:45:49.223775 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:49.224781 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:45:49.225780 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B88995190>]}
[0m16:45:49.225780 [info ] [Thread-1 (]: 81 of 97 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 0.13s]
[0m16:45:49.226781 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:45:49.226781 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:45:49.227775 [info ] [Thread-1 (]: 82 of 97 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:45:49.227775 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:45:49.229357 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:45:49.234609 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:49.236124 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:45:49.238658 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:49.242190 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:49.243232 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:45:49.244242 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:49.244751 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:49.245759 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:49.246762 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:45:49.457691 [debug] [Thread-1 (]: SQL status: OK in 0.210 seconds
[0m16:45:49.463678 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:49.464831 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:45:49.465884 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:49.467524 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:45:49.467524 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:49.467524 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:45:49.486253 [debug] [Thread-1 (]: SQL status: OK in 0.017 seconds
[0m16:45:49.489947 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:45:49.490476 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:45:49.491003 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:49.492088 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:45:49.492623 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B96944E30>]}
[0m16:45:49.493145 [info ] [Thread-1 (]: 82 of 97 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.26s]
[0m16:45:49.493145 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:45:49.495676 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:45:49.495676 [info ] [Thread-1 (]: 83 of 97 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:45:49.496675 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:45:49.497181 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:45:49.503951 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:49.505195 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:45:49.510227 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:49.512477 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:49.513551 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:45:49.514666 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:49.515721 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:49.516276 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:49.517348 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:45:49.624847 [debug] [Thread-1 (]: SQL status: OK in 0.107 seconds
[0m16:45:49.629370 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:49.629370 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:45:49.630943 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:49.631952 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:45:49.632462 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:49.632990 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:45:49.637068 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:45:49.640697 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:45:49.641307 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:45:49.641832 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:49.643411 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:45:49.643936 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B96778530>]}
[0m16:45:49.644459 [info ] [Thread-1 (]: 83 of 97 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 0.15s]
[0m16:45:49.644994 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:45:49.644994 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:45:49.645998 [info ] [Thread-1 (]: 84 of 97 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:45:49.645998 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:45:49.647002 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:45:49.649518 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:49.651062 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:45:49.655043 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:49.656052 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:49.657183 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:45:49.657183 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:49.657726 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:49.657726 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:49.658731 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:45:49.956155 [debug] [Thread-1 (]: SQL status: OK in 0.298 seconds
[0m16:45:49.961310 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:49.962834 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:45:49.963846 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:49.966504 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:45:49.966504 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:49.967534 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:45:49.997564 [debug] [Thread-1 (]: SQL status: OK in 0.029 seconds
[0m16:45:50.004783 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:45:50.005379 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:45:50.006468 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:50.008867 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:45:50.010106 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B969BF9B0>]}
[0m16:45:50.011277 [info ] [Thread-1 (]: 84 of 97 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.36s]
[0m16:45:50.012358 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:45:50.012875 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:45:50.013399 [info ] [Thread-1 (]: 85 of 97 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:45:50.013935 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:45:50.015455 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:45:50.019648 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:50.021809 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:45:50.026869 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:50.028372 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:50.029905 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:45:50.029905 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:50.031411 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.031411 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:50.031411 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:45:50.492975 [debug] [Thread-1 (]: SQL status: OK in 0.460 seconds
[0m16:45:50.495501 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:50.495501 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:45:50.497007 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:50.498015 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:45:50.498015 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:50.499524 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:45:50.648299 [debug] [Thread-1 (]: SQL status: OK in 0.148 seconds
[0m16:45:50.652541 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:45:50.653055 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:45:50.654126 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:45:50.655736 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:45:50.656272 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8d2eabe8-b2d9-4e18-9079-183c36821e17', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B9684EA20>]}
[0m16:45:50.657428 [info ] [Thread-1 (]: 85 of 97 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.64s]
[0m16:45:50.657980 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:45:50.657980 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:45:50.658986 [info ] [Thread-1 (]: 86 of 97 START test not_null_dim_segmento_id_segmento .......................... [RUN]
[0m16:45:50.658986 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m16:45:50.659987 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:45:50.664025 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:45:50.665025 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:45:50.668879 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:45:50.669383 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:45:50.670390 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m16:45:50.670898 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:50.672465 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.672982 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:45:50.672982 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m16:45:50.675991 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.678496 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m16:45:50.679560 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m16:45:50.680119 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m16:45:50.681203 [info ] [Thread-1 (]: 86 of 97 PASS not_null_dim_segmento_id_segmento ................................ [[32mPASS[0m in 0.02s]
[0m16:45:50.682266 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:45:50.682786 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:45:50.683323 [info ] [Thread-1 (]: 87 of 97 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m16:45:50.684369 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m16:45:50.684899 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:45:50.690659 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:45:50.692696 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:45:50.695910 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:45:50.698414 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:45:50.699417 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m16:45:50.699927 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:50.700938 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.701518 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:45:50.702393 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:50.706281 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:45:50.708424 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m16:45:50.710599 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m16:45:50.711243 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m16:45:50.712311 [info ] [Thread-1 (]: 87 of 97 PASS relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[32mPASS[0m in 0.03s]
[0m16:45:50.714529 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:45:50.715055 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:45:50.716171 [info ] [Thread-1 (]: 88 of 97 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m16:45:50.717239 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m16:45:50.718735 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:45:50.728152 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:45:50.729743 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:45:50.734138 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:45:50.735670 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:45:50.736686 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m16:45:50.736686 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:50.737191 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.738200 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:45:50.738200 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:45:50.740716 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:50.742754 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m16:45:50.742754 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m16:45:50.742754 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m16:45:50.744351 [info ] [Thread-1 (]: 88 of 97 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.03s]
[0m16:45:50.745359 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:45:50.745359 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:45:50.746869 [info ] [Thread-1 (]: 89 of 97 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m16:45:50.747470 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m16:45:50.749223 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:45:50.756757 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:45:50.759482 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:45:50.762724 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:45:50.763266 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:45:50.765220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m16:45:50.765729 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:50.766740 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.767249 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:45:50.767249 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:50.768259 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.771802 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m16:45:50.772836 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m16:45:50.773848 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m16:45:50.774849 [info ] [Thread-1 (]: 89 of 97 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.03s]
[0m16:45:50.775861 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:45:50.776857 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:45:50.776857 [info ] [Thread-1 (]: 90 of 97 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m16:45:50.777860 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m16:45:50.779491 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:45:50.787587 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:45:50.791249 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:45:50.796395 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:45:50.799387 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:45:50.799941 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m16:45:50.800518 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:50.801807 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.802358 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:45:50.803417 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:50.805032 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.807660 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m16:45:50.808667 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m16:45:50.808667 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m16:45:50.808667 [info ] [Thread-1 (]: 90 of 97 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.03s]
[0m16:45:50.810172 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:45:50.810172 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:45:50.810172 [info ] [Thread-1 (]: 91 of 97 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m16:45:50.811772 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m16:45:50.812947 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:45:50.817138 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:45:50.818148 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:45:50.822825 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:45:50.825876 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:45:50.826517 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m16:45:50.828045 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:50.830017 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.830556 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:45:50.831640 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:45:50.833724 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.837060 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m16:45:50.838768 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m16:45:50.839901 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m16:45:50.842994 [info ] [Thread-1 (]: 91 of 97 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.03s]
[0m16:45:50.847077 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:45:50.848355 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:45:50.848893 [info ] [Thread-1 (]: 92 of 97 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m16:45:50.850851 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m16:45:50.851357 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:45:50.859713 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:45:50.861710 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:45:50.866250 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:45:50.868905 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:45:50.870057 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m16:45:50.870663 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:50.871865 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.871865 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:45:50.872874 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:50.874881 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.877421 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m16:45:50.879083 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m16:45:50.880092 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m16:45:50.880601 [info ] [Thread-1 (]: 92 of 97 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.03s]
[0m16:45:50.883141 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:45:50.885681 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:45:50.886188 [info ] [Thread-1 (]: 93 of 97 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m16:45:50.887196 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m16:45:50.888197 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:45:50.900392 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:45:50.901475 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:45:50.906077 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:45:50.908292 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:45:50.909054 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m16:45:50.909563 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:50.910945 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.912015 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:45:50.912015 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:50.914541 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.916423 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m16:45:50.918832 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m16:45:50.919840 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m16:45:50.921081 [info ] [Thread-1 (]: 93 of 97 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.03s]
[0m16:45:50.922866 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:45:50.923569 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:45:50.924122 [info ] [Thread-1 (]: 94 of 97 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m16:45:50.925641 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m16:45:50.927033 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:45:50.933134 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:45:50.935021 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:45:50.939802 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:45:50.941318 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:45:50.943500 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m16:45:50.944101 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:50.944968 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.945977 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:45:50.947047 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m16:45:50.948571 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.950088 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m16:45:50.952098 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m16:45:50.953606 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m16:45:50.954617 [info ] [Thread-1 (]: 94 of 97 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.03s]
[0m16:45:50.956626 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:45:50.956626 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:45:50.958133 [info ] [Thread-1 (]: 95 of 97 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m16:45:50.959143 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m16:45:50.959143 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:45:50.968713 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:45:50.970723 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:45:50.974298 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:45:50.976320 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:45:50.977320 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m16:45:50.977320 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:50.978832 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:50.979844 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:45:50.980846 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:45:50.986884 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:45:50.989391 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m16:45:50.991400 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m16:45:50.991400 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m16:45:50.991400 [info ] [Thread-1 (]: 95 of 97 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.03s]
[0m16:45:50.992906 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:45:50.993916 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:45:50.994918 [info ] [Thread-1 (]: 96 of 97 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m16:45:50.995917 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m16:45:50.995917 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:45:51.001954 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:45:51.004468 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:45:51.007976 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:45:51.008983 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:45:51.010491 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m16:45:51.010491 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:51.011499 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:51.011499 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:45:51.013008 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:45:51.017033 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:45:51.019032 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m16:45:51.020030 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m16:45:51.021538 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m16:45:51.023060 [info ] [Thread-1 (]: 96 of 97 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.03s]
[0m16:45:51.024068 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:45:51.025068 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:45:51.025068 [info ] [Thread-1 (]: 97 of 97 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m16:45:51.026068 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m16:45:51.027067 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:45:51.033216 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:45:51.035736 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:45:51.043790 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:45:51.046801 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:45:51.047799 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m16:45:51.047799 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:45:51.048799 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:51.049800 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:45:51.050801 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m16:45:51.052829 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:45:51.054858 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m16:45:51.056852 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m16:45:51.057851 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m16:45:51.058851 [info ] [Thread-1 (]: 97 of 97 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.03s]
[0m16:45:51.059853 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:45:51.061854 [debug] [MainThread]: Using duckdb connection "master"
[0m16:45:51.062855 [debug] [MainThread]: On master: BEGIN
[0m16:45:51.063362 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:45:51.064368 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:45:51.064368 [debug] [MainThread]: On master: COMMIT
[0m16:45:51.065377 [debug] [MainThread]: Using duckdb connection "master"
[0m16:45:51.065377 [debug] [MainThread]: On master: COMMIT
[0m16:45:51.066385 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:45:51.067387 [debug] [MainThread]: On master: Close
[0m16:45:51.068386 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:45:51.068386 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:45:51.069389 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:45:51.069389 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m16:45:51.070388 [info ] [MainThread]: 
[0m16:45:51.071388 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 11.08 seconds (11.08s).
[0m16:45:51.088449 [debug] [MainThread]: Command end result
[0m16:45:51.289674 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:45:51.296692 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:45:51.311248 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:45:51.312757 [info ] [MainThread]: 
[0m16:45:51.313767 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:45:51.314767 [info ] [MainThread]: 
[0m16:45:51.314767 [info ] [MainThread]: Done. PASS=97 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=97
[0m16:45:51.316766 [debug] [MainThread]: Command `dbt build` succeeded at 16:45:51.316766 after 12.77 seconds
[0m16:45:51.317766 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B8672C260>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B863B2960>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000019B863B2D20>]}
[0m16:45:51.318272 [debug] [MainThread]: Flushing usage events
[0m16:45:52.098442 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:46:33.638408 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015408BE29F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000154069418B0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000154098B7920>]}


============================== 16:46:33.648283 | f3616084-3496-407b-85f5-5ce31bb650d7 ==============================
[0m16:46:33.648283 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:46:33.649363 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:46:33.938613 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015409033EC0>]}
[0m16:46:34.113920 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540AF6B770>]}
[0m16:46:34.130452 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:46:34.775427 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:46:35.176955 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m16:46:35.177490 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m16:46:35.178016 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m16:46:35.190187 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:46:35.254712 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540B459310>]}
[0m16:46:35.395476 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:46:35.400805 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:46:35.585140 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540B682F60>]}
[0m16:46:35.585646 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:46:35.597143 [info ] [MainThread]: 
[0m16:46:35.598154 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:46:35.598154 [info ] [MainThread]: 
[0m16:46:35.599659 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:46:35.609533 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:46:35.894537 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:46:35.895079 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:46:35.895608 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:46:36.815255 [debug] [ThreadPool]: SQL status: OK in 0.919 seconds
[0m16:46:36.817921 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:46:36.819586 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:46:36.820953 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:46:36.830894 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:46:36.832616 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:46:36.833136 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:46:36.834659 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:46:36.836167 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:46:36.837177 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:46:36.837684 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:46:36.837684 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:46:36.838693 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:46:36.838693 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:46:36.840862 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:46:36.840862 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:46:36.842396 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:46:36.844055 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:46:36.844592 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:46:36.848893 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:46:36.854701 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:46:36.854701 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:46:36.854701 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:46:36.856317 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:46:36.856317 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:46:36.856954 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:46:36.871023 [debug] [ThreadPool]: SQL status: OK in 0.014 seconds
[0m16:46:36.872168 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:46:36.874764 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:46:36.874764 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:46:36.875763 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540B261880>]}
[0m16:46:36.875763 [debug] [MainThread]: Using duckdb connection "master"
[0m16:46:36.876769 [debug] [MainThread]: On master: BEGIN
[0m16:46:36.876769 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:46:36.876769 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:46:36.878279 [debug] [MainThread]: On master: COMMIT
[0m16:46:36.878279 [debug] [MainThread]: Using duckdb connection "master"
[0m16:46:36.878279 [debug] [MainThread]: On master: COMMIT
[0m16:46:36.879289 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:46:36.879289 [debug] [MainThread]: On master: Close
[0m16:46:36.884378 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:46:36.884378 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m16:46:36.885882 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m16:46:36.885882 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m16:46:36.892983 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:46:36.895562 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m16:46:36.941279 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:46:36.942297 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:46:36.942808 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m16:46:36.942808 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:46:36.944363 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:36.945372 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:46:36.945372 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
    UNION ALL
    SELECT * FROM portfolio_fallback
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m16:46:37.228425 [debug] [Thread-1 (]: SQL status: OK in 0.282 seconds
[0m16:46:37.237972 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:46:37.238973 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m16:46:37.240475 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:37.262595 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:46:37.263649 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:46:37.264193 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m16:46:37.274852 [debug] [Thread-1 (]: SQL status: OK in 0.010 seconds
[0m16:46:37.285734 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m16:46:37.286313 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m16:46:37.288473 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:37.292901 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m16:46:37.295605 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540B28E690>]}
[0m16:46:37.296612 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.41s]
[0m16:46:37.297735 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m16:46:37.297735 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:46:37.297735 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m16:46:37.299325 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m16:46:37.299325 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m16:46:37.303567 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:46:37.305038 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m16:46:37.312910 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:46:37.314924 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:46:37.315463 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m16:46:37.315980 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:37.317566 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:37.318633 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:46:37.319164 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL

    UNION

    -- Fallback: localizações de instituições presentes apenas nas tabelas SCR
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources

UNION

-- Sentinel para instituições sem dados de localização (cidade, uf, regiao = NULL)
SELECT
    md5(cast('' as varchar)) as id_localizacao,
    NULL as cidade,
    NULL as uf,
    NULL as regiao
    );
  
  
[0m16:46:37.403139 [debug] [Thread-1 (]: SQL status: OK in 0.083 seconds
[0m16:46:37.407376 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:46:37.407880 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m16:46:37.408886 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:37.414101 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:46:37.415128 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:46:37.415676 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m16:46:37.428933 [debug] [Thread-1 (]: SQL status: OK in 0.012 seconds
[0m16:46:37.432636 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m16:46:37.434355 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m16:46:37.435869 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:37.436911 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m16:46:37.437921 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BCEAF30>]}
[0m16:46:37.438919 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.14s]
[0m16:46:37.439919 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m16:46:37.439919 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m16:46:37.441301 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m16:46:37.441806 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m16:46:37.442813 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m16:46:37.447452 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:46:37.448464 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m16:46:37.455553 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m16:46:37.457669 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:46:37.458202 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m16:46:37.458736 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:37.459809 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:37.460489 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:46:37.461015 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m16:46:37.480001 [debug] [Thread-1 (]: SQL status: OK in 0.019 seconds
[0m16:46:37.485200 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:46:37.485729 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m16:46:37.486784 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:37.488938 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:46:37.489469 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:46:37.489999 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m16:46:37.495779 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:46:37.497282 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m16:46:37.498287 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m16:46:37.498287 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:37.499791 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m16:46:37.500796 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540B260830>]}
[0m16:46:37.501802 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.06s]
[0m16:46:37.503925 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m16:46:37.505152 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:46:37.506279 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m16:46:37.507795 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m16:46:37.508348 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:46:37.515396 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:46:37.516957 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:46:37.521237 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:46:37.523718 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:46:37.524725 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m16:46:37.524725 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:37.525728 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:37.526729 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:46:37.526729 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m16:46:38.533132 [debug] [Thread-1 (]: SQL status: OK in 1.005 seconds
[0m16:46:38.538659 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:46:38.539668 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m16:46:38.541177 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:38.543701 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:46:38.544699 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:46:38.545709 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m16:46:38.823872 [debug] [Thread-1 (]: SQL status: OK in 0.278 seconds
[0m16:46:38.829525 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m16:46:38.830031 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m16:46:38.831545 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:38.834584 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m16:46:38.836599 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BD1AA20>]}
[0m16:46:38.837557 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 1.33s]
[0m16:46:38.841073 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m16:46:38.842586 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:46:38.844695 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m16:46:38.845235 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m16:46:38.846754 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:46:38.852912 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:46:38.855580 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:46:38.861128 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:46:38.864085 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:46:38.865598 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m16:46:38.866339 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:38.867344 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:38.869214 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:46:38.869648 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m16:46:39.111971 [debug] [Thread-1 (]: SQL status: OK in 0.242 seconds
[0m16:46:39.114993 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:46:39.115553 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m16:46:39.115553 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:39.117568 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:46:39.117568 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:46:39.117568 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m16:46:39.138556 [debug] [Thread-1 (]: SQL status: OK in 0.019 seconds
[0m16:46:39.140553 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m16:46:39.141057 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m16:46:39.141057 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:39.142062 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m16:46:39.142062 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BBCB680>]}
[0m16:46:39.143067 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.30s]
[0m16:46:39.144075 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m16:46:39.144075 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:46:39.144628 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m16:46:39.144628 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m16:46:39.145635 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:46:39.147653 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:46:39.150181 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:46:39.153999 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:46:39.155106 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:46:39.155106 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m16:46:39.156116 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:39.157131 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:39.157131 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:46:39.157685 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m16:46:39.214804 [debug] [Thread-1 (]: SQL status: OK in 0.057 seconds
[0m16:46:39.218891 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:46:39.219460 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m16:46:39.220015 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:39.220015 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:46:39.221614 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:46:39.221614 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m16:46:39.272671 [debug] [Thread-1 (]: SQL status: OK in 0.050 seconds
[0m16:46:39.275678 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m16:46:39.275678 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m16:46:39.276677 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:39.278186 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m16:46:39.278186 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BD2C710>]}
[0m16:46:39.279865 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.13s]
[0m16:46:39.280871 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m16:46:39.280871 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:46:39.280871 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m16:46:39.283035 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m16:46:39.283035 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:46:39.288662 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:46:39.291196 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:46:39.296941 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:46:39.298557 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:46:39.298557 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m16:46:39.299554 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:39.299554 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:39.301148 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:46:39.301709 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m16:46:39.368933 [debug] [Thread-1 (]: SQL status: OK in 0.066 seconds
[0m16:46:39.371149 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:46:39.372826 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m16:46:39.373935 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:39.375948 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:46:39.376946 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:46:39.376946 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m16:46:39.480944 [debug] [Thread-1 (]: SQL status: OK in 0.104 seconds
[0m16:46:39.484170 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m16:46:39.484170 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m16:46:39.484170 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:39.485751 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m16:46:39.486756 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BD07830>]}
[0m16:46:39.487264 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.20s]
[0m16:46:39.488269 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m16:46:39.488269 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:46:39.489775 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m16:46:39.489775 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m16:46:39.489775 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:46:39.494882 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:46:39.495889 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:46:39.499414 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:46:39.501049 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:46:39.501952 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:46:39.502564 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:39.503090 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:39.503631 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:46:39.503631 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:46:39.925854 [debug] [Thread-1 (]: SQL status: OK in 0.421 seconds
[0m16:46:39.928166 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:46:39.928166 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:46:39.929733 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:39.931354 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:46:39.931354 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:46:39.934396 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:46:40.096599 [debug] [Thread-1 (]: SQL status: OK in 0.161 seconds
[0m16:46:40.099591 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:46:40.101203 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:46:40.102497 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:40.104712 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:46:40.106373 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BD52C60>]}
[0m16:46:40.106894 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.61s]
[0m16:46:40.107437 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:46:40.108446 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:46:40.108446 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m16:46:40.109953 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m16:46:40.109953 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:46:40.114071 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:46:40.115580 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:46:40.120448 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:46:40.122585 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:46:40.122585 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m16:46:40.123120 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:40.123120 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:40.123120 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:46:40.124157 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m16:46:40.131387 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:46:40.135945 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:46:40.136958 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m16:46:40.137977 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:40.138987 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:46:40.138987 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:46:40.138987 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m16:46:40.150981 [debug] [Thread-1 (]: SQL status: OK in 0.011 seconds
[0m16:46:40.153851 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m16:46:40.154409 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m16:46:40.154987 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:40.156000 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m16:46:40.156000 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BC101D0>]}
[0m16:46:40.156000 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.05s]
[0m16:46:40.157350 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m16:46:40.158360 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:46:40.158360 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m16:46:40.160456 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m16:46:40.160456 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:46:40.163527 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:46:40.165681 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:46:40.168917 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:46:40.170039 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:46:40.170039 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m16:46:40.170039 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:40.171591 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:40.171591 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:46:40.173195 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m16:46:40.204512 [debug] [Thread-1 (]: SQL status: OK in 0.030 seconds
[0m16:46:40.207088 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:46:40.207597 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m16:46:40.208607 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:40.210115 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:46:40.210115 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:46:40.210115 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m16:46:40.244316 [debug] [Thread-1 (]: SQL status: OK in 0.033 seconds
[0m16:46:40.246841 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m16:46:40.247470 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m16:46:40.247470 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:40.248476 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m16:46:40.249982 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015419ADDA00>]}
[0m16:46:40.250990 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.09s]
[0m16:46:40.252209 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m16:46:40.252728 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:46:40.254248 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m16:46:40.254248 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m16:46:40.254248 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:46:40.257777 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:46:40.258783 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:46:40.261932 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:46:40.263448 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:46:40.263448 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m16:46:40.264956 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:40.265548 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:40.265548 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:46:40.266556 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m16:46:40.605008 [debug] [Thread-1 (]: SQL status: OK in 0.339 seconds
[0m16:46:40.608638 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:46:40.610147 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m16:46:40.610147 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:40.612606 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:46:40.612606 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:46:40.613615 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m16:46:40.884529 [debug] [Thread-1 (]: SQL status: OK in 0.270 seconds
[0m16:46:40.888062 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m16:46:40.889065 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m16:46:40.890065 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:40.892913 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m16:46:40.893480 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BCA2F30>]}
[0m16:46:40.895001 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.64s]
[0m16:46:40.897009 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m16:46:40.902756 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:46:40.903940 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m16:46:40.908411 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m16:46:40.909200 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:46:40.910243 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:46:40.933234 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:46:40.934239 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m16:46:40.934239 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:40.934769 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:40.935360 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:46:40.935360 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m16:46:40.938428 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:40.955634 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:46:40.956154 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:46:40.971438 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:46:40.976235 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:46:40.978235 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:46:40.979272 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m16:46:40.979780 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m16:46:40.999610 [debug] [Thread-1 (]: SQL status: OK in 0.021 seconds
[0m16:46:41.001840 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m16:46:41.003001 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BBC8A40>]}
[0m16:46:41.003522 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.09s]
[0m16:46:41.004623 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m16:46:41.005197 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:46:41.005197 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m16:46:41.006709 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m16:46:41.006709 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:46:41.007272 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:46:41.010410 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:46:41.010410 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m16:46:41.011418 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.012431 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.012431 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:46:41.012957 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m16:46:41.013500 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.015682 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:46:41.016689 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:46:41.019207 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.020285 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:46:41.024861 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:46:41.025868 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m16:46:41.025868 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m16:46:41.027950 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.029562 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m16:46:41.029562 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BD182F0>]}
[0m16:46:41.031144 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.02s]
[0m16:46:41.031144 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m16:46:41.032663 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:46:41.032663 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m16:46:41.034289 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m16:46:41.034289 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:46:41.035960 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:46:41.039057 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:46:41.040055 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m16:46:41.040055 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.041175 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.041175 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:46:41.041175 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m16:46:41.043201 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.044817 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:46:41.044817 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:46:41.047355 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.049363 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:46:41.052255 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:46:41.052779 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m16:46:41.053306 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m16:46:41.055053 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.056060 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m16:46:41.057070 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BD18950>]}
[0m16:46:41.057743 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.02s]
[0m16:46:41.058270 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m16:46:41.058270 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:46:41.059786 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m16:46:41.060355 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m16:46:41.060355 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:46:41.060355 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:46:41.065567 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:46:41.065567 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m16:46:41.066573 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.067588 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.067588 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:46:41.069157 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m16:46:41.070396 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.072934 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:46:41.073450 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:46:41.074458 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.075465 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:46:41.076465 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:46:41.077973 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m16:46:41.077973 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m16:46:41.079598 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.081197 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m16:46:41.081197 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BD4B800>]}
[0m16:46:41.081197 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.02s]
[0m16:46:41.082737 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m16:46:41.082737 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:46:41.084325 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m16:46:41.084325 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m16:46:41.085928 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:46:41.085928 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:46:41.090736 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:46:41.092277 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m16:46:41.092277 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.092816 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.092816 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:46:41.092816 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m16:46:41.092816 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.094443 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:46:41.094443 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:46:41.097520 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.098527 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:46:41.101101 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:46:41.101676 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m16:46:41.102231 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m16:46:41.105887 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:41.106893 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m16:46:41.107403 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BCE5AF0>]}
[0m16:46:41.108415 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.02s]
[0m16:46:41.108415 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m16:46:41.109955 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:46:41.110561 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m16:46:41.110561 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m16:46:41.111598 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:46:41.111598 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:46:41.116386 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:46:41.118289 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m16:46:41.118289 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.120410 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.120410 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:46:41.121415 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m16:46:41.121415 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.123123 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:46:41.123123 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:46:41.125137 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.126136 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:46:41.127137 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:46:41.127137 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m16:46:41.128647 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m16:46:41.131253 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:41.132773 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m16:46:41.133884 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540B45A450>]}
[0m16:46:41.134893 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.02s]
[0m16:46:41.135888 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m16:46:41.137037 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:46:41.138044 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m16:46:41.138044 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m16:46:41.139046 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:46:41.139046 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:46:41.142059 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:46:41.142059 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m16:46:41.143067 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.143572 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.144080 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:46:41.144637 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m16:46:41.144637 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.145641 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:46:41.146644 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:46:41.149750 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:41.149750 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:46:41.153474 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:46:41.154060 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m16:46:41.154828 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m16:46:41.158939 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:41.158939 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m16:46:41.160445 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BB6FBC0>]}
[0m16:46:41.160445 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.02s]
[0m16:46:41.161957 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m16:46:41.162461 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:46:41.162973 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m16:46:41.162973 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m16:46:41.163979 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:46:41.163979 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:46:41.168031 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:46:41.169036 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m16:46:41.169626 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.170182 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.170182 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:46:41.171191 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m16:46:41.171697 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.172707 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:46:41.174229 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:46:41.176246 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.177268 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:46:41.177802 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:46:41.179391 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m16:46:41.179391 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m16:46:41.182407 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:41.182920 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m16:46:41.183931 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BD2D0D0>]}
[0m16:46:41.184446 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.02s]
[0m16:46:41.184446 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m16:46:41.184446 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:46:41.185955 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m16:46:41.185955 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m16:46:41.185955 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:46:41.186964 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:46:41.189847 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:46:41.190862 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m16:46:41.190862 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.191873 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.192386 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:46:41.192386 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m16:46:41.192892 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.192892 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:46:41.194435 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:46:41.195445 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.197566 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:46:41.198571 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:46:41.198571 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m16:46:41.199588 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m16:46:41.202841 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:41.203930 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m16:46:41.204485 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015419B1BF50>]}
[0m16:46:41.204485 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.02s]
[0m16:46:41.205047 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m16:46:41.206063 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:46:41.206063 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m16:46:41.207311 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m16:46:41.207311 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:46:41.208320 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:46:41.213651 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:46:41.213651 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m16:46:41.213651 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.215159 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.215159 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:46:41.216169 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m16:46:41.216680 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.218246 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:46:41.218246 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m16:46:41.220273 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.221286 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:46:41.222827 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:46:41.223835 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m16:46:41.223835 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m16:46:41.244586 [debug] [Thread-1 (]: SQL status: OK in 0.020 seconds
[0m16:46:41.245596 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m16:46:41.246599 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015419B0DD00>]}
[0m16:46:41.247107 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.04s]
[0m16:46:41.247612 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m16:46:41.247612 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:46:41.248619 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m16:46:41.249624 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m16:46:41.249624 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:46:41.268308 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:46:41.270323 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:46:41.288212 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:46:41.289191 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:46:41.289191 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m16:46:41.290216 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.290763 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.290763 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m16:46:41.290763 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.299592 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:46:41.304607 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m16:46:41.306199 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m16:46:41.306708 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m16:46:41.307216 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.06s]
[0m16:46:41.309232 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m16:46:41.309232 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:46:41.310228 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m16:46:41.310741 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m16:46:41.310741 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:46:41.315225 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:46:41.316236 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:46:41.319805 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:46:41.321322 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:46:41.321322 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m16:46:41.322655 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.323269 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.323269 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m16:46:41.323269 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.324274 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.326275 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m16:46:41.326275 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m16:46:41.326275 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m16:46:41.327785 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m16:46:41.329308 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m16:46:41.329308 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:46:41.329308 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m16:46:41.330318 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m16:46:41.330318 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:46:41.338899 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:46:41.339898 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:46:41.341917 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:46:41.343435 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:46:41.343435 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m16:46:41.344443 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.344443 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.345451 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m16:46:41.345451 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:46:41.349656 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:46:41.349656 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m16:46:41.352027 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m16:46:41.353034 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m16:46:41.353540 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.02s]
[0m16:46:41.354624 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m16:46:41.355318 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:46:41.356326 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m16:46:41.356326 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m16:46:41.356326 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:46:41.360277 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:46:41.360277 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:46:41.365027 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:46:41.367071 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:46:41.367579 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m16:46:41.367579 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.367579 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.369152 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m16:46:41.369152 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.370352 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.372908 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m16:46:41.373919 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m16:46:41.373919 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m16:46:41.374916 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m16:46:41.375916 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m16:46:41.375916 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:46:41.376917 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m16:46:41.376917 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m16:46:41.377946 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:46:41.384292 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:46:41.385850 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:46:41.388403 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:46:41.391939 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:46:41.391939 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m16:46:41.393202 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.394211 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.394715 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m16:46:41.394715 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.398243 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:41.399759 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m16:46:41.399759 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m16:46:41.401276 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m16:46:41.401276 [info ] [Thread-1 (]: 26 of 97 PASS relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[32mPASS[0m in 0.02s]
[0m16:46:41.402803 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m16:46:41.402803 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:46:41.403323 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m16:46:41.404358 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m16:46:41.404358 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:46:41.407610 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:46:41.408621 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:46:41.411728 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:46:41.412735 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:46:41.413879 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m16:46:41.413879 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.414899 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.414899 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m16:46:41.415443 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:46:41.416958 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.417464 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m16:46:41.419651 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m16:46:41.419651 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m16:46:41.420198 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.02s]
[0m16:46:41.421209 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m16:46:41.421209 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:46:41.421721 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m16:46:41.422226 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m16:46:41.422226 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:46:41.425287 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:46:41.426286 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:46:41.429820 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:46:41.431338 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:46:41.431338 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m16:46:41.431338 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.431338 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.432869 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m16:46:41.432869 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.433882 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.434952 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m16:46:41.435950 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m16:46:41.435950 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m16:46:41.435950 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.01s]
[0m16:46:41.437000 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m16:46:41.437000 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:46:41.438341 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m16:46:41.438341 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m16:46:41.438341 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:46:41.443036 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:46:41.445707 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:46:41.448222 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:46:41.449739 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:46:41.449739 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m16:46:41.449739 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.449739 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.451245 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m16:46:41.451870 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:46:41.454084 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.456386 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m16:46:41.456895 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m16:46:41.457446 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m16:46:41.457446 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.02s]
[0m16:46:41.458453 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m16:46:41.459961 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:46:41.460554 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m16:46:41.460554 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m16:46:41.461568 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:46:41.465103 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:46:41.465722 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:46:41.468881 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:46:41.470028 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:46:41.470028 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m16:46:41.470028 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.470028 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.471579 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m16:46:41.471579 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.471579 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.474110 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m16:46:41.475120 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m16:46:41.475120 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m16:46:41.476113 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.01s]
[0m16:46:41.476113 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m16:46:41.477110 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:46:41.477110 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m16:46:41.477110 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m16:46:41.478111 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:46:41.481261 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:46:41.482799 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:46:41.484350 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:46:41.486005 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:46:41.486005 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m16:46:41.486005 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.487074 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.487604 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m16:46:41.487604 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.488617 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.488617 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m16:46:41.490156 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m16:46:41.491171 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m16:46:41.491171 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.01s]
[0m16:46:41.492680 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m16:46:41.492680 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:46:41.493689 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:46:41.494716 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m16:46:41.494716 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:46:41.499745 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:46:41.501833 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:46:41.504654 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:46:41.506286 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:46:41.507302 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m16:46:41.507302 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.508313 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.508313 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m16:46:41.509825 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.514099 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:46:41.516617 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m16:46:41.517628 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m16:46:41.517628 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m16:46:41.519247 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:46:41.520265 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m16:46:41.520775 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:46:41.521282 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:46:41.521282 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m16:46:41.521282 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:46:41.526380 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:46:41.527884 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:46:41.529535 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:46:41.531201 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:46:41.532741 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m16:46:41.532741 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.532741 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.534421 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m16:46:41.534421 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.540017 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:46:41.542547 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m16:46:41.543053 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m16:46:41.544061 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m16:46:41.544566 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:46:41.545572 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m16:46:41.545572 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:46:41.545572 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m16:46:41.545572 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m16:46:41.547084 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:46:41.550134 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:46:41.551252 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:46:41.553588 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:46:41.554147 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:46:41.554680 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m16:46:41.554680 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.554680 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.554680 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m16:46:41.554680 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.556283 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.557809 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m16:46:41.558819 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m16:46:41.558819 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m16:46:41.559818 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.01s]
[0m16:46:41.560325 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m16:46:41.560325 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:46:41.560325 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m16:46:41.560325 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m16:46:41.561883 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:46:41.567878 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:46:41.568557 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:46:41.571325 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:46:41.572590 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:46:41.573109 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m16:46:41.573109 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.574119 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.574119 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m16:46:41.574119 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.575124 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.577173 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m16:46:41.578126 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m16:46:41.578126 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m16:46:41.578126 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:46:41.580058 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m16:46:41.580058 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:46:41.581177 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:46:41.581177 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m16:46:41.581177 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:46:41.587864 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:46:41.589870 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:46:41.591926 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:46:41.593440 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:46:41.594449 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m16:46:41.594449 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.594956 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.594956 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m16:46:41.594956 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.598600 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:41.599710 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m16:46:41.601588 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m16:46:41.602291 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m16:46:41.602851 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:46:41.603863 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m16:46:41.604370 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:46:41.605379 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:46:41.605886 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m16:46:41.605886 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:46:41.610175 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:46:41.614004 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:46:41.617528 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:46:41.620282 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:46:41.621291 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m16:46:41.621291 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.621291 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.623008 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m16:46:41.623008 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.628028 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:46:41.629757 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m16:46:41.631312 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m16:46:41.631312 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m16:46:41.633359 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:46:41.633879 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m16:46:41.634888 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:46:41.635894 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m16:46:41.635894 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m16:46:41.635894 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:46:41.639739 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:46:41.640751 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:46:41.642777 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:46:41.644951 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:46:41.644951 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m16:46:41.645959 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.645959 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.646961 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m16:46:41.646961 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.647539 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.650053 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m16:46:41.651059 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m16:46:41.651059 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m16:46:41.652232 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.02s]
[0m16:46:41.653259 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m16:46:41.653821 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:46:41.654513 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m16:46:41.655085 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m16:46:41.655085 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:46:41.658660 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:46:41.658660 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:46:41.663386 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:46:41.665526 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:46:41.665526 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m16:46:41.666551 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.667562 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.667562 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m16:46:41.667562 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.669140 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.670323 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m16:46:41.671835 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m16:46:41.671835 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m16:46:41.672339 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m16:46:41.672853 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m16:46:41.672853 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:46:41.673860 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:46:41.673860 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m16:46:41.673860 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:46:41.678371 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:46:41.679373 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:46:41.682439 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:46:41.682953 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:46:41.683956 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m16:46:41.683956 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.684463 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.684463 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m16:46:41.684463 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.686978 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.688215 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m16:46:41.689743 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m16:46:41.690751 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m16:46:41.690751 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:46:41.690751 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m16:46:41.692264 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:46:41.692784 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:46:41.692784 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m16:46:41.692784 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:46:41.697512 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:46:41.698523 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:46:41.701214 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:46:41.701804 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:46:41.702391 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m16:46:41.702904 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.703417 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.703417 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m16:46:41.703965 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.707515 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:41.708522 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m16:46:41.710029 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m16:46:41.710029 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m16:46:41.711645 [info ] [Thread-1 (]: 41 of 97 PASS relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m16:46:41.712666 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m16:46:41.712666 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:46:41.713874 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m16:46:41.713874 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m16:46:41.714830 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:46:41.717348 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:46:41.719507 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:46:41.720056 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:46:41.723163 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:46:41.724174 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m16:46:41.724174 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.725173 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.725173 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m16:46:41.725173 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.726680 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.728199 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m16:46:41.729852 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m16:46:41.729852 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m16:46:41.731554 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.02s]
[0m16:46:41.731554 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m16:46:41.731554 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:46:41.732805 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m16:46:41.732805 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m16:46:41.733811 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:46:41.736826 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:46:41.738290 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:46:41.741317 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:46:41.742868 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:46:41.743890 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m16:46:41.744397 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.745404 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.745404 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m16:46:41.746992 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.747508 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.750560 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m16:46:41.751069 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m16:46:41.752079 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m16:46:41.752584 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.02s]
[0m16:46:41.753089 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m16:46:41.753607 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:46:41.753607 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:46:41.754186 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m16:46:41.754698 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:46:41.760363 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:46:41.760363 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:46:41.763445 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:46:41.766074 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:46:41.766592 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m16:46:41.766592 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.768113 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.768113 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m16:46:41.768113 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.770548 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:41.773430 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m16:46:41.774996 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m16:46:41.774996 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m16:46:41.774996 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:46:41.776720 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m16:46:41.778263 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:46:41.778263 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:46:41.779787 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m16:46:41.779787 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:46:41.787799 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:46:41.788337 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:46:41.792421 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:46:41.793946 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:46:41.793946 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m16:46:41.794453 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.795461 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.795461 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m16:46:41.795461 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.800262 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:46:41.801803 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m16:46:41.803244 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m16:46:41.803244 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m16:46:41.804391 [info ] [Thread-1 (]: 45 of 97 PASS relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:46:41.806077 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m16:46:41.806077 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:46:41.807086 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m16:46:41.807592 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m16:46:41.807592 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:46:41.813256 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:46:41.816141 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:46:41.819310 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:46:41.821583 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:46:41.822098 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m16:46:41.822630 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.822630 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.824005 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m16:46:41.824005 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.825521 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.828119 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m16:46:41.829635 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m16:46:41.832178 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m16:46:41.834230 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.03s]
[0m16:46:41.835241 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m16:46:41.836953 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:46:41.838664 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m16:46:41.842256 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m16:46:41.842783 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:46:41.850613 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:46:41.852317 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:46:41.855936 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:46:41.857460 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:46:41.858470 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m16:46:41.858989 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.858989 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.860012 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m16:46:41.860666 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.861801 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.862816 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m16:46:41.864985 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m16:46:41.864985 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m16:46:41.865992 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:46:41.866523 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m16:46:41.867548 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:46:41.867548 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:46:41.869359 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m16:46:41.870368 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:46:41.873920 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:46:41.875533 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:46:41.880189 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:46:41.881726 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:46:41.881726 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m16:46:41.881726 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.882735 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:41.882735 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m16:46:41.883243 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.888321 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:46:41.894463 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m16:46:41.895475 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m16:46:41.897052 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m16:46:41.897052 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:46:41.898676 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m16:46:41.898676 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:46:41.900300 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:46:41.900300 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m16:46:41.901925 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:46:41.913231 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:46:41.917538 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:46:41.921667 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:46:41.924234 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:46:41.924234 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m16:46:41.925883 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.925883 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.925883 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m16:46:41.927538 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.935734 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m16:46:41.936742 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m16:46:41.936742 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m16:46:41.938399 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m16:46:41.938399 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:46:41.940011 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m16:46:41.941602 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:46:41.942126 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m16:46:41.943159 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m16:46:41.943159 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:46:41.950343 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:46:41.953139 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:46:41.956709 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:46:41.957746 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:46:41.957746 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m16:46:41.959269 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.959794 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.960432 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m16:46:41.960432 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.960432 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.963027 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m16:46:41.963548 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m16:46:41.963548 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m16:46:41.963548 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.02s]
[0m16:46:41.965065 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m16:46:41.965677 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:46:41.966190 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m16:46:41.966190 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m16:46:41.966741 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:46:41.970312 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:46:41.971332 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:46:41.974359 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:46:41.975367 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:46:41.975367 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m16:46:41.975367 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:41.977074 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.977074 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m16:46:41.977074 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:41.978592 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:41.981123 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m16:46:41.982637 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m16:46:41.983144 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m16:46:41.984154 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m16:46:41.985096 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m16:46:41.985096 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:46:41.986103 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:46:41.986103 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m16:46:41.988249 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:46:41.993837 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:46:41.995355 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:46:41.998013 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:46:41.999532 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:46:42.000129 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m16:46:42.000129 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.001138 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.001753 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m16:46:42.002268 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:42.003813 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.005036 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m16:46:42.005036 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m16:46:42.006557 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m16:46:42.007122 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m16:46:42.007637 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m16:46:42.009309 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:46:42.009840 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:46:42.010849 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m16:46:42.010849 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:46:42.019232 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:46:42.022682 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:46:42.029348 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:46:42.032024 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:46:42.033158 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m16:46:42.033761 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.035357 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.036454 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m16:46:42.037865 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:42.041945 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:42.044971 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m16:46:42.047144 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m16:46:42.048665 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m16:46:42.049703 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.04s]
[0m16:46:42.049703 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m16:46:42.051229 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:46:42.052396 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m16:46:42.052924 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m16:46:42.053954 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:46:42.060255 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:46:42.063065 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:46:42.065110 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:46:42.066702 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:46:42.067873 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m16:46:42.067873 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.068891 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.069403 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m16:46:42.069403 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:46:42.071443 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.072964 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m16:46:42.073974 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m16:46:42.074480 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m16:46:42.075017 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.02s]
[0m16:46:42.076110 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m16:46:42.076110 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:46:42.076110 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m16:46:42.078454 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m16:46:42.079512 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:46:42.086037 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:46:42.087045 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:46:42.090300 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:46:42.090300 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:46:42.092412 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m16:46:42.092412 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.092929 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.093621 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m16:46:42.094134 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:42.095645 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.096648 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m16:46:42.098208 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m16:46:42.098715 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m16:46:42.099741 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m16:46:42.099741 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m16:46:42.101820 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:46:42.102337 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:46:42.103369 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m16:46:42.103369 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:46:42.112120 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:46:42.113654 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:46:42.118314 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:46:42.120909 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:46:42.121435 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m16:46:42.122442 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.122948 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.122948 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m16:46:42.123956 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:42.128022 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:42.131065 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m16:46:42.133617 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m16:46:42.134134 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m16:46:42.135657 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:46:42.136677 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m16:46:42.136677 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:46:42.136677 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:46:42.138348 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m16:46:42.138348 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:46:42.144542 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:46:42.146678 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:46:42.151101 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:46:42.153628 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:46:42.154689 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m16:46:42.155210 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.156096 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.156618 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m16:46:42.157141 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:42.162142 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:46:42.162666 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m16:46:42.164179 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m16:46:42.164685 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m16:46:42.165201 [info ] [Thread-1 (]: 57 of 97 PASS relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:46:42.165713 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m16:46:42.165713 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:46:42.166719 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m16:46:42.167227 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m16:46:42.168235 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:46:42.175968 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:46:42.177626 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:46:42.179659 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:46:42.181170 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:46:42.181170 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m16:46:42.181170 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.182690 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.182690 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m16:46:42.182690 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:46:42.184205 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.185721 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m16:46:42.186751 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m16:46:42.187345 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m16:46:42.188860 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.02s]
[0m16:46:42.192007 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m16:46:42.193020 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:46:42.194539 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m16:46:42.195048 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m16:46:42.196569 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:46:42.202725 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:46:42.205315 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:46:42.208374 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:46:42.209893 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:46:42.211410 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m16:46:42.211916 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.212949 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.212949 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m16:46:42.213976 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:42.215520 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:42.219979 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m16:46:42.223296 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m16:46:42.224305 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m16:46:42.225926 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.03s]
[0m16:46:42.228071 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m16:46:42.228583 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:46:42.229645 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m16:46:42.231171 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m16:46:42.231697 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:46:42.239911 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:46:42.241945 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:46:42.244676 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:46:42.247609 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:46:42.247609 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m16:46:42.249805 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.251320 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.252838 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m16:46:42.254355 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:42.260011 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:46:42.261525 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m16:46:42.262617 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m16:46:42.264237 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m16:46:42.265451 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.03s]
[0m16:46:42.266575 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m16:46:42.268148 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:46:42.269183 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m16:46:42.269901 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m16:46:42.270458 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:46:42.278253 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:46:42.279774 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:46:42.282783 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:46:42.283813 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:46:42.284820 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m16:46:42.284820 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.286253 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.286942 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m16:46:42.287458 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:42.296238 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m16:46:42.297299 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m16:46:42.299870 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m16:46:42.300935 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m16:46:42.302025 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:46:42.303111 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m16:46:42.303656 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m16:46:42.303656 [info ] [Thread-1 (]: 62 of 97 START sql table model main.dim_atividade .............................. [RUN]
[0m16:46:42.305070 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m16:46:42.306148 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m16:46:42.309995 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:46:42.312561 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m16:46:42.322005 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m16:46:42.323557 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:46:42.323557 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m16:46:42.323557 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.325129 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.325129 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:46:42.325129 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m16:46:42.328524 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.333697 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:46:42.334703 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m16:46:42.336260 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.338852 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:46:42.339371 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:46:42.340380 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m16:46:42.343949 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:42.347387 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m16:46:42.348398 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m16:46:42.349335 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:42.351354 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m16:46:42.352264 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BC158E0>]}
[0m16:46:42.352799 [info ] [Thread-1 (]: 62 of 97 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.05s]
[0m16:46:42.355937 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m16:46:42.355937 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:46:42.357699 [info ] [Thread-1 (]: 63 of 97 START sql table model main.dim_classe_instituicao ..................... [RUN]
[0m16:46:42.359470 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m16:46:42.359470 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:46:42.364461 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:46:42.366750 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:46:42.370818 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:46:42.373493 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:46:42.374097 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m16:46:42.374097 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.375104 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.376896 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:46:42.376896 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m16:46:42.381686 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:46:42.385729 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:46:42.386780 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m16:46:42.387808 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:42.390166 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:46:42.390722 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:46:42.391332 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m16:46:42.394125 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:42.397216 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m16:46:42.398856 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m16:46:42.399396 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:42.401484 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m16:46:42.402046 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540B7D62D0>]}
[0m16:46:42.402565 [info ] [Thread-1 (]: 63 of 97 OK created sql table model main.dim_classe_instituicao ................ [[32mOK[0m in 0.04s]
[0m16:46:42.404206 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m16:46:42.404723 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:46:42.405760 [info ] [Thread-1 (]: 64 of 97 START sql table model main.dim_consolidado ............................ [RUN]
[0m16:46:42.406949 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m16:46:42.407484 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m16:46:42.411734 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:46:42.413258 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m16:46:42.418434 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:46:42.420817 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:46:42.421855 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m16:46:42.421855 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:42.423377 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.424111 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:46:42.424111 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m16:46:42.425774 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.435199 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:46:42.436221 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m16:46:42.437741 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:42.439915 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:46:42.440925 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:46:42.441435 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m16:46:42.444519 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:42.448594 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m16:46:42.450245 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m16:46:42.451284 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:42.453925 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m16:46:42.454536 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015419BD58E0>]}
[0m16:46:43.258318 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m16:46:43.262477 [info ] [Thread-1 (]: 64 of 97 OK created sql table model main.dim_consolidado ....................... [[32mOK[0m in 0.05s]
[0m16:46:43.262998 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m16:46:43.264005 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m16:46:43.265021 [info ] [Thread-1 (]: 65 of 97 START sql table model main.dim_controle ............................... [RUN]
[0m16:46:43.265545 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m16:46:43.266555 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m16:46:43.270613 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:46:43.273167 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m16:46:43.276555 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m16:46:43.278077 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:46:43.278077 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m16:46:43.278077 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.279691 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.279691 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:46:43.279691 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m16:46:43.281299 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.286037 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:46:43.286571 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m16:46:43.287656 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.288885 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:46:43.289416 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:46:43.289930 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m16:46:43.292581 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:43.295184 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m16:46:43.295184 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m16:46:43.295184 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.297356 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m16:46:43.297356 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540B7933B0>]}
[0m16:46:43.298367 [info ] [Thread-1 (]: 65 of 97 OK created sql table model main.dim_controle .......................... [[32mOK[0m in 0.03s]
[0m16:46:43.298367 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m16:46:43.298367 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:46:43.300411 [info ] [Thread-1 (]: 66 of 97 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m16:46:43.301421 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m16:46:43.302033 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:46:43.304113 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:46:43.304666 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:46:43.309301 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:46:43.310873 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:46:43.311399 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m16:46:43.311399 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.311912 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.312443 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:46:43.312443 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m16:46:43.313476 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.316820 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:46:43.316820 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m16:46:43.317881 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.318887 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:46:43.319392 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:46:43.319392 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m16:46:43.327923 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:46:43.333055 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m16:46:43.334097 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m16:46:43.335106 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.337162 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m16:46:43.337675 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015419C39700>]}
[0m16:46:43.338743 [info ] [Thread-1 (]: 66 of 97 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.04s]
[0m16:46:43.339702 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m16:46:43.339702 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m16:46:43.340763 [info ] [Thread-1 (]: 67 of 97 START sql table model main.dim_porte .................................. [RUN]
[0m16:46:43.341310 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m16:46:43.341310 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m16:46:43.343925 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:46:43.345516 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m16:46:43.352908 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m16:46:43.354528 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:46:43.354528 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m16:46:43.355052 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.355052 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.356061 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:46:43.356061 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m16:46:43.357080 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.360126 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:46:43.360126 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m16:46:43.361133 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.361638 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:46:43.363120 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:46:43.363120 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m16:46:43.366753 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:43.369927 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m16:46:43.370454 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m16:46:43.370967 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.372535 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m16:46:43.373051 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540B751430>]}
[0m16:46:43.373051 [info ] [Thread-1 (]: 67 of 97 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.03s]
[0m16:46:43.374071 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m16:46:43.374071 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:46:43.375751 [info ] [Thread-1 (]: 68 of 97 START sql table model main.dim_produto_credito ........................ [RUN]
[0m16:46:43.375751 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m16:46:43.375751 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:46:43.381604 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:46:43.383126 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:46:43.387715 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:46:43.389232 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:46:43.389751 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m16:46:43.390759 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.392491 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.393108 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:46:43.394431 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m16:46:43.395990 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.399688 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:46:43.401123 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m16:46:43.401661 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.402693 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:46:43.403277 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:46:43.403277 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m16:46:43.405829 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:43.409723 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m16:46:43.410242 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m16:46:43.410788 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.412831 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m16:46:43.413357 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015419C7F830>]}
[0m16:46:43.414883 [info ] [Thread-1 (]: 68 of 97 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.04s]
[0m16:46:43.415497 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m16:46:43.416021 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m16:46:43.416545 [info ] [Thread-1 (]: 69 of 97 START sql table model main.dim_regiao ................................. [RUN]
[0m16:46:43.417555 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m16:46:43.418068 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m16:46:43.423225 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:46:43.425607 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m16:46:43.430563 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m16:46:43.432700 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:46:43.433772 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m16:46:43.433772 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.434317 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.435262 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:46:43.435262 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m16:46:43.436743 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.442055 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:46:43.442055 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m16:46:43.443061 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.444510 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:46:43.446153 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:46:43.446677 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m16:46:43.449194 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:43.451445 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m16:46:43.452868 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m16:46:43.453882 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.454951 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m16:46:43.455959 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BC97FB0>]}
[0m16:46:43.456467 [info ] [Thread-1 (]: 69 of 97 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.04s]
[0m16:46:43.456467 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m16:46:43.457475 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m16:46:43.457475 [info ] [Thread-1 (]: 70 of 97 START sql table model main.dim_risco .................................. [RUN]
[0m16:46:43.459127 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m16:46:43.459127 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m16:46:43.465274 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:46:43.467365 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m16:46:43.472140 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m16:46:43.473382 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:46:43.474392 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m16:46:43.474392 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.476078 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.476078 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:46:43.476078 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m16:46:43.477669 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.481232 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:46:43.481232 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m16:46:43.482755 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.485282 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:46:43.485790 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:46:43.485790 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m16:46:43.488315 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:43.492950 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m16:46:43.494597 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m16:46:43.494597 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.496779 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m16:46:43.497421 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BC92690>]}
[0m16:46:43.497421 [info ] [Thread-1 (]: 70 of 97 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.04s]
[0m16:46:43.500629 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m16:46:43.501821 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m16:46:43.503069 [info ] [Thread-1 (]: 71 of 97 START sql table model main.dim_segmento ............................... [RUN]
[0m16:46:43.504180 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m16:46:43.504703 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m16:46:43.509875 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:46:43.511713 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m16:46:43.520622 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m16:46:43.521687 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:46:43.522697 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m16:46:43.523205 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.523205 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.523205 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:46:43.524848 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m16:46:43.524848 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.529610 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:46:43.531225 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m16:46:43.531225 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.533977 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:46:43.533977 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:46:43.533977 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m16:46:43.537241 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:43.539971 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m16:46:43.540478 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m16:46:43.540478 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.541996 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m16:46:43.543517 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015419C67F80>]}
[0m16:46:43.544044 [info ] [Thread-1 (]: 71 of 97 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.04s]
[0m16:46:43.546106 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m16:46:43.547153 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:46:43.548330 [info ] [Thread-1 (]: 72 of 97 START test not_null_dim_classe_instituicao_id_classe .................. [RUN]
[0m16:46:43.550197 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m16:46:43.550737 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:46:43.556062 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:46:43.557583 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:46:43.560755 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:46:43.562281 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:46:43.562806 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m16:46:43.562806 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.563751 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.564760 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m16:46:43.565266 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m16:46:43.566785 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.568313 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m16:46:43.569580 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m16:46:43.570195 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m16:46:43.570716 [info ] [Thread-1 (]: 72 of 97 PASS not_null_dim_classe_instituicao_id_classe ........................ [[32mPASS[0m in 0.02s]
[0m16:46:43.570716 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m16:46:43.571727 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:46:43.572235 [info ] [Thread-1 (]: 73 of 97 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m16:46:43.572800 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m16:46:43.572800 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:46:43.582228 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:46:43.585483 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:46:43.588933 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:46:43.589942 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:46:43.589942 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m16:46:43.591549 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.593088 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.593597 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m16:46:43.593597 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:43.596247 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.597847 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m16:46:43.599373 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m16:46:43.599373 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m16:46:43.600976 [info ] [Thread-1 (]: 73 of 97 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.03s]
[0m16:46:43.602213 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m16:46:43.602743 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:46:43.603264 [info ] [Thread-1 (]: 74 of 97 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m16:46:43.603789 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m16:46:43.605171 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:46:43.611278 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:46:43.612802 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:46:43.616261 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:46:43.617274 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:46:43.617274 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m16:46:43.619600 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.621869 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:43.622416 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m16:46:43.623524 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:46:43.626650 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:43.629850 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m16:46:43.631372 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m16:46:43.631372 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m16:46:43.631372 [info ] [Thread-1 (]: 74 of 97 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.03s]
[0m16:46:43.632999 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m16:46:43.632999 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:46:43.632999 [info ] [Thread-1 (]: 75 of 97 START test not_null_dim_consolidado_id_consolidado .................... [RUN]
[0m16:46:43.634009 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m16:46:43.634009 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:46:43.640847 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:46:43.641919 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:46:43.644553 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:46:43.647712 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:46:43.647712 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m16:46:43.647712 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.649894 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.650414 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m16:46:43.650414 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m16:46:43.651512 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.653757 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m16:46:43.655926 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m16:46:43.656972 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m16:46:43.657490 [info ] [Thread-1 (]: 75 of 97 PASS not_null_dim_consolidado_id_consolidado .......................... [[32mPASS[0m in 0.02s]
[0m16:46:43.657490 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m16:46:43.659241 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:46:43.659241 [info ] [Thread-1 (]: 76 of 97 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m16:46:43.660760 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m16:46:43.661773 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:46:43.668913 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:46:43.670817 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:46:43.672877 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:46:43.673892 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:46:43.674399 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m16:46:43.674399 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.675411 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.675411 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m16:46:43.675411 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:43.677089 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.678604 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m16:46:43.680117 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m16:46:43.681126 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m16:46:43.683174 [info ] [Thread-1 (]: 76 of 97 PASS relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[32mPASS[0m in 0.02s]
[0m16:46:43.686888 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m16:46:43.687937 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:46:43.689076 [info ] [Thread-1 (]: 77 of 97 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m16:46:43.690118 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m16:46:43.690658 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:46:43.697086 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:46:43.699281 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:46:43.704986 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:46:43.706566 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:46:43.706566 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m16:46:43.707580 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.708086 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.708086 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m16:46:43.708086 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:46:43.711777 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:43.713294 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m16:46:43.714824 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m16:46:43.719034 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m16:46:43.719543 [info ] [Thread-1 (]: 77 of 97 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.03s]
[0m16:46:43.720566 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m16:46:43.722095 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:46:43.723144 [info ] [Thread-1 (]: 78 of 97 START test not_null_dim_controle_id_controle .......................... [RUN]
[0m16:46:43.723666 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m16:46:43.723666 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:46:43.729777 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:46:43.732611 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:46:43.735717 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:46:43.736763 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:46:43.738291 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m16:46:43.738291 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.739299 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.739833 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m16:46:43.739833 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m16:46:43.740847 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.742054 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m16:46:43.743578 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m16:46:43.743578 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m16:46:43.744620 [info ] [Thread-1 (]: 78 of 97 PASS not_null_dim_controle_id_controle ................................ [[32mPASS[0m in 0.02s]
[0m16:46:43.745684 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m16:46:43.745684 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:46:43.745684 [info ] [Thread-1 (]: 79 of 97 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m16:46:43.747562 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m16:46:43.748101 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:46:43.753094 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:46:43.753617 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:46:43.757474 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:46:43.759100 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:46:43.760111 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m16:46:43.760111 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.760626 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.760626 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m16:46:43.761638 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:43.763275 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.765306 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m16:46:43.766824 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m16:46:43.767352 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m16:46:43.767352 [info ] [Thread-1 (]: 79 of 97 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.02s]
[0m16:46:43.768361 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m16:46:43.768869 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:46:43.768869 [info ] [Thread-1 (]: 80 of 97 START test unique_dim_controle_id_controle ............................ [RUN]
[0m16:46:43.768869 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m16:46:43.770165 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:46:43.773435 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:46:43.775156 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:46:43.777801 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:46:43.780475 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:46:43.781243 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m16:46:43.781963 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.782497 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.783015 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m16:46:43.783555 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:46:43.784617 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:43.786557 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m16:46:43.788069 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m16:46:43.788069 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m16:46:43.788069 [info ] [Thread-1 (]: 80 of 97 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.02s]
[0m16:46:43.789075 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m16:46:43.789075 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:46:43.790119 [info ] [Thread-1 (]: 81 of 97 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m16:46:43.790119 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m16:46:43.790119 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:46:43.794432 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:46:43.796052 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:46:43.799198 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:46:43.800850 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:46:43.801442 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m16:46:43.801963 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.802482 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.803005 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:46:43.803551 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:46:43.849412 [debug] [Thread-1 (]: SQL status: OK in 0.045 seconds
[0m16:46:43.852143 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:46:43.852143 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m16:46:43.853151 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.854778 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:46:43.854778 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:46:43.854778 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m16:46:43.864647 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m16:46:43.866275 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m16:46:43.866275 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m16:46:43.867297 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:43.867803 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m16:46:43.867803 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BC92870>]}
[0m16:46:43.869321 [info ] [Thread-1 (]: 81 of 97 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 0.08s]
[0m16:46:43.870331 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m16:46:43.870331 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:46:43.870837 [info ] [Thread-1 (]: 82 of 97 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m16:46:43.871351 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m16:46:43.871351 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:46:43.873914 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:46:43.875575 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:46:43.880760 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:46:43.881806 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:46:43.882333 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m16:46:43.882333 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:43.882848 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:43.883368 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:46:43.883896 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:46:44.057613 [debug] [Thread-1 (]: SQL status: OK in 0.174 seconds
[0m16:46:44.061985 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:46:44.062500 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m16:46:44.063012 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:44.065096 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:46:44.065666 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:46:44.065666 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m16:46:44.082962 [debug] [Thread-1 (]: SQL status: OK in 0.016 seconds
[0m16:46:44.085485 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m16:46:44.086011 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m16:46:44.086531 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:44.087042 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m16:46:44.087042 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015419CB9640>]}
[0m16:46:44.088672 [info ] [Thread-1 (]: 82 of 97 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.22s]
[0m16:46:44.089280 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m16:46:44.090308 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:46:44.090308 [info ] [Thread-1 (]: 83 of 97 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m16:46:44.091823 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m16:46:44.091823 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:46:44.096457 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:46:44.098079 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:46:44.102368 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:46:44.104782 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:46:44.105839 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m16:46:44.107004 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:44.108058 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:44.109065 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:46:44.109598 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m16:46:44.222584 [debug] [Thread-1 (]: SQL status: OK in 0.112 seconds
[0m16:46:44.225599 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:46:44.225599 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m16:46:44.227171 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:44.229339 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:46:44.230349 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:46:44.230853 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m16:46:44.235441 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m16:46:44.238886 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m16:46:44.239926 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m16:46:44.240446 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:44.240959 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m16:46:44.241966 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540B7A8E30>]}
[0m16:46:44.243048 [info ] [Thread-1 (]: 83 of 97 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 0.15s]
[0m16:46:44.244107 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m16:46:44.244673 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:46:44.244673 [info ] [Thread-1 (]: 84 of 97 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m16:46:44.245679 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m16:46:44.246212 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:46:44.249438 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:46:44.250443 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:46:44.253657 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:46:44.254986 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:46:44.254986 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m16:46:44.254986 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:44.256021 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:44.256529 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:46:44.257040 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:46:44.554489 [debug] [Thread-1 (]: SQL status: OK in 0.297 seconds
[0m16:46:44.559455 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:46:44.559976 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m16:46:44.561561 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:44.564137 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:46:44.564675 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:46:44.565191 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m16:46:44.592888 [debug] [Thread-1 (]: SQL status: OK in 0.027 seconds
[0m16:46:44.597630 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m16:46:44.598638 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m16:46:44.599639 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:46:44.601991 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m16:46:44.602998 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001541A037770>]}
[0m16:46:44.603503 [info ] [Thread-1 (]: 84 of 97 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.36s]
[0m16:46:44.603503 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m16:46:44.604974 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:46:44.606167 [info ] [Thread-1 (]: 85 of 97 START sql table model main.fato_risco_credito ......................... [RUN]
[0m16:46:44.607683 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m16:46:44.607683 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:46:44.613558 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:46:44.615077 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:46:44.621712 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:46:44.623853 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:46:44.624864 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m16:46:44.625371 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:44.627374 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:44.628443 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:46:44.629961 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m16:46:45.357751 [debug] [Thread-1 (]: SQL status: OK in 0.728 seconds
[0m16:46:45.365025 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:46:45.366083 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m16:46:45.366610 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.369720 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:46:45.371329 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:46:45.372338 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m16:46:45.534065 [debug] [Thread-1 (]: SQL status: OK in 0.161 seconds
[0m16:46:45.540000 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m16:46:45.540507 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m16:46:45.543038 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.545072 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m16:46:45.547342 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'f3616084-3496-407b-85f5-5ce31bb650d7', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001540BC930B0>]}
[0m16:46:45.548358 [info ] [Thread-1 (]: 85 of 97 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.94s]
[0m16:46:45.550392 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m16:46:45.551449 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:46:45.551992 [info ] [Thread-1 (]: 86 of 97 START test not_null_dim_segmento_id_segmento .......................... [RUN]
[0m16:46:45.553013 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m16:46:45.553531 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:46:45.562497 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:46:45.563526 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:46:45.567731 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:46:45.569325 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:46:45.569325 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m16:46:45.570333 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:45.571360 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.572880 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m16:46:45.573892 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m16:46:45.575573 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.579715 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m16:46:45.582323 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m16:46:45.582838 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m16:46:45.583875 [info ] [Thread-1 (]: 86 of 97 PASS not_null_dim_segmento_id_segmento ................................ [[32mPASS[0m in 0.03s]
[0m16:46:45.586117 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m16:46:45.587634 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:46:45.587634 [info ] [Thread-1 (]: 87 of 97 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m16:46:45.589216 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m16:46:45.589216 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:46:45.602771 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:46:45.604220 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:46:45.611723 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:46:45.615008 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:46:45.615766 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m16:46:45.617290 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:45.618908 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:45.620129 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m16:46:45.620129 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:45.623285 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:45.624903 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m16:46:45.626958 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m16:46:45.626958 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m16:46:45.627965 [info ] [Thread-1 (]: 87 of 97 PASS relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[32mPASS[0m in 0.04s]
[0m16:46:45.628470 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m16:46:45.629476 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:46:45.629476 [info ] [Thread-1 (]: 88 of 97 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m16:46:45.629476 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m16:46:45.631037 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:46:45.640678 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:46:45.643727 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:46:45.648322 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:46:45.649861 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:46:45.649861 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m16:46:45.650874 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:45.651388 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.652059 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m16:46:45.652658 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m16:46:45.654768 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:46:45.656374 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m16:46:45.657889 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m16:46:45.657889 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m16:46:45.657889 [info ] [Thread-1 (]: 88 of 97 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.03s]
[0m16:46:45.659473 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m16:46:45.659988 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:46:45.660575 [info ] [Thread-1 (]: 89 of 97 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m16:46:45.661585 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m16:46:45.662088 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:46:45.666739 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:46:45.668325 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:46:45.672906 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:46:45.674569 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:46:45.676142 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m16:46:45.676142 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:45.678278 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.678278 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m16:46:45.679294 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:45.679294 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.682590 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m16:46:45.684124 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m16:46:45.684124 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m16:46:45.686751 [info ] [Thread-1 (]: 89 of 97 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.03s]
[0m16:46:45.687260 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m16:46:45.687260 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:46:45.688788 [info ] [Thread-1 (]: 90 of 97 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m16:46:45.689799 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m16:46:45.690306 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:46:45.694871 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:46:45.696973 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:46:45.699492 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:46:45.702207 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:46:45.702732 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m16:46:45.703742 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:45.705205 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.705205 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m16:46:45.705205 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:45.707435 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.709482 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m16:46:45.710005 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m16:46:45.711402 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m16:46:45.711402 [info ] [Thread-1 (]: 90 of 97 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.02s]
[0m16:46:45.712927 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m16:46:45.712927 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:46:45.714671 [info ] [Thread-1 (]: 91 of 97 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m16:46:45.714671 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m16:46:45.715679 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:46:45.721249 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:46:45.722775 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:46:45.725302 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:46:45.726899 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:46:45.727915 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m16:46:45.728423 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:45.729431 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.729938 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m16:46:45.729938 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m16:46:45.731458 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.732975 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m16:46:45.734491 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m16:46:45.734491 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m16:46:45.736006 [info ] [Thread-1 (]: 91 of 97 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.02s]
[0m16:46:45.737532 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m16:46:45.737532 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:46:45.737532 [info ] [Thread-1 (]: 92 of 97 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m16:46:45.739148 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m16:46:45.739148 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:46:45.745223 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:46:45.747117 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:46:45.750318 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:46:45.751549 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:46:45.753087 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m16:46:45.753087 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:45.756352 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m16:46:45.756352 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m16:46:45.758007 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:45.760031 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.763072 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m16:46:45.765633 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m16:46:45.767397 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m16:46:45.767923 [info ] [Thread-1 (]: 92 of 97 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.03s]
[0m16:46:45.769435 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m16:46:45.770442 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:46:45.771456 [info ] [Thread-1 (]: 93 of 97 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m16:46:45.772506 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m16:46:45.773027 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:46:45.784050 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:46:45.787106 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:46:45.794948 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:46:45.797500 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:46:45.797500 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m16:46:45.797500 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:45.799663 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.800675 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m16:46:45.801184 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:45.802723 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.805266 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m16:46:45.806783 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m16:46:45.808467 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m16:46:45.809381 [info ] [Thread-1 (]: 93 of 97 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.04s]
[0m16:46:45.810418 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m16:46:45.811428 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:46:45.811935 [info ] [Thread-1 (]: 94 of 97 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m16:46:45.812941 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m16:46:45.813448 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:46:45.820548 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:46:45.823121 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:46:45.827401 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:46:45.829531 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:46:45.830799 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m16:46:45.831326 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:45.832919 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.833450 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m16:46:45.833971 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m16:46:45.835896 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.838195 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m16:46:45.839853 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m16:46:45.840370 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m16:46:45.840370 [info ] [Thread-1 (]: 94 of 97 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.03s]
[0m16:46:45.842901 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m16:46:45.843410 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:46:45.844420 [info ] [Thread-1 (]: 95 of 97 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m16:46:45.844927 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m16:46:45.844927 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:46:45.855589 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:46:45.857670 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:46:45.861757 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:46:45.863834 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:46:45.864846 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m16:46:45.865891 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:45.866954 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.867474 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m16:46:45.867989 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m16:46:45.874305 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m16:46:45.876824 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m16:46:45.878368 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m16:46:45.879002 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m16:46:45.879508 [info ] [Thread-1 (]: 95 of 97 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.03s]
[0m16:46:45.881167 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m16:46:45.882712 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:46:45.882712 [info ] [Thread-1 (]: 96 of 97 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m16:46:45.884313 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m16:46:45.885320 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:46:45.893214 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:46:45.895270 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:46:45.898884 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:46:45.900486 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:46:45.901492 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m16:46:45.901996 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:45.903001 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.903509 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m16:46:45.904344 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m16:46:45.907008 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.909160 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m16:46:45.910673 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m16:46:45.911680 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m16:46:45.912712 [info ] [Thread-1 (]: 96 of 97 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.03s]
[0m16:46:45.914225 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m16:46:45.914732 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:46:45.915252 [info ] [Thread-1 (]: 97 of 97 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m16:46:45.915252 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m16:46:45.916261 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:46:45.922888 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:46:45.924545 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:46:45.932452 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:46:45.934027 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:46:45.934553 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m16:46:45.934553 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m16:46:45.936067 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.936593 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m16:46:45.937103 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m16:46:45.938649 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:46:45.940160 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m16:46:45.942330 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m16:46:45.943375 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m16:46:45.944385 [info ] [Thread-1 (]: 97 of 97 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.03s]
[0m16:46:45.944891 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m16:46:45.947553 [debug] [MainThread]: Using duckdb connection "master"
[0m16:46:45.948058 [debug] [MainThread]: On master: BEGIN
[0m16:46:45.948058 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:46:45.949576 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:46:45.949576 [debug] [MainThread]: On master: COMMIT
[0m16:46:45.949576 [debug] [MainThread]: Using duckdb connection "master"
[0m16:46:45.949576 [debug] [MainThread]: On master: COMMIT
[0m16:46:45.951150 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:46:45.951757 [debug] [MainThread]: On master: Close
[0m16:46:45.952917 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:46:45.952917 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:46:45.953957 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:46:45.955099 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m16:46:45.955630 [info ] [MainThread]: 
[0m16:46:45.956661 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 10.36 seconds (10.36s).
[0m16:46:45.976599 [debug] [MainThread]: Command end result
[0m16:46:46.171203 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:46:46.177397 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:46:46.192592 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:46:46.193106 [info ] [MainThread]: 
[0m16:46:46.193106 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:46:46.194620 [info ] [MainThread]: 
[0m16:46:46.195631 [info ] [MainThread]: Done. PASS=97 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=97
[0m16:46:46.197810 [debug] [MainThread]: Command `dbt build` succeeded at 16:46:46.197810 after 12.75 seconds
[0m16:46:46.198451 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015409554BF0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015409C54B90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000015409C54B60>]}
[0m16:46:46.199460 [debug] [MainThread]: Flushing usage events
[0m16:46:46.928285 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m18:18:06.142934 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FB581A90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FE67F920>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FE2E8EF0>]}


============================== 18:18:06.149936 | e9d12424-aba5-4b9d-97dd-1bbb5c929373 ==============================
[0m18:18:06.149936 [info ] [MainThread]: Running with dbt=1.11.5
[0m18:18:06.150936 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m18:18:06.376503 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FDECA210>]}
[0m18:18:06.423024 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FFC017F0>]}
[0m18:18:06.426008 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m18:18:06.638345 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m18:18:06.812343 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m18:18:06.812343 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m18:18:06.812343 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m18:18:06.817343 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m18:18:06.853344 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FFE72930>]}
[0m18:18:06.933267 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m18:18:06.936260 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m18:18:07.039529 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166802A2AB0>]}
[0m18:18:07.040529 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m18:18:07.046530 [info ] [MainThread]: 
[0m18:18:07.047512 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m18:18:07.047512 [info ] [MainThread]: 
[0m18:18:07.048513 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m18:18:07.053552 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m18:18:07.202529 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m18:18:07.202529 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m18:18:07.202529 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m18:18:07.740356 [debug] [ThreadPool]: SQL status: OK in 0.537 seconds
[0m18:18:07.741375 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m18:18:07.741375 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m18:18:07.741375 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m18:18:07.747375 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m18:18:07.747375 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m18:18:07.747375 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m18:18:07.748373 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m18:18:07.749374 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m18:18:07.749374 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m18:18:07.749374 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m18:18:07.750357 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m18:18:07.750357 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m18:18:07.750357 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m18:18:07.751359 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m18:18:07.751359 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m18:18:07.751359 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m18:18:07.752396 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m18:18:07.752396 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m18:18:07.754377 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m18:18:07.758372 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m18:18:07.758372 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m18:18:07.759357 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m18:18:07.759357 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m18:18:07.759357 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m18:18:07.759357 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m18:18:07.769374 [debug] [ThreadPool]: SQL status: OK in 0.009 seconds
[0m18:18:07.770375 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m18:18:07.771357 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m18:18:07.771357 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m18:18:07.772373 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166803CED20>]}
[0m18:18:07.772373 [debug] [MainThread]: Using duckdb connection "master"
[0m18:18:07.772373 [debug] [MainThread]: On master: BEGIN
[0m18:18:07.773374 [debug] [MainThread]: Opening a new connection, currently in state init
[0m18:18:07.773374 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m18:18:07.773374 [debug] [MainThread]: On master: COMMIT
[0m18:18:07.773374 [debug] [MainThread]: Using duckdb connection "master"
[0m18:18:07.773374 [debug] [MainThread]: On master: COMMIT
[0m18:18:07.774373 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m18:18:07.774373 [debug] [MainThread]: On master: Close
[0m18:18:07.778377 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m18:18:07.778377 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m18:18:07.779373 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m18:18:07.779373 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m18:18:07.786355 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:18:07.788355 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m18:18:07.808381 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:18:07.809374 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:18:07.810360 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m18:18:07.810360 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m18:18:07.810360 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:07.811357 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:18:07.811357 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
    UNION ALL
    SELECT * FROM portfolio_fallback
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m18:18:07.985198 [debug] [Thread-1 (]: SQL status: OK in 0.174 seconds
[0m18:18:07.990208 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:18:07.990208 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m18:18:07.991197 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:07.999197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m18:18:08.000198 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:18:08.000198 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m18:18:08.006181 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m18:18:08.013198 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m18:18:08.013198 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m18:18:08.014198 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.016181 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m18:18:08.019181 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FB65DE80>]}
[0m18:18:08.020181 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.24s]
[0m18:18:08.021182 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m18:18:08.022181 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m18:18:08.023185 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m18:18:08.023185 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m18:18:08.023185 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m18:18:08.027183 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m18:18:08.028180 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m18:18:08.031182 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m18:18:08.033181 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m18:18:08.033181 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m18:18:08.033181 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:08.034185 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:08.034185 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m18:18:08.034185 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL

    UNION

    -- Fallback: localizações de instituições presentes apenas nas tabelas SCR
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources

UNION

-- Sentinel para instituições sem dados de localização (cidade, uf, regiao = NULL)
SELECT
    md5(cast('' as varchar)) as id_localizacao,
    NULL as cidade,
    NULL as uf,
    NULL as regiao
    );
  
  
[0m18:18:08.109198 [debug] [Thread-1 (]: SQL status: OK in 0.075 seconds
[0m18:18:08.112197 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m18:18:08.112197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m18:18:08.113198 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.113198 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m18:18:08.114197 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m18:18:08.114197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m18:18:08.116201 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:08.119198 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m18:18:08.119198 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m18:18:08.120197 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.121197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m18:18:08.122198 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FFDADFD0>]}
[0m18:18:08.123209 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.10s]
[0m18:18:08.124197 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m18:18:08.125199 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m18:18:08.125199 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m18:18:08.126182 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m18:18:08.127181 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m18:18:08.130181 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m18:18:08.131181 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m18:18:08.134182 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m18:18:08.135183 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:18:08.136188 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m18:18:08.136188 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:08.137186 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:08.137186 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:18:08.138185 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m18:18:08.158201 [debug] [Thread-1 (]: SQL status: OK in 0.020 seconds
[0m18:18:08.162197 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:18:08.163198 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m18:18:08.163198 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.164200 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m18:18:08.164200 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:18:08.165200 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m18:18:08.167199 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:08.169196 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m18:18:08.170197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m18:18:08.171198 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.173198 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m18:18:08.173198 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166808A35C0>]}
[0m18:18:08.174198 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.05s]
[0m18:18:08.175198 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m18:18:08.176198 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m18:18:08.177181 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m18:18:08.178181 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m18:18:08.178181 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m18:18:08.185197 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:18:08.187181 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m18:18:08.192181 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:18:08.194197 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:18:08.194197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m18:18:08.195185 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:08.195185 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:08.196200 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:18:08.196200 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m18:18:08.567175 [debug] [Thread-1 (]: SQL status: OK in 0.370 seconds
[0m18:18:08.569176 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:18:08.569176 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m18:18:08.570177 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.571174 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m18:18:08.571174 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:18:08.571174 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m18:18:08.666074 [debug] [Thread-1 (]: SQL status: OK in 0.094 seconds
[0m18:18:08.668075 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m18:18:08.668075 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m18:18:08.669074 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.670075 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m18:18:08.670075 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166808B8110>]}
[0m18:18:08.670075 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.49s]
[0m18:18:08.671080 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m18:18:08.671080 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m18:18:08.672074 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m18:18:08.672074 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m18:18:08.673076 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m18:18:08.676075 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m18:18:08.677077 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m18:18:08.680075 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m18:18:08.681078 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m18:18:08.682078 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m18:18:08.682078 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:08.683075 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:08.683075 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m18:18:08.683075 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m18:18:08.838416 [debug] [Thread-1 (]: SQL status: OK in 0.154 seconds
[0m18:18:08.840438 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m18:18:08.840438 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m18:18:08.841437 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.842438 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m18:18:08.842438 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m18:18:08.842438 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m18:18:08.848421 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m18:18:08.850438 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m18:18:08.850438 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m18:18:08.850438 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.851421 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m18:18:08.852437 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166808A2810>]}
[0m18:18:08.852437 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.18s]
[0m18:18:08.853422 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m18:18:08.853422 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m18:18:08.854422 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m18:18:08.854422 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m18:18:08.855447 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m18:18:08.857420 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m18:18:08.858420 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m18:18:08.860421 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m18:18:08.861424 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m18:18:08.861424 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m18:18:08.862424 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:08.862424 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.862424 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m18:18:08.863424 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m18:18:08.913437 [debug] [Thread-1 (]: SQL status: OK in 0.050 seconds
[0m18:18:08.917439 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m18:18:08.917439 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m18:18:08.918422 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.918422 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m18:18:08.919437 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m18:18:08.919437 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m18:18:08.934421 [debug] [Thread-1 (]: SQL status: OK in 0.015 seconds
[0m18:18:08.936437 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m18:18:08.937437 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m18:18:08.937437 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.938438 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m18:18:08.938438 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166808DE9C0>]}
[0m18:18:08.939439 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.08s]
[0m18:18:08.939439 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m18:18:08.940424 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m18:18:08.940424 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m18:18:08.941423 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m18:18:08.941423 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m18:18:08.944437 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m18:18:08.945437 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m18:18:08.948438 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m18:18:08.948438 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m18:18:08.949422 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m18:18:08.949422 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:08.949422 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:08.950421 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m18:18:08.950421 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m18:18:08.998555 [debug] [Thread-1 (]: SQL status: OK in 0.048 seconds
[0m18:18:09.002536 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m18:18:09.003651 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m18:18:09.004558 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:09.006559 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m18:18:09.006559 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m18:18:09.007549 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m18:18:09.122423 [debug] [Thread-1 (]: SQL status: OK in 0.114 seconds
[0m18:18:09.124426 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m18:18:09.124426 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m18:18:09.125424 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:09.126424 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m18:18:09.126424 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166808A7830>]}
[0m18:18:09.127423 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.19s]
[0m18:18:09.128422 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m18:18:09.128422 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m18:18:09.128422 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m18:18:09.129422 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m18:18:09.129422 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m18:18:09.133445 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:18:09.134422 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m18:18:09.137420 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:18:09.138420 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:18:09.138420 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m18:18:09.138420 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:09.139420 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:09.139420 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:18:09.140420 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."prudential_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN "silver"."main"."financial_conglomerates_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN "silver"."main"."individual_institutions_summary" r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m18:18:09.506242 [debug] [Thread-1 (]: SQL status: OK in 0.365 seconds
[0m18:18:09.508258 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:18:09.508258 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m18:18:09.509266 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:09.510259 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m18:18:09.510259 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:18:09.511260 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m18:18:09.585260 [debug] [Thread-1 (]: SQL status: OK in 0.073 seconds
[0m18:18:09.587260 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m18:18:09.587260 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m18:18:09.587260 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:09.588242 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m18:18:09.589243 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166808F3B00>]}
[0m18:18:09.589243 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.46s]
[0m18:18:09.590258 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m18:18:09.590258 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m18:18:09.591259 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m18:18:09.591259 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m18:18:09.591259 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m18:18:09.594258 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m18:18:09.595244 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m18:18:09.597241 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m18:18:09.598241 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m18:18:09.598241 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m18:18:09.598241 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:09.599241 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:09.599241 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m18:18:09.599241 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m18:18:09.604244 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m18:18:09.607243 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m18:18:09.607243 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m18:18:09.607243 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:09.608242 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m18:18:09.608242 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m18:18:09.609241 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m18:18:09.613241 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m18:18:09.615246 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m18:18:09.615246 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m18:18:09.616247 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:09.617352 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m18:18:09.617352 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001668086E8D0>]}
[0m18:18:09.618352 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.03s]
[0m18:18:09.618352 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m18:18:09.619244 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m18:18:09.619244 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m18:18:09.620365 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m18:18:09.620365 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m18:18:09.623357 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m18:18:09.624259 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m18:18:09.626243 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m18:18:09.627241 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m18:18:09.627241 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m18:18:09.627241 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:09.627241 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:09.628242 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m18:18:09.628242 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m18:18:09.653257 [debug] [Thread-1 (]: SQL status: OK in 0.025 seconds
[0m18:18:09.655258 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m18:18:09.656265 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m18:18:09.656265 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:09.657258 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m18:18:09.657258 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m18:18:09.658258 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m18:18:09.664262 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m18:18:09.668243 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m18:18:09.668243 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m18:18:09.669258 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:09.671258 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m18:18:09.672260 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001668E6ADA90>]}
[0m18:18:09.672260 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.05s]
[0m18:18:09.673260 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m18:18:09.674243 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m18:18:09.674243 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m18:18:09.675259 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m18:18:09.675259 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m18:18:09.678258 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:18:09.679258 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m18:18:09.681242 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:18:09.682258 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:18:09.683248 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m18:18:09.683248 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:09.684249 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:09.685242 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:18:09.685242 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m18:18:09.950290 [debug] [Thread-1 (]: SQL status: OK in 0.265 seconds
[0m18:18:09.952290 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:18:09.953292 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m18:18:09.954274 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:09.954274 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m18:18:09.955290 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:18:09.955290 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m18:18:10.089275 [debug] [Thread-1 (]: SQL status: OK in 0.134 seconds
[0m18:18:10.091386 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m18:18:10.092394 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m18:18:10.092394 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.093378 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m18:18:10.094275 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166808CCE90>]}
[0m18:18:10.094275 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.42s]
[0m18:18:10.095275 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m18:18:10.095275 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m18:18:10.096275 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m18:18:10.096275 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m18:18:10.096275 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m18:18:10.097275 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m18:18:10.112373 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m18:18:10.112373 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m18:18:10.113376 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.113376 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.113376 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m18:18:10.114376 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m18:18:10.114376 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.122276 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m18:18:10.122276 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:18:10.126326 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m18:18:10.130375 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m18:18:10.133379 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m18:18:10.133379 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m18:18:10.134320 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m18:18:10.135317 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.135317 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m18:18:10.136376 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FFFFA990>]}
[0m18:18:10.136376 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.04s]
[0m18:18:10.137276 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m18:18:10.137276 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m18:18:10.138275 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m18:18:10.138275 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m18:18:10.139275 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m18:18:10.139275 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m18:18:10.142378 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m18:18:10.142378 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m18:18:10.142378 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.143326 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.143326 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m18:18:10.143326 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m18:18:10.143326 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.144275 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m18:18:10.145273 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:18:10.146272 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.147273 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m18:18:10.148275 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m18:18:10.148275 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m18:18:10.149275 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m18:18:10.150385 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.150385 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m18:18:10.151385 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166808308F0>]}
[0m18:18:10.151385 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.01s]
[0m18:18:10.152275 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m18:18:10.152275 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m18:18:10.153276 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m18:18:10.153276 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m18:18:10.154275 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m18:18:10.154275 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m18:18:10.157272 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m18:18:10.157272 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m18:18:10.157272 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.158272 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.158272 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m18:18:10.158272 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m18:18:10.159275 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.159275 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m18:18:10.159275 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:18:10.161381 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.163277 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m18:18:10.164390 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m18:18:10.165384 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m18:18:10.165384 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m18:18:10.166276 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.166276 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m18:18:10.167380 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166808ACD70>]}
[0m18:18:10.167380 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.01s]
[0m18:18:10.168310 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m18:18:10.168310 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m18:18:10.169275 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m18:18:10.169275 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m18:18:10.169275 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m18:18:10.170325 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m18:18:10.173276 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m18:18:10.173276 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m18:18:10.173276 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.174276 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.174276 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m18:18:10.174276 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m18:18:10.175294 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.176291 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m18:18:10.176291 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:18:10.178363 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.178363 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m18:18:10.180366 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m18:18:10.180366 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m18:18:10.180366 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m18:18:10.181366 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.182365 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m18:18:10.183390 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016680409D60>]}
[0m18:18:10.183390 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.01s]
[0m18:18:10.184364 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m18:18:10.184364 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m18:18:10.185367 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m18:18:10.185367 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m18:18:10.186383 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m18:18:10.186383 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m18:18:10.189363 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m18:18:10.189363 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m18:18:10.190378 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.190378 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.190378 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m18:18:10.190378 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m18:18:10.191379 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.192380 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m18:18:10.192380 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:18:10.194362 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.194362 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m18:18:10.196362 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m18:18:10.196362 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m18:18:10.196362 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m18:18:10.197362 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.197362 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m18:18:10.198365 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166807B63F0>]}
[0m18:18:10.198365 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.01s]
[0m18:18:10.199366 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m18:18:10.200365 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m18:18:10.200365 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m18:18:10.201364 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m18:18:10.201364 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m18:18:10.201364 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m18:18:10.204472 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m18:18:10.205467 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m18:18:10.205467 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.205467 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.206413 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m18:18:10.206413 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m18:18:10.206413 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.207403 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m18:18:10.207403 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:18:10.209366 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:18:10.210364 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m18:18:10.211365 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m18:18:10.212364 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m18:18:10.212364 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m18:18:10.213363 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.214366 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m18:18:10.214366 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001668079C650>]}
[0m18:18:10.215366 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.01s]
[0m18:18:10.216367 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m18:18:10.217408 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m18:18:10.217408 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m18:18:10.218428 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m18:18:10.218428 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m18:18:10.219364 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m18:18:10.223363 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m18:18:10.223363 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m18:18:10.223363 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.224367 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.224367 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m18:18:10.225366 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m18:18:10.225366 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.226364 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m18:18:10.227369 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:18:10.230364 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:18:10.230364 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m18:18:10.232363 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m18:18:10.233362 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m18:18:10.233362 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m18:18:10.234362 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.235362 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m18:18:10.236362 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166807C3200>]}
[0m18:18:10.237362 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.02s]
[0m18:18:10.237362 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m18:18:10.238362 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m18:18:10.238362 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m18:18:10.239362 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m18:18:10.239362 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m18:18:10.239362 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m18:18:10.243366 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m18:18:10.243366 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m18:18:10.244476 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.244476 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.244476 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m18:18:10.245474 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m18:18:10.245474 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.246480 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m18:18:10.246480 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:18:10.248408 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.248408 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m18:18:10.251370 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m18:18:10.251370 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m18:18:10.252411 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m18:18:10.253370 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.254475 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m18:18:10.254475 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016680873710>]}
[0m18:18:10.255369 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.02s]
[0m18:18:10.255369 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m18:18:10.256369 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m18:18:10.256369 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m18:18:10.257369 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m18:18:10.257369 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m18:18:10.257369 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m18:18:10.260370 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m18:18:10.260370 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m18:18:10.260370 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.261490 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.261490 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m18:18:10.261490 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m18:18:10.262483 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.263434 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m18:18:10.263434 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:18:10.264963 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:18:10.266070 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m18:18:10.267970 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m18:18:10.267970 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m18:18:10.268970 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m18:18:10.269968 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.269968 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m18:18:10.270970 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001668E6EBFE0>]}
[0m18:18:10.270970 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.01s]
[0m18:18:10.272482 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m18:18:10.272482 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m18:18:10.273038 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m18:18:10.273038 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m18:18:10.274107 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m18:18:10.274107 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m18:18:10.278091 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m18:18:10.278091 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m18:18:10.279044 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.279044 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.280047 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m18:18:10.280047 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m18:18:10.281045 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.281045 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m18:18:10.282151 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m18:18:10.283145 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.283145 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m18:18:10.285172 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m18:18:10.286145 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m18:18:10.286145 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m18:18:10.287176 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.288171 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m18:18:10.288171 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001668E6AC560>]}
[0m18:18:10.289150 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.02s]
[0m18:18:10.289150 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m18:18:10.289150 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m18:18:10.290142 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m18:18:10.290142 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m18:18:10.291093 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m18:18:10.300140 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m18:18:10.308045 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m18:18:10.321164 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m18:18:10.324165 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m18:18:10.324165 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m18:18:10.324165 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.325153 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.325153 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m18:18:10.325153 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.326150 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.330166 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m18:18:10.332163 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m18:18:10.332163 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m18:18:10.333167 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.04s]
[0m18:18:10.333167 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m18:18:10.334081 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m18:18:10.334081 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m18:18:10.335052 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m18:18:10.335052 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m18:18:10.338150 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m18:18:10.339155 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m18:18:10.341159 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m18:18:10.342163 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m18:18:10.342163 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m18:18:10.342163 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.343166 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.343166 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m18:18:10.343166 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.344153 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.345149 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m18:18:10.345149 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m18:18:10.346158 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m18:18:10.346158 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.01s]
[0m18:18:10.347117 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m18:18:10.347117 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m18:18:10.348087 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m18:18:10.348087 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m18:18:10.348087 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m18:18:10.353167 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m18:18:10.354158 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m18:18:10.356152 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m18:18:10.357143 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m18:18:10.357143 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m18:18:10.357143 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.358150 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.358150 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m18:18:10.358150 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m18:18:10.361045 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:18:10.362087 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m18:18:10.363143 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m18:18:10.363143 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m18:18:10.364143 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.02s]
[0m18:18:10.364143 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m18:18:10.365045 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m18:18:10.365045 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m18:18:10.366045 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m18:18:10.366045 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m18:18:10.369042 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m18:18:10.370042 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m18:18:10.372042 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m18:18:10.374046 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m18:18:10.374046 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m18:18:10.375167 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.375167 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.375167 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m18:18:10.376157 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.376157 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.378043 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m18:18:10.378043 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m18:18:10.378043 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m18:18:10.379042 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.01s]
[0m18:18:10.380042 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m18:18:10.380042 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m18:18:10.380042 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m18:18:10.381045 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m18:18:10.381045 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m18:18:10.388247 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m18:18:10.389261 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m18:18:10.390255 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m18:18:10.392153 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m18:18:10.392153 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m18:18:10.392153 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.392153 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.393152 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m18:18:10.393152 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.395194 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:18:10.396254 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m18:18:10.397260 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m18:18:10.397260 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m18:18:10.398158 [info ] [Thread-1 (]: 26 of 97 PASS relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[32mPASS[0m in 0.02s]
[0m18:18:10.399173 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m18:18:10.399173 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m18:18:10.399173 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m18:18:10.400299 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m18:18:10.400299 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m18:18:10.403176 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m18:18:10.404177 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m18:18:10.406177 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m18:18:10.407177 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m18:18:10.407177 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m18:18:10.407177 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.408180 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.408180 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m18:18:10.408180 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m18:18:10.410180 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.411180 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m18:18:10.412290 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m18:18:10.412290 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m18:18:10.413179 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.01s]
[0m18:18:10.414179 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m18:18:10.414179 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m18:18:10.414179 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m18:18:10.415178 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m18:18:10.416286 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m18:18:10.420281 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m18:18:10.422298 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m18:18:10.425179 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m18:18:10.426234 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m18:18:10.426234 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m18:18:10.426234 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.427280 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.427280 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m18:18:10.427280 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.428283 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.429277 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m18:18:10.430181 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m18:18:10.430181 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m18:18:10.430181 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.02s]
[0m18:18:10.431264 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m18:18:10.431264 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m18:18:10.432228 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m18:18:10.432228 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m18:18:10.432228 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m18:18:10.435282 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m18:18:10.436287 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m18:18:10.438283 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m18:18:10.439281 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m18:18:10.439281 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m18:18:10.439281 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.440230 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.440230 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m18:18:10.440230 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m18:18:10.442179 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:18:10.443179 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m18:18:10.444287 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m18:18:10.444287 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m18:18:10.445283 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.01s]
[0m18:18:10.446236 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m18:18:10.446236 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m18:18:10.446236 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m18:18:10.447220 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m18:18:10.447220 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m18:18:10.450286 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m18:18:10.451283 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m18:18:10.454280 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m18:18:10.455276 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m18:18:10.455276 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m18:18:10.455276 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.456285 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.456285 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m18:18:10.456285 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.458221 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.459284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m18:18:10.461287 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m18:18:10.461287 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m18:18:10.462180 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.01s]
[0m18:18:10.463179 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m18:18:10.463179 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m18:18:10.463179 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m18:18:10.464179 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m18:18:10.464179 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m18:18:10.467276 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m18:18:10.468296 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m18:18:10.469282 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m18:18:10.470277 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m18:18:10.470277 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m18:18:10.471277 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.471277 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.471277 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m18:18:10.471277 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.472278 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.474284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m18:18:10.475281 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m18:18:10.476286 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m18:18:10.477280 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.01s]
[0m18:18:10.478182 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m18:18:10.479180 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m18:18:10.479180 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m18:18:10.480180 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m18:18:10.480180 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m18:18:10.484282 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m18:18:10.485321 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m18:18:10.487290 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m18:18:10.488285 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m18:18:10.488285 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m18:18:10.489278 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.489278 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.489278 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m18:18:10.490286 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.493304 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m18:18:10.495222 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m18:18:10.496179 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m18:18:10.496179 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m18:18:10.496179 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m18:18:10.497275 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m18:18:10.497275 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m18:18:10.498180 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m18:18:10.498180 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m18:18:10.499194 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m18:18:10.502285 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m18:18:10.504179 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m18:18:10.505283 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m18:18:10.506284 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m18:18:10.506284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m18:18:10.506284 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.507284 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.507284 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m18:18:10.507284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.514221 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m18:18:10.515282 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m18:18:10.516281 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m18:18:10.516281 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m18:18:10.516281 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m18:18:10.517290 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m18:18:10.518226 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m18:18:10.518226 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m18:18:10.518226 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m18:18:10.519235 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m18:18:10.521282 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m18:18:10.523180 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m18:18:10.525284 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m18:18:10.526289 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m18:18:10.526289 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m18:18:10.527285 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.527285 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.527285 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m18:18:10.528298 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.528298 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.529222 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m18:18:10.530288 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m18:18:10.531297 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m18:18:10.532288 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.01s]
[0m18:18:10.533273 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m18:18:10.533273 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m18:18:10.533273 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m18:18:10.534281 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m18:18:10.534281 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m18:18:10.539181 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m18:18:10.541187 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m18:18:10.542198 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m18:18:10.544194 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m18:18:10.544194 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m18:18:10.544194 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.545194 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.545194 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m18:18:10.545194 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.546195 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.547197 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m18:18:10.548194 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m18:18:10.548194 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m18:18:10.548194 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.01s]
[0m18:18:10.549194 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m18:18:10.549194 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m18:18:10.550194 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m18:18:10.550194 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m18:18:10.550194 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m18:18:10.556177 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m18:18:10.557197 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m18:18:10.560194 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m18:18:10.561195 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m18:18:10.562194 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m18:18:10.562194 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.563178 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.563178 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m18:18:10.563178 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.566181 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:18:10.567181 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m18:18:10.568222 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m18:18:10.568222 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m18:18:10.569197 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m18:18:10.569197 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m18:18:10.570286 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m18:18:10.570286 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m18:18:10.571210 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m18:18:10.571210 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m18:18:10.575285 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m18:18:10.576276 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m18:18:10.579228 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m18:18:10.580227 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m18:18:10.581182 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m18:18:10.581182 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.581182 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.582180 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m18:18:10.582180 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.586194 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m18:18:10.588208 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m18:18:10.589178 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m18:18:10.589178 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m18:18:10.590178 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m18:18:10.590178 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m18:18:10.590178 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m18:18:10.591181 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m18:18:10.591181 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m18:18:10.592181 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m18:18:10.596297 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m18:18:10.598296 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m18:18:10.600282 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m18:18:10.602235 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m18:18:10.603281 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m18:18:10.603281 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.604180 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.604180 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m18:18:10.604180 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.605286 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.606282 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m18:18:10.607180 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m18:18:10.607180 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m18:18:10.607180 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.02s]
[0m18:18:10.608178 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m18:18:10.608178 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m18:18:10.609177 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m18:18:10.609177 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m18:18:10.610177 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m18:18:10.613176 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m18:18:10.615181 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m18:18:10.618290 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m18:18:10.619287 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m18:18:10.620180 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m18:18:10.620180 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.621178 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.621178 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m18:18:10.621178 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.622177 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.623177 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m18:18:10.623177 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m18:18:10.624177 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m18:18:10.624177 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.01s]
[0m18:18:10.625177 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m18:18:10.625177 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m18:18:10.625177 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m18:18:10.626179 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m18:18:10.626179 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m18:18:10.630274 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m18:18:10.631180 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m18:18:10.633277 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m18:18:10.634276 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m18:18:10.634276 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m18:18:10.634276 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.635296 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.635296 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m18:18:10.635296 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.637177 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:18:10.638301 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m18:18:10.640180 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m18:18:10.640180 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m18:18:10.641255 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.01s]
[0m18:18:10.641255 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m18:18:10.642220 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m18:18:10.642220 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m18:18:10.643179 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m18:18:10.643179 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m18:18:10.646282 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m18:18:10.648285 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m18:18:10.650232 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m18:18:10.652298 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m18:18:10.652298 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m18:18:10.652298 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.653180 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.653180 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m18:18:10.654179 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.657178 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m18:18:10.658277 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m18:18:10.659276 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m18:18:10.659276 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m18:18:10.660223 [info ] [Thread-1 (]: 41 of 97 PASS relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m18:18:10.660223 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m18:18:10.661262 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m18:18:10.662182 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m18:18:10.662182 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m18:18:10.663281 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m18:18:10.666297 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m18:18:10.667193 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m18:18:10.668181 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m18:18:10.669177 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m18:18:10.670176 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m18:18:10.670176 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.670176 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.670176 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m18:18:10.671177 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.671177 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.672220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m18:18:10.673295 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m18:18:10.673295 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m18:18:10.674239 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.01s]
[0m18:18:10.675181 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m18:18:10.675181 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m18:18:10.676215 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m18:18:10.676215 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m18:18:10.677220 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m18:18:10.679281 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m18:18:10.681207 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m18:18:10.682222 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m18:18:10.684181 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m18:18:10.684181 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m18:18:10.685183 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.685183 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.686185 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m18:18:10.686185 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.687280 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.688283 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m18:18:10.689283 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m18:18:10.689283 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m18:18:10.689283 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.01s]
[0m18:18:10.690287 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m18:18:10.690287 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m18:18:10.691277 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m18:18:10.691277 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m18:18:10.691277 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m18:18:10.696180 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m18:18:10.697282 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m18:18:10.699284 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m18:18:10.701305 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m18:18:10.701305 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m18:18:10.701305 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.702284 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.702284 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m18:18:10.702284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.705298 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m18:18:10.707298 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m18:18:10.709285 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m18:18:10.709285 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m18:18:10.710309 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m18:18:10.711308 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m18:18:10.711308 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m18:18:10.712286 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m18:18:10.712286 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m18:18:10.713233 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m18:18:10.717278 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m18:18:10.718290 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m18:18:10.720180 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m18:18:10.721283 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m18:18:10.721283 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m18:18:10.722181 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.722181 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.723293 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m18:18:10.723293 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.726289 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:18:10.727285 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m18:18:10.728284 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m18:18:10.728284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m18:18:10.728284 [info ] [Thread-1 (]: 45 of 97 PASS relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m18:18:10.729283 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m18:18:10.729283 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m18:18:10.730288 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m18:18:10.730288 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m18:18:10.730288 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m18:18:10.733193 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m18:18:10.735179 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m18:18:10.736180 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m18:18:10.738206 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m18:18:10.738206 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m18:18:10.738206 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.739180 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.739180 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m18:18:10.739180 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.740275 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.741282 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m18:18:10.741282 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m18:18:10.742287 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m18:18:10.742287 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.01s]
[0m18:18:10.743179 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m18:18:10.743179 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m18:18:10.743179 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m18:18:10.744178 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m18:18:10.744178 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m18:18:10.748286 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m18:18:10.749279 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m18:18:10.750282 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m18:18:10.751280 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m18:18:10.751280 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m18:18:10.751280 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.752298 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.752298 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m18:18:10.752298 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.753284 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.754292 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m18:18:10.755180 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m18:18:10.755180 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m18:18:10.756178 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.01s]
[0m18:18:10.757180 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m18:18:10.757180 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m18:18:10.757180 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m18:18:10.758180 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m18:18:10.759180 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m18:18:10.762285 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m18:18:10.763291 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m18:18:10.765180 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m18:18:10.766283 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m18:18:10.766283 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m18:18:10.766283 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.767301 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.767301 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m18:18:10.767301 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.771180 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m18:18:10.773283 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m18:18:10.774287 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m18:18:10.774287 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m18:18:10.775303 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m18:18:10.776179 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m18:18:10.776179 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m18:18:10.777180 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m18:18:10.777180 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m18:18:10.778179 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m18:18:10.784182 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m18:18:10.786179 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m18:18:10.787208 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m18:18:10.788195 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m18:18:10.789180 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m18:18:10.789180 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.789180 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.790178 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m18:18:10.790178 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.798275 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m18:18:10.799277 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m18:18:10.800297 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m18:18:10.800297 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m18:18:10.800297 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m18:18:10.801286 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m18:18:10.801286 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m18:18:10.802289 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m18:18:10.802289 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m18:18:10.802289 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m18:18:10.807278 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m18:18:10.808290 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m18:18:10.811316 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m18:18:10.813252 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m18:18:10.814301 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m18:18:10.814301 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.815434 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.815434 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m18:18:10.816433 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.817307 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.819368 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m18:18:10.820356 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m18:18:10.820356 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m18:18:10.820356 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.02s]
[0m18:18:10.821418 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m18:18:10.821418 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m18:18:10.821418 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m18:18:10.822416 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m18:18:10.823446 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m18:18:10.826306 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m18:18:10.827409 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m18:18:10.828406 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m18:18:10.830011 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m18:18:10.831018 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m18:18:10.831018 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.832172 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.833143 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m18:18:10.833143 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.835130 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.836142 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m18:18:10.838131 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m18:18:10.838131 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m18:18:10.839133 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m18:18:10.839907 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m18:18:10.839907 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m18:18:10.840919 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m18:18:10.840919 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m18:18:10.840919 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m18:18:10.846020 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m18:18:10.847013 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m18:18:10.848025 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m18:18:10.850031 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m18:18:10.850031 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m18:18:10.850031 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.851019 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.851019 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m18:18:10.851019 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.852912 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.852912 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m18:18:10.854915 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m18:18:10.854915 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m18:18:10.854915 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.01s]
[0m18:18:10.855915 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m18:18:10.857036 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m18:18:10.857036 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m18:18:10.857965 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m18:18:10.857965 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m18:18:10.862942 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m18:18:10.864927 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m18:18:10.867916 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m18:18:10.868941 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m18:18:10.869953 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m18:18:10.869953 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.869953 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.870951 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m18:18:10.870951 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.872927 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.873885 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m18:18:10.874907 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m18:18:10.874907 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m18:18:10.874907 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m18:18:10.875890 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m18:18:10.875890 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m18:18:10.876888 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m18:18:10.876888 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m18:18:10.876888 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m18:18:10.880891 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m18:18:10.882988 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m18:18:10.885001 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m18:18:10.885911 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m18:18:10.885911 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m18:18:10.885911 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.886890 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.886890 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m18:18:10.886890 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.887992 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.888997 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m18:18:10.889891 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m18:18:10.889891 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m18:18:10.889891 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.01s]
[0m18:18:10.891017 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m18:18:10.891911 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m18:18:10.891911 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m18:18:10.892989 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m18:18:10.892989 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m18:18:10.895993 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m18:18:10.895993 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m18:18:10.898031 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m18:18:10.898998 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m18:18:10.899938 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m18:18:10.899938 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.899938 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.900938 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m18:18:10.900938 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.900938 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.902898 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m18:18:10.903891 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m18:18:10.905006 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m18:18:10.905006 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.01s]
[0m18:18:10.905991 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m18:18:10.905991 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m18:18:10.906899 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m18:18:10.906899 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m18:18:10.906899 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m18:18:10.910996 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m18:18:10.911996 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m18:18:10.912944 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m18:18:10.913999 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m18:18:10.913999 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m18:18:10.913999 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.914992 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.914992 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m18:18:10.914992 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.917890 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:18:10.918992 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m18:18:10.919892 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m18:18:10.919892 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m18:18:10.919892 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.01s]
[0m18:18:10.921003 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m18:18:10.921003 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m18:18:10.922002 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m18:18:10.922002 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m18:18:10.922892 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m18:18:10.925995 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m18:18:10.926934 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m18:18:10.928891 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m18:18:10.929996 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m18:18:10.930994 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m18:18:10.930994 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.930994 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.931890 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m18:18:10.931890 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.934891 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m18:18:10.935891 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m18:18:10.937003 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m18:18:10.937003 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m18:18:10.938971 [info ] [Thread-1 (]: 57 of 97 PASS relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m18:18:10.939891 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m18:18:10.939891 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m18:18:10.940890 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m18:18:10.940890 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m18:18:10.940890 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m18:18:10.945006 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m18:18:10.945995 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m18:18:10.947992 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m18:18:10.948991 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m18:18:10.948991 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m18:18:10.949994 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.949994 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.949994 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m18:18:10.951013 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.951891 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.952894 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m18:18:10.953995 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m18:18:10.953995 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m18:18:10.954965 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.01s]
[0m18:18:10.954965 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m18:18:10.956004 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m18:18:10.956934 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m18:18:10.956934 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m18:18:10.956934 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m18:18:10.960988 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m18:18:10.961999 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m18:18:10.962936 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m18:18:10.964937 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m18:18:10.964937 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m18:18:10.965931 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.965931 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.966891 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m18:18:10.966891 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.967890 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:10.967890 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m18:18:10.969004 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m18:18:10.969004 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m18:18:10.969998 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.01s]
[0m18:18:10.970891 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m18:18:10.970891 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m18:18:10.970891 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m18:18:10.972004 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m18:18:10.972004 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m18:18:10.975891 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m18:18:10.976997 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m18:18:10.980999 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m18:18:10.981997 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m18:18:10.981997 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m18:18:10.981997 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:10.982891 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:10.982891 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m18:18:10.982891 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:10.985890 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m18:18:10.987013 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m18:18:10.987996 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m18:18:10.987996 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m18:18:10.988939 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m18:18:10.988939 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m18:18:10.989891 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m18:18:10.989891 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m18:18:10.990991 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m18:18:10.990991 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m18:18:10.993987 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m18:18:10.995891 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m18:18:10.996995 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m18:18:10.999891 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m18:18:10.999891 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m18:18:10.999891 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:11.001006 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:11.001006 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m18:18:11.002015 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:11.006888 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m18:18:11.007988 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m18:18:11.008987 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m18:18:11.008987 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m18:18:11.008987 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m18:18:11.009990 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m18:18:11.010892 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m18:18:11.010892 [info ] [Thread-1 (]: 62 of 97 START sql table model main.dim_atividade .............................. [RUN]
[0m18:18:11.011891 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m18:18:11.011891 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m18:18:11.015001 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m18:18:11.015891 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m18:18:11.018889 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m18:18:11.019889 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:18:11.020889 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m18:18:11.020889 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:11.020889 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:11.021888 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:18:11.021888 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m18:18:11.022889 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:11.024891 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:18:11.024891 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m18:18:11.025999 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:11.027002 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m18:18:11.027002 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:18:11.027002 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m18:18:11.028999 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:11.030948 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m18:18:11.030948 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m18:18:11.031992 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:11.032989 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m18:18:11.032989 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001668E777C50>]}
[0m18:18:11.033891 [info ] [Thread-1 (]: 62 of 97 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.02s]
[0m18:18:11.033891 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m18:18:11.033891 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m18:18:11.034937 [info ] [Thread-1 (]: 63 of 97 START sql table model main.dim_classe_instituicao ..................... [RUN]
[0m18:18:11.034937 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m18:18:11.035931 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m18:18:11.037991 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m18:18:11.039896 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m18:18:11.042992 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m18:18:11.044984 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m18:18:11.044984 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m18:18:11.044984 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:11.046018 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:11.046018 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m18:18:11.046018 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m18:18:11.047007 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:11.048988 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m18:18:11.049891 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m18:18:11.049891 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:11.051000 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m18:18:11.051000 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m18:18:11.051996 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m18:18:11.052891 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:11.053888 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m18:18:11.054891 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m18:18:11.054891 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:11.056975 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m18:18:11.056975 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166808CBEF0>]}
[0m18:18:11.058010 [info ] [Thread-1 (]: 63 of 97 OK created sql table model main.dim_classe_instituicao ................ [[32mOK[0m in 0.02s]
[0m18:18:11.059008 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m18:18:11.059008 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m18:18:11.060018 [info ] [Thread-1 (]: 64 of 97 START sql table model main.dim_consolidado ............................ [RUN]
[0m18:18:11.060018 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m18:18:11.060018 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m18:18:11.061892 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m18:18:11.063889 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m18:18:11.065890 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m18:18:11.066893 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m18:18:11.066893 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m18:18:11.067893 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:11.067893 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:11.067893 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m18:18:11.068939 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m18:18:11.068939 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:11.071996 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m18:18:11.073003 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m18:18:11.073003 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:11.073892 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m18:18:11.073892 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m18:18:11.074889 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m18:18:11.075888 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:11.078892 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m18:18:11.078892 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m18:18:11.079892 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:11.081007 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m18:18:11.081007 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166966A6390>]}
[0m18:18:12.095978 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m18:18:12.099978 [info ] [Thread-1 (]: 64 of 97 OK created sql table model main.dim_consolidado ....................... [[32mOK[0m in 0.02s]
[0m18:18:12.101970 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m18:18:12.101970 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m18:18:12.103968 [info ] [Thread-1 (]: 65 of 97 START sql table model main.dim_controle ............................... [RUN]
[0m18:18:12.104966 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m18:18:12.105969 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m18:18:12.111002 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m18:18:12.113967 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m18:18:12.117961 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m18:18:12.118962 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m18:18:12.119962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m18:18:12.119962 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.120969 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.120969 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m18:18:12.121966 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m18:18:12.122964 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.125061 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m18:18:12.125061 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m18:18:12.126060 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.127060 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m18:18:12.127060 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m18:18:12.127060 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m18:18:12.127963 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.129962 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m18:18:12.129962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m18:18:12.131062 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.131965 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m18:18:12.133064 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FFDDA960>]}
[0m18:18:12.133064 [info ] [Thread-1 (]: 65 of 97 OK created sql table model main.dim_controle .......................... [[32mOK[0m in 0.03s]
[0m18:18:12.133964 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m18:18:12.133964 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m18:18:12.133964 [info ] [Thread-1 (]: 66 of 97 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m18:18:12.135065 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m18:18:12.135065 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m18:18:12.137006 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:18:12.138074 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m18:18:12.140969 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:18:12.142074 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:18:12.142074 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m18:18:12.142074 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.142964 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.142964 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:18:12.142964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m18:18:12.143964 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.147036 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:18:12.147036 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m18:18:12.148079 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.149083 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m18:18:12.149083 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:18:12.149083 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m18:18:12.151085 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.154074 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m18:18:12.155061 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m18:18:12.155061 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.156007 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m18:18:12.156965 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166966D53A0>]}
[0m18:18:12.156965 [info ] [Thread-1 (]: 66 of 97 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.02s]
[0m18:18:12.158005 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m18:18:12.158005 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m18:18:12.158964 [info ] [Thread-1 (]: 67 of 97 START sql table model main.dim_porte .................................. [RUN]
[0m18:18:12.158964 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m18:18:12.159963 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m18:18:12.162070 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m18:18:12.163013 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m18:18:12.166960 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m18:18:12.167961 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:18:12.168961 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m18:18:12.168961 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.168961 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.168961 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:18:12.169963 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m18:18:12.171963 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.176082 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:18:12.176082 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m18:18:12.176963 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.178961 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m18:18:12.178961 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:18:12.178961 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m18:18:12.181005 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.182964 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m18:18:12.182964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m18:18:12.183964 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.184964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m18:18:12.184964 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001668070C350>]}
[0m18:18:12.184964 [info ] [Thread-1 (]: 67 of 97 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.03s]
[0m18:18:12.185964 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m18:18:12.185964 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m18:18:12.186963 [info ] [Thread-1 (]: 68 of 97 START sql table model main.dim_produto_credito ........................ [RUN]
[0m18:18:12.186963 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m18:18:12.187963 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m18:18:12.189962 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:18:12.190963 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m18:18:12.194970 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:18:12.197093 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:18:12.197093 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m18:18:12.198074 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.198074 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.198074 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:18:12.198074 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m18:18:12.199963 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.203060 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:18:12.203060 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m18:18:12.204060 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.206066 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m18:18:12.206966 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:18:12.206966 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m18:18:12.209104 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.210964 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m18:18:12.210964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m18:18:12.210964 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.213076 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m18:18:12.213963 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166966EFF50>]}
[0m18:18:12.213963 [info ] [Thread-1 (]: 68 of 97 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.03s]
[0m18:18:12.214963 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m18:18:12.214963 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m18:18:12.214963 [info ] [Thread-1 (]: 69 of 97 START sql table model main.dim_regiao ................................. [RUN]
[0m18:18:12.216060 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m18:18:12.216060 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m18:18:12.219013 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m18:18:12.220072 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m18:18:12.222074 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m18:18:12.224070 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:18:12.224070 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m18:18:12.224070 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.225005 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.225005 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:18:12.225005 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m18:18:12.226079 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.229078 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:18:12.229078 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m18:18:12.229078 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.229963 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m18:18:12.230969 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:18:12.230969 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m18:18:12.232081 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.235060 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m18:18:12.236061 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m18:18:12.236963 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.237969 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m18:18:12.237969 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016696704770>]}
[0m18:18:12.238965 [info ] [Thread-1 (]: 69 of 97 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.02s]
[0m18:18:12.238965 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m18:18:12.240031 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m18:18:12.240031 [info ] [Thread-1 (]: 70 of 97 START sql table model main.dim_risco .................................. [RUN]
[0m18:18:12.240963 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m18:18:12.242035 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m18:18:12.245072 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m18:18:12.246006 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m18:18:12.250070 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m18:18:12.252118 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:18:12.253076 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m18:18:12.253076 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.253076 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.254075 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:18:12.254075 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m18:18:12.255099 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.258078 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:18:12.258078 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m18:18:12.259073 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.260076 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m18:18:12.260076 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:18:12.260076 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m18:18:12.262157 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.265193 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m18:18:12.265812 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m18:18:12.265812 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.266914 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m18:18:12.267819 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001668E729CD0>]}
[0m18:18:12.267819 [info ] [Thread-1 (]: 70 of 97 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.03s]
[0m18:18:12.268818 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m18:18:12.269818 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m18:18:12.269818 [info ] [Thread-1 (]: 71 of 97 START sql table model main.dim_segmento ............................... [RUN]
[0m18:18:12.270817 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m18:18:12.270817 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m18:18:12.272835 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m18:18:12.273834 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m18:18:12.276926 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m18:18:12.277863 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m18:18:12.277863 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m18:18:12.278850 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.278850 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.278850 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m18:18:12.279820 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m18:18:12.280818 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.282787 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m18:18:12.282787 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m18:18:12.282787 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.283804 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m18:18:12.284807 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m18:18:12.284807 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m18:18:12.285802 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.287801 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m18:18:12.287801 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m18:18:12.288799 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.289802 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m18:18:12.289802 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016696673920>]}
[0m18:18:12.289802 [info ] [Thread-1 (]: 71 of 97 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.02s]
[0m18:18:12.290804 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m18:18:12.291804 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m18:18:12.291804 [info ] [Thread-1 (]: 72 of 97 START test not_null_dim_classe_instituicao_id_classe .................. [RUN]
[0m18:18:12.292807 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m18:18:12.292807 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m18:18:12.295803 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m18:18:12.296802 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m18:18:12.298801 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m18:18:12.299802 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m18:18:12.299802 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m18:18:12.299802 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.300801 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.300801 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m18:18:12.301800 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m18:18:12.303802 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.306914 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m18:18:12.307915 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m18:18:12.307915 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m18:18:12.308924 [info ] [Thread-1 (]: 72 of 97 PASS not_null_dim_classe_instituicao_id_classe ........................ [[32mPASS[0m in 0.02s]
[0m18:18:12.309802 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m18:18:12.310801 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m18:18:12.310801 [info ] [Thread-1 (]: 73 of 97 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m18:18:12.310801 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m18:18:12.311799 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m18:18:12.315801 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m18:18:12.316810 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m18:18:12.318802 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m18:18:12.319801 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m18:18:12.319801 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m18:18:12.319801 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.320802 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.320802 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m18:18:12.320802 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:12.322802 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.323803 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m18:18:12.323803 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m18:18:12.324803 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m18:18:12.324803 [info ] [Thread-1 (]: 73 of 97 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.01s]
[0m18:18:12.325848 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m18:18:12.325848 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m18:18:12.325848 [info ] [Thread-1 (]: 74 of 97 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m18:18:12.326801 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m18:18:12.326801 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m18:18:12.329801 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m18:18:12.330803 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m18:18:12.332801 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m18:18:12.333800 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m18:18:12.334803 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m18:18:12.334803 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.334803 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.335874 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m18:18:12.335874 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m18:18:12.336926 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.338803 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m18:18:12.338803 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m18:18:12.339803 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m18:18:12.339803 [info ] [Thread-1 (]: 74 of 97 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.01s]
[0m18:18:12.340849 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m18:18:12.340849 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m18:18:12.341865 [info ] [Thread-1 (]: 75 of 97 START test not_null_dim_consolidado_id_consolidado .................... [RUN]
[0m18:18:12.341865 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m18:18:12.342801 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m18:18:12.346802 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m18:18:12.346802 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m18:18:12.348803 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m18:18:12.349801 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m18:18:12.349801 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m18:18:12.349801 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.350802 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.350802 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m18:18:12.351802 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m18:18:12.352802 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.353924 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m18:18:12.354828 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m18:18:12.354828 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m18:18:12.355803 [info ] [Thread-1 (]: 75 of 97 PASS not_null_dim_consolidado_id_consolidado .......................... [[32mPASS[0m in 0.01s]
[0m18:18:12.355803 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m18:18:12.356840 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m18:18:12.356840 [info ] [Thread-1 (]: 76 of 97 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m18:18:12.356840 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m18:18:12.357847 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m18:18:12.361802 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m18:18:12.362802 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m18:18:12.364803 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m18:18:12.365802 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m18:18:12.365802 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m18:18:12.366803 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.367801 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.367801 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m18:18:12.367801 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:12.369804 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.370909 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m18:18:12.371801 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m18:18:12.371801 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m18:18:12.372799 [info ] [Thread-1 (]: 76 of 97 PASS relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[32mPASS[0m in 0.01s]
[0m18:18:12.372799 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m18:18:12.372799 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m18:18:12.373803 [info ] [Thread-1 (]: 77 of 97 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m18:18:12.373803 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m18:18:12.374801 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m18:18:12.377940 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m18:18:12.378912 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m18:18:12.380183 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m18:18:12.381200 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m18:18:12.382196 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m18:18:12.382196 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.382196 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.383197 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m18:18:12.383197 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m18:18:12.384195 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.385196 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m18:18:12.386216 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m18:18:12.386216 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m18:18:12.386216 [info ] [Thread-1 (]: 77 of 97 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.01s]
[0m18:18:12.387203 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m18:18:12.388200 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m18:18:12.388200 [info ] [Thread-1 (]: 78 of 97 START test not_null_dim_controle_id_controle .......................... [RUN]
[0m18:18:12.389205 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m18:18:12.389205 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m18:18:12.392227 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m18:18:12.393217 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m18:18:12.395203 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m18:18:12.396199 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m18:18:12.396199 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m18:18:12.396199 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.397199 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.397199 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m18:18:12.397199 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m18:18:12.398199 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.399202 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m18:18:12.400199 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m18:18:12.400199 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m18:18:12.401242 [info ] [Thread-1 (]: 78 of 97 PASS not_null_dim_controle_id_controle ................................ [[32mPASS[0m in 0.01s]
[0m18:18:12.401242 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m18:18:12.402245 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m18:18:12.402245 [info ] [Thread-1 (]: 79 of 97 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m18:18:12.402245 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m18:18:12.403263 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m18:18:12.406258 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m18:18:12.407270 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m18:18:12.410257 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m18:18:12.411259 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m18:18:12.411259 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m18:18:12.411259 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.412242 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.412242 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m18:18:12.412242 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:12.414242 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.415396 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m18:18:12.416400 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m18:18:12.416400 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m18:18:12.416400 [info ] [Thread-1 (]: 79 of 97 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.01s]
[0m18:18:12.417403 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m18:18:12.417403 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m18:18:12.417403 [info ] [Thread-1 (]: 80 of 97 START test unique_dim_controle_id_controle ............................ [RUN]
[0m18:18:12.418418 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m18:18:12.418418 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m18:18:12.421403 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m18:18:12.422406 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m18:18:12.424402 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m18:18:12.426400 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m18:18:12.426400 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m18:18:12.426400 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.427399 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.427399 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m18:18:12.427399 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m18:18:12.428399 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:12.429400 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m18:18:12.430421 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m18:18:12.430421 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m18:18:12.431424 [info ] [Thread-1 (]: 80 of 97 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.01s]
[0m18:18:12.431424 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m18:18:12.432401 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m18:18:12.432401 [info ] [Thread-1 (]: 81 of 97 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m18:18:12.433401 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m18:18:12.433401 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m18:18:12.436402 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:18:12.438402 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m18:18:12.440402 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:18:12.441402 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:18:12.441402 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m18:18:12.442429 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.442429 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.442429 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:18:12.443402 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m18:18:12.736041 [debug] [Thread-1 (]: SQL status: OK in 0.292 seconds
[0m18:18:12.739058 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:18:12.739058 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m18:18:12.739058 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.740041 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m18:18:12.740041 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:18:12.741059 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m18:18:12.745131 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m18:18:12.746110 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m18:18:12.747127 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m18:18:12.747127 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.748127 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m18:18:12.748127 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001668083C860>]}
[0m18:18:12.749126 [info ] [Thread-1 (]: 81 of 97 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 0.32s]
[0m18:18:12.750112 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m18:18:12.750112 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m18:18:12.750112 [info ] [Thread-1 (]: 82 of 97 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m18:18:12.751112 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m18:18:12.751112 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m18:18:12.754109 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:18:12.755109 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m18:18:12.757109 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:18:12.758109 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:18:12.758109 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m18:18:12.758109 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.759111 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.759111 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:18:12.759111 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m18:18:12.892111 [debug] [Thread-1 (]: SQL status: OK in 0.132 seconds
[0m18:18:12.895112 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:18:12.895112 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m18:18:12.896112 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.896112 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m18:18:12.897113 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:18:12.897113 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m18:18:12.902110 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m18:18:12.904118 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m18:18:12.905121 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m18:18:12.905121 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.906117 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m18:18:12.907113 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166966E96D0>]}
[0m18:18:12.907113 [info ] [Thread-1 (]: 82 of 97 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.16s]
[0m18:18:12.908113 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m18:18:12.908113 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m18:18:12.909111 [info ] [Thread-1 (]: 83 of 97 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m18:18:12.910114 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m18:18:12.910114 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m18:18:12.913115 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:18:12.914113 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m18:18:12.917114 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:18:12.918114 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:18:12.918114 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m18:18:12.918114 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:12.919114 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:12.919114 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:18:12.919114 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m18:18:23.593417 [debug] [Thread-1 (]: SQL status: OK in 10.674 seconds
[0m18:18:23.595419 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:18:23.596419 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m18:18:23.596419 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:23.597446 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m18:18:23.597446 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:18:23.598434 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m18:18:23.727378 [debug] [Thread-1 (]: SQL status: OK in 0.129 seconds
[0m18:18:23.729394 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m18:18:23.730394 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m18:18:23.730394 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:23.731394 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m18:18:23.731394 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FB72CFB0>]}
[0m18:18:23.732388 [info ] [Thread-1 (]: 83 of 97 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 10.82s]
[0m18:18:23.732388 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m18:18:23.733378 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m18:18:23.733378 [info ] [Thread-1 (]: 84 of 97 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m18:18:23.734379 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m18:18:23.734379 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m18:18:23.737411 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:18:23.738394 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m18:18:23.741396 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:18:23.742393 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:18:23.742393 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m18:18:23.743394 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:23.743394 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:23.743394 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:18:23.743394 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m18:18:23.952378 [debug] [Thread-1 (]: SQL status: OK in 0.208 seconds
[0m18:18:23.954503 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:18:23.955506 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m18:18:23.955506 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:23.956391 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m18:18:23.957446 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:18:23.957446 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m18:18:23.968759 [debug] [Thread-1 (]: SQL status: OK in 0.011 seconds
[0m18:18:23.971753 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m18:18:23.971753 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m18:18:23.972750 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:23.973752 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m18:18:23.973752 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016696ACF9B0>]}
[0m18:18:23.973752 [info ] [Thread-1 (]: 84 of 97 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.24s]
[0m18:18:23.974751 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m18:18:23.974751 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m18:18:23.975700 [info ] [Thread-1 (]: 85 of 97 START sql table model main.fato_risco_credito ......................... [RUN]
[0m18:18:23.975700 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m18:18:23.976643 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m18:18:23.978771 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:18:23.979763 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m18:18:23.982642 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:18:23.983641 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:18:23.983641 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m18:18:23.983641 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:23.984641 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:23.984641 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:18:23.984641 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m18:18:24.255645 [debug] [Thread-1 (]: SQL status: OK in 0.271 seconds
[0m18:18:24.257644 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:18:24.257644 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m18:18:24.258644 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.259642 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m18:18:24.259642 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:18:24.260644 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m18:18:24.306948 [debug] [Thread-1 (]: SQL status: OK in 0.047 seconds
[0m18:18:24.309782 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m18:18:24.309782 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m18:18:24.310782 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.312781 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m18:18:24.313782 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'e9d12424-aba5-4b9d-97dd-1bbb5c929373', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000016680865220>]}
[0m18:18:24.313782 [info ] [Thread-1 (]: 85 of 97 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.34s]
[0m18:18:24.314765 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m18:18:24.314765 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m18:18:24.315768 [info ] [Thread-1 (]: 86 of 97 START test not_null_dim_segmento_id_segmento .......................... [RUN]
[0m18:18:24.315768 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m18:18:24.315768 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m18:18:24.320764 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m18:18:24.321784 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m18:18:24.323767 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m18:18:24.324765 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m18:18:24.325765 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m18:18:24.325765 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:24.326765 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:24.326765 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m18:18:24.326765 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m18:18:24.327768 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:24.328767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m18:18:24.329766 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m18:18:24.329766 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m18:18:24.330765 [info ] [Thread-1 (]: 86 of 97 PASS not_null_dim_segmento_id_segmento ................................ [[32mPASS[0m in 0.01s]
[0m18:18:24.331765 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m18:18:24.331765 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m18:18:24.331765 [info ] [Thread-1 (]: 87 of 97 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m18:18:24.331765 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m18:18:24.332766 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m18:18:24.336767 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m18:18:24.337766 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m18:18:24.338767 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m18:18:24.339767 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m18:18:24.340766 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m18:18:24.340766 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:24.341769 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:24.341769 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m18:18:24.341769 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:24.343766 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:24.345780 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m18:18:24.346780 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m18:18:24.346780 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m18:18:24.347780 [info ] [Thread-1 (]: 87 of 97 PASS relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[32mPASS[0m in 0.02s]
[0m18:18:24.348764 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m18:18:24.348764 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m18:18:24.349765 [info ] [Thread-1 (]: 88 of 97 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m18:18:24.349765 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m18:18:24.349765 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m18:18:24.354767 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m18:18:24.355768 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m18:18:24.357793 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m18:18:24.359783 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m18:18:24.359783 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m18:18:24.360767 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:24.360767 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.360767 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m18:18:24.361767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m18:18:24.362765 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:24.363765 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m18:18:24.364767 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m18:18:24.365766 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m18:18:24.365766 [info ] [Thread-1 (]: 88 of 97 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.02s]
[0m18:18:24.366766 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m18:18:24.366766 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m18:18:24.366766 [info ] [Thread-1 (]: 89 of 97 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m18:18:24.367765 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m18:18:24.367765 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m18:18:24.370763 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m18:18:24.371763 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m18:18:24.373763 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m18:18:24.373763 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m18:18:24.374763 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m18:18:24.374763 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:24.374763 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.375764 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m18:18:24.375764 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:24.376767 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.377767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m18:18:24.378768 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m18:18:24.378768 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m18:18:24.378768 [info ] [Thread-1 (]: 89 of 97 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.01s]
[0m18:18:24.379765 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m18:18:24.379765 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m18:18:24.380765 [info ] [Thread-1 (]: 90 of 97 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m18:18:24.380765 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m18:18:24.380765 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m18:18:24.383763 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m18:18:24.384763 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m18:18:24.386763 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m18:18:24.387763 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m18:18:24.387763 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m18:18:24.387763 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:24.388767 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:24.388767 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m18:18:24.389766 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:24.390766 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:24.391767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m18:18:24.391767 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m18:18:24.392768 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m18:18:24.392768 [info ] [Thread-1 (]: 90 of 97 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.01s]
[0m18:18:24.393765 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m18:18:24.393765 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m18:18:24.394765 [info ] [Thread-1 (]: 91 of 97 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m18:18:24.394765 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m18:18:24.394765 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m18:18:24.397768 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m18:18:24.398767 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m18:18:24.400766 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m18:18:24.401766 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m18:18:24.402767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m18:18:24.402767 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:24.403769 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.403769 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m18:18:24.404766 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m18:18:24.405766 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:24.406767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m18:18:24.407766 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m18:18:24.407766 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m18:18:24.408767 [info ] [Thread-1 (]: 91 of 97 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.01s]
[0m18:18:24.408767 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m18:18:24.408767 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m18:18:24.409797 [info ] [Thread-1 (]: 92 of 97 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m18:18:24.409797 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m18:18:24.410767 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m18:18:24.413766 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m18:18:24.414766 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m18:18:24.416781 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m18:18:24.417767 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m18:18:24.417767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m18:18:24.417767 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:24.418764 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.418764 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m18:18:24.418764 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:24.419764 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.420767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m18:18:24.421766 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m18:18:24.421766 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m18:18:24.422767 [info ] [Thread-1 (]: 92 of 97 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.01s]
[0m18:18:24.422767 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m18:18:24.423766 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m18:18:24.423766 [info ] [Thread-1 (]: 93 of 97 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m18:18:24.423766 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m18:18:24.424766 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m18:18:24.429766 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m18:18:24.430765 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m18:18:24.432764 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m18:18:24.433763 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m18:18:24.434763 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m18:18:24.434763 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:24.435763 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:24.435763 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m18:18:24.436764 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:24.436764 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.438764 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m18:18:24.439781 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m18:18:24.440769 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m18:18:24.440769 [info ] [Thread-1 (]: 93 of 97 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.02s]
[0m18:18:24.441768 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m18:18:24.442765 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m18:18:24.442765 [info ] [Thread-1 (]: 94 of 97 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m18:18:24.442765 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m18:18:24.443765 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m18:18:24.445767 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m18:18:24.446767 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m18:18:24.448768 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m18:18:24.449767 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m18:18:24.449767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m18:18:24.449767 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:24.450767 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.450767 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m18:18:24.450767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m18:18:24.451764 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.452766 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m18:18:24.453764 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m18:18:24.453764 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m18:18:24.453764 [info ] [Thread-1 (]: 94 of 97 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.01s]
[0m18:18:24.454765 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m18:18:24.454765 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m18:18:24.455769 [info ] [Thread-1 (]: 95 of 97 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m18:18:24.455769 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m18:18:24.456880 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m18:18:24.463808 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m18:18:24.465793 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m18:18:24.467796 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m18:18:24.468792 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m18:18:24.468792 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m18:18:24.469799 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:24.470796 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:24.470796 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m18:18:24.470796 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m18:18:24.473793 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m18:18:24.474794 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m18:18:24.475795 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m18:18:24.475795 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m18:18:24.475795 [info ] [Thread-1 (]: 95 of 97 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.02s]
[0m18:18:24.477739 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m18:18:24.477739 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m18:18:24.478244 [info ] [Thread-1 (]: 96 of 97 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m18:18:24.479252 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m18:18:24.479252 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m18:18:24.483265 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m18:18:24.485250 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m18:18:24.488274 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m18:18:24.491256 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m18:18:24.491256 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m18:18:24.491256 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:24.492256 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.492256 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m18:18:24.492256 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m18:18:24.493257 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.495271 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m18:18:24.496271 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m18:18:24.496271 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m18:18:24.497270 [info ] [Thread-1 (]: 96 of 97 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.02s]
[0m18:18:24.498254 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m18:18:24.498254 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m18:18:24.499259 [info ] [Thread-1 (]: 97 of 97 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m18:18:24.500256 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m18:18:24.500256 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m18:18:24.504766 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m18:18:24.505667 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m18:18:24.509672 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m18:18:24.511673 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m18:18:24.512688 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m18:18:24.512688 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m18:18:24.513690 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m18:18:24.514674 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m18:18:24.514674 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m18:18:24.515674 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m18:18:24.516675 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m18:18:24.516675 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m18:18:24.517675 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m18:18:24.517675 [info ] [Thread-1 (]: 97 of 97 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.02s]
[0m18:18:24.518674 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m18:18:24.519672 [debug] [MainThread]: Using duckdb connection "master"
[0m18:18:24.520702 [debug] [MainThread]: On master: BEGIN
[0m18:18:24.520702 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m18:18:24.521678 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m18:18:24.521678 [debug] [MainThread]: On master: COMMIT
[0m18:18:24.522677 [debug] [MainThread]: Using duckdb connection "master"
[0m18:18:24.522677 [debug] [MainThread]: On master: COMMIT
[0m18:18:24.522677 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m18:18:24.522677 [debug] [MainThread]: On master: Close
[0m18:18:24.523675 [debug] [MainThread]: Connection 'master' was properly closed.
[0m18:18:24.523675 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m18:18:24.523675 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m18:18:24.523675 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m18:18:24.524674 [info ] [MainThread]: 
[0m18:18:24.524674 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 17.48 seconds (17.48s).
[0m18:18:24.532673 [debug] [MainThread]: Command end result
[0m18:18:24.613673 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m18:18:24.615674 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m18:18:24.621673 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m18:18:24.621673 [info ] [MainThread]: 
[0m18:18:24.622674 [info ] [MainThread]: [32mCompleted successfully[0m
[0m18:18:24.623673 [info ] [MainThread]: 
[0m18:18:24.623673 [info ] [MainThread]: Done. PASS=97 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=97
[0m18:18:24.625692 [debug] [MainThread]: Command `dbt build` succeeded at 18:18:24.625692 after 18.63 seconds
[0m18:18:24.625692 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FD722330>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166FE735880>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000166803CC9E0>]}
[0m18:18:24.625692 [debug] [MainThread]: Flushing usage events
[0m18:18:25.366359 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:30:32.872632 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BCF6627620>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BCF6627170>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BCF6626F30>]}


============================== 16:30:32.877770 | 0a6d826e-8ad1-4d42-b9c6-93bc09c11678 ==============================
[0m16:30:32.877770 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:30:32.877770 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'invocation_command': 'dbt run --select fato_demonstracao_resultado --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:30:32.882725 [error] [MainThread]: Encountered an error:
Parsing Error
  Env var required but not provided: 'GOLD_DB_PATH'
[0m16:30:32.883731 [debug] [MainThread]: Command `dbt run` failed at 16:30:32.883731 after 0.14 seconds
[0m16:30:32.883731 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BCF66622A0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BCF3D09AC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BCF67576B0>]}
[0m16:30:32.883731 [debug] [MainThread]: Flushing usage events
[0m16:30:33.705148 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:31:17.327622 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB05A2B3E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB05A2AF30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB05A2A180>]}


============================== 16:31:17.333476 | 43cc69ea-5649-4f3c-8418-bd2f84a8921d ==============================
[0m16:31:17.333476 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:31:17.335540 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt run --select fato_demonstracao_resultado --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:31:17.558040 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '43cc69ea-5649-4f3c-8418-bd2f84a8921d', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB072AA4B0>]}
[0m16:31:17.608189 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '43cc69ea-5649-4f3c-8418-bd2f84a8921d', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB073940B0>]}
[0m16:31:17.637156 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:31:18.166558 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:31:18.290847 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m16:31:18.291855 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '43cc69ea-5649-4f3c-8418-bd2f84a8921d', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB079D2150>]}
[0m16:31:22.849725 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m16:31:22.849725 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '43cc69ea-5649-4f3c-8418-bd2f84a8921d', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB07885D90>]}
[0m16:31:23.268589 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:31:23.277045 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '43cc69ea-5649-4f3c-8418-bd2f84a8921d', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB07DCA6F0>]}
[0m16:31:23.353565 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:31:23.372824 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:31:23.428385 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '43cc69ea-5649-4f3c-8418-bd2f84a8921d', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB07C52420>]}
[0m16:31:23.428891 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:31:23.429535 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '43cc69ea-5649-4f3c-8418-bd2f84a8921d', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB07C9B710>]}
[0m16:31:23.432335 [info ] [MainThread]: 
[0m16:31:23.432961 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:31:23.432961 [info ] [MainThread]: 
[0m16:31:23.432961 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:31:23.433966 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:31:27.925240 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:31:27.926240 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:31:27.926240 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:31:28.432928 [debug] [ThreadPool]: SQL status: OK in 0.506 seconds
[0m16:31:28.433931 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:31:28.435436 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:31:28.435436 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:31:28.440755 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:31:28.441299 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:31:28.441299 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:31:28.442305 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:31:28.443317 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:31:28.443317 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:31:28.443317 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:31:28.444324 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:31:28.444324 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:31:28.445450 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:31:28.445983 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:31:28.445983 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:31:28.446989 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:31:28.446989 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:31:28.446989 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:31:28.452114 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:31:28.456957 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:31:28.457544 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:31:28.457544 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:31:28.458190 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:31:28.458190 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:31:28.458190 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:31:28.469433 [debug] [ThreadPool]: SQL status: OK in 0.011 seconds
[0m16:31:28.470948 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:31:28.485222 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:31:28.485222 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:31:28.489261 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '43cc69ea-5649-4f3c-8418-bd2f84a8921d', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB07C98230>]}
[0m16:31:28.489261 [debug] [MainThread]: Using duckdb connection "master"
[0m16:31:28.489261 [debug] [MainThread]: On master: BEGIN
[0m16:31:28.490799 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:31:28.490799 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:31:28.490799 [debug] [MainThread]: On master: COMMIT
[0m16:31:28.490799 [debug] [MainThread]: Using duckdb connection "master"
[0m16:31:28.491806 [debug] [MainThread]: On master: COMMIT
[0m16:31:28.491806 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:31:28.492311 [debug] [MainThread]: On master: Close
[0m16:31:28.495981 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:31:28.495981 [info ] [Thread-1 (]: 1 of 1 START sql table model main.fato_demonstracao_resultado .................. [RUN]
[0m16:31:28.496986 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.fato_demonstracao_resultado'
[0m16:31:28.496986 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:31:28.504657 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:31:28.505751 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:31:28.530918 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:31:28.531924 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:31:28.532428 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:31:28.532428 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:31:28.533435 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:28.533435 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:31:28.533435 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH summary_prudential AS (
    SELECT DISTINCT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."prudential_conglomerates_summary"
),

summary_financial AS (
    SELECT DISTINCT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."financial_conglomerates_summary"
),

summary_individual AS (
    SELECT DISTINCT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."individual_institutions_summary"
),

dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN summary_prudential r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN summary_financial r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN summary_individual r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:31:29.004445 [debug] [Thread-1 (]: SQL status: OK in 0.470 seconds
[0m16:31:29.008030 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:31:29.008030 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:31:29.009667 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:31:29.011178 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:31:29.011178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:31:29.011705 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:31:29.016517 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:31:29.016517 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado" rename to "fato_demonstracao_resultado__dbt_backup"
[0m16:31:29.018617 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:31:29.021168 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:31:29.021672 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:31:29.022176 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:31:29.034069 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:31:29.035053 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:31:29.035053 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:31:29.149604 [debug] [Thread-1 (]: SQL status: OK in 0.114 seconds
[0m16:31:29.153696 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:31:29.154786 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:31:29.156393 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:31:29.157929 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:31:29.161593 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '43cc69ea-5649-4f3c-8418-bd2f84a8921d', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB07DC8A10>]}
[0m16:31:29.162168 [info ] [Thread-1 (]: 1 of 1 OK created sql table model main.fato_demonstracao_resultado ............. [[32mOK[0m in 0.66s]
[0m16:31:29.162702 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:31:29.163895 [debug] [MainThread]: Using duckdb connection "master"
[0m16:31:29.163895 [debug] [MainThread]: On master: BEGIN
[0m16:31:29.163895 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:31:29.164925 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:31:29.164925 [debug] [MainThread]: On master: COMMIT
[0m16:31:29.164925 [debug] [MainThread]: Using duckdb connection "master"
[0m16:31:29.164925 [debug] [MainThread]: On master: COMMIT
[0m16:31:29.165919 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:31:29.165919 [debug] [MainThread]: On master: Close
[0m16:31:29.166527 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:31:29.166527 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:31:29.166527 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:31:29.166527 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_demonstracao_resultado' was properly closed.
[0m16:31:29.166527 [info ] [MainThread]: 
[0m16:31:29.167556 [info ] [MainThread]: Finished running 1 table model in 0 hours 0 minutes and 5.73 seconds (5.73s).
[0m16:31:29.167556 [debug] [MainThread]: Command end result
[0m16:31:29.198628 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:31:29.200790 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:31:29.206435 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:31:29.206435 [info ] [MainThread]: 
[0m16:31:29.206435 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:31:29.206435 [info ] [MainThread]: 
[0m16:31:29.208012 [info ] [MainThread]: Done. PASS=1 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=1
[0m16:31:29.208012 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:31:29.209681 [debug] [MainThread]: Command `dbt run` succeeded at 16:31:29.209681 after 12.09 seconds
[0m16:31:29.209681 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB05CC5100>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB05FB4E30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001CB05FB4E00>]}
[0m16:31:29.209681 [debug] [MainThread]: Flushing usage events
[0m16:31:29.831131 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m16:32:22.437145 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002365E5C2D20>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002365E5C0DD0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002365E5C0E00>]}


============================== 16:32:22.442793 | 925b6f44-154a-4efe-b784-5cb3cdbe65c6 ==============================
[0m16:32:22.442793 [info ] [MainThread]: Running with dbt=1.11.5
[0m16:32:22.444415 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'src/bacen_ifdata/data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt run --select fato_demonstracao_resultado --project-dir src/bacen_ifdata/data_analytics --profiles-dir src/bacen_ifdata/data_analytics', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m16:32:22.635166 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '925b6f44-154a-4efe-b784-5cb3cdbe65c6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023660707C50>]}
[0m16:32:22.694099 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '925b6f44-154a-4efe-b784-5cb3cdbe65c6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002365F5082F0>]}
[0m16:32:22.696809 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m16:32:22.958208 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m16:32:23.112788 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 1 files changed.
[0m16:32:23.112788 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_demonstracao_resultado.sql
[0m16:32:23.400887 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on
'fato_demonstracao_resultado' in package 'bacen_ifdata_analytics'
(models\gold\schema.yml). Arguments to generic tests should be nested under the
`arguments` property.
[0m16:32:23.400887 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '925b6f44-154a-4efe-b784-5cb3cdbe65c6', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023660BF8710>]}
[0m16:32:23.543855 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m16:32:23.557764 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '925b6f44-154a-4efe-b784-5cb3cdbe65c6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023660D2E9F0>]}
[0m16:32:23.635665 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:32:23.637202 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:32:23.687334 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '925b6f44-154a-4efe-b784-5cb3cdbe65c6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023660CB44D0>]}
[0m16:32:23.687939 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m16:32:23.688989 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '925b6f44-154a-4efe-b784-5cb3cdbe65c6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023660CB0560>]}
[0m16:32:23.691111 [info ] [MainThread]: 
[0m16:32:23.691111 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m16:32:23.692431 [info ] [MainThread]: 
[0m16:32:23.692431 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m16:32:23.693441 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m16:32:23.756345 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m16:32:23.756345 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m16:32:23.756345 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:32:23.870138 [debug] [ThreadPool]: SQL status: OK in 0.113 seconds
[0m16:32:23.871201 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m16:32:23.872751 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m16:32:23.873292 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m16:32:23.878186 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:32:23.878186 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m16:32:23.878737 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m16:32:23.878737 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m16:32:23.880388 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:32:23.880905 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m16:32:23.880905 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:32:23.881447 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:32:23.881447 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m16:32:23.881994 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:32:23.883067 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:32:23.883067 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m16:32:23.883067 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m16:32:23.883067 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:32:23.884084 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m16:32:23.888793 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m16:32:23.893578 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:32:23.893578 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m16:32:23.894131 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:32:23.894131 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m16:32:23.894742 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m16:32:23.894742 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m16:32:23.905654 [debug] [ThreadPool]: SQL status: OK in 0.010 seconds
[0m16:32:23.906807 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m16:32:23.907828 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m16:32:23.907828 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m16:32:23.911929 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '925b6f44-154a-4efe-b784-5cb3cdbe65c6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023660CB2B40>]}
[0m16:32:23.911929 [debug] [MainThread]: Using duckdb connection "master"
[0m16:32:23.912480 [debug] [MainThread]: On master: BEGIN
[0m16:32:23.912480 [debug] [MainThread]: Opening a new connection, currently in state init
[0m16:32:23.913087 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m16:32:23.913087 [debug] [MainThread]: On master: COMMIT
[0m16:32:23.913087 [debug] [MainThread]: Using duckdb connection "master"
[0m16:32:23.913087 [debug] [MainThread]: On master: COMMIT
[0m16:32:23.914126 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:32:23.914126 [debug] [MainThread]: On master: Close
[0m16:32:23.918484 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:32:23.918484 [info ] [Thread-1 (]: 1 of 1 START sql table model main.fato_demonstracao_resultado .................. [RUN]
[0m16:32:23.920045 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.fato_demonstracao_resultado'
[0m16:32:23.920045 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:32:23.928147 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:32:23.928787 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:32:23.957991 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:32:23.959669 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:32:23.959669 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m16:32:23.959669 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m16:32:23.961237 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m16:32:23.961237 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:32:23.961803 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH summary_prudential AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."prudential_conglomerates_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

summary_financial AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."financial_conglomerates_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

summary_individual AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."individual_institutions_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN summary_prudential r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN summary_financial r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN summary_individual r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m16:32:24.372256 [debug] [Thread-1 (]: SQL status: OK in 0.410 seconds
[0m16:32:24.376309 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:32:24.377818 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT index_name
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:32:24.378825 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:32:24.379331 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:32:24.379331 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

    SELECT COUNT(*) as remaining_indexes
    FROM duckdb_indexes()
    WHERE schema_name = 'main'
      AND table_name = 'fato_demonstracao_resultado'
  
[0m16:32:24.380852 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:32:24.385839 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:32:24.385839 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado" rename to "fato_demonstracao_resultado__dbt_backup"
[0m16:32:24.386883 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:32:24.389134 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:32:24.389743 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m16:32:24.389743 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m16:32:24.401709 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:32:24.401709 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:32:24.401709 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m16:32:24.508870 [debug] [Thread-1 (]: SQL status: OK in 0.106 seconds
[0m16:32:24.516392 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m16:32:24.516392 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m16:32:24.518781 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m16:32:24.522124 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m16:32:24.524323 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '925b6f44-154a-4efe-b784-5cb3cdbe65c6', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002366122BDD0>]}
[0m16:32:24.525327 [info ] [Thread-1 (]: 1 of 1 OK created sql table model main.fato_demonstracao_resultado ............. [[32mOK[0m in 0.60s]
[0m16:32:24.525830 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m16:32:24.526835 [debug] [MainThread]: Using duckdb connection "master"
[0m16:32:24.526835 [debug] [MainThread]: On master: BEGIN
[0m16:32:24.526835 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m16:32:24.527837 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:32:24.527837 [debug] [MainThread]: On master: COMMIT
[0m16:32:24.527837 [debug] [MainThread]: Using duckdb connection "master"
[0m16:32:24.527837 [debug] [MainThread]: On master: COMMIT
[0m16:32:24.528918 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m16:32:24.528918 [debug] [MainThread]: On master: Close
[0m16:32:24.529429 [debug] [MainThread]: Connection 'master' was properly closed.
[0m16:32:24.529429 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m16:32:24.529429 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m16:32:24.529429 [debug] [MainThread]: Connection 'model.bacen_ifdata_analytics.fato_demonstracao_resultado' was properly closed.
[0m16:32:24.529429 [info ] [MainThread]: 
[0m16:32:24.530434 [info ] [MainThread]: Finished running 1 table model in 0 hours 0 minutes and 0.84 seconds (0.84s).
[0m16:32:24.530948 [debug] [MainThread]: Command end result
[0m16:32:24.557942 [debug] [MainThread]: Wrote artifact WritableManifest to src\bacen_ifdata\data_analytics\target\manifest.json
[0m16:32:24.559674 [debug] [MainThread]: Wrote artifact SemanticManifest to src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m16:32:24.564440 [debug] [MainThread]: Wrote artifact RunExecutionResult to src\bacen_ifdata\data_analytics\target\run_results.json
[0m16:32:24.564440 [info ] [MainThread]: 
[0m16:32:24.564440 [info ] [MainThread]: [32mCompleted successfully[0m
[0m16:32:24.564440 [info ] [MainThread]: 
[0m16:32:24.564440 [info ] [MainThread]: Done. PASS=1 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=1
[0m16:32:24.566132 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 2 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m16:32:24.567224 [debug] [MainThread]: Command `dbt run` succeeded at 16:32:24.567224 after 2.24 seconds
[0m16:32:24.567224 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002365F14B890>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002365F508E60>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000023660E02210>]}
[0m16:32:24.567765 [debug] [MainThread]: Flushing usage events
[0m16:32:25.172571 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m17:12:00.807949 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020272724410>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020272724B30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020272724B00>]}


============================== 17:12:00.812630 | a7e59cd8-aec3-4e27-9334-e910841ebaa2 ==============================
[0m17:12:00.812630 [info ] [MainThread]: Running with dbt=1.11.5
[0m17:12:00.813194 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'use_colors': 'True', 'invocation_command': 'dbt build', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m17:12:01.034013 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020272B47B90>]}
[0m17:12:01.081537 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020272ABDA30>]}
[0m17:12:01.109738 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m17:12:01.533638 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m17:12:01.624469 [info ] [MainThread]: Unable to do partial parsing because profile has changed
[0m17:12:01.625483 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202740F24E0>]}
[0m17:12:04.137481 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m17:12:04.137481 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002027443B890>]}
[0m17:12:04.451965 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m17:12:04.460430 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002027438DD00>]}
[0m17:12:04.533038 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m17:12:04.537160 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m17:12:04.591958 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020274383B90>]}
[0m17:12:04.591958 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m17:12:04.596869 [info ] [MainThread]: 
[0m17:12:04.597878 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m17:12:04.597878 [info ] [MainThread]: 
[0m17:12:04.597878 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m17:12:04.603637 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m17:12:07.096684 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m17:12:07.096684 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m17:12:07.096684 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m17:12:07.640263 [debug] [ThreadPool]: SQL status: OK in 0.544 seconds
[0m17:12:07.641760 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m17:12:07.641760 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m17:12:07.643355 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m17:12:07.648084 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m17:12:07.648084 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m17:12:07.648597 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m17:12:07.649109 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m17:12:07.649665 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m17:12:07.649665 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m17:12:07.649665 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m17:12:07.649665 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m17:12:07.649665 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m17:12:07.651198 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m17:12:07.653067 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m17:12:07.653574 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m17:12:07.653574 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m17:12:07.653574 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m17:12:07.653574 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m17:12:07.656237 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m17:12:07.659896 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m17:12:07.659896 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m17:12:07.659896 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m17:12:07.661405 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m17:12:07.661405 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m17:12:07.661405 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m17:12:07.671091 [debug] [ThreadPool]: SQL status: OK in 0.009 seconds
[0m17:12:07.672153 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m17:12:07.683420 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m17:12:07.683420 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m17:12:07.684932 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202748C6840>]}
[0m17:12:07.685455 [debug] [MainThread]: Using duckdb connection "master"
[0m17:12:07.685455 [debug] [MainThread]: On master: BEGIN
[0m17:12:07.685455 [debug] [MainThread]: Opening a new connection, currently in state init
[0m17:12:07.685455 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m17:12:07.685455 [debug] [MainThread]: On master: COMMIT
[0m17:12:07.685455 [debug] [MainThread]: Using duckdb connection "master"
[0m17:12:07.687017 [debug] [MainThread]: On master: COMMIT
[0m17:12:07.687017 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m17:12:07.687017 [debug] [MainThread]: On master: Close
[0m17:12:07.691668 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m17:12:07.692055 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m17:12:07.692563 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m17:12:07.693571 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m17:12:07.701902 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m17:12:07.703622 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m17:12:07.733932 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m17:12:07.735438 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m17:12:07.735438 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m17:12:07.735438 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m17:12:07.737055 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:07.737767 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m17:12:07.737767 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
    UNION ALL
    SELECT * FROM portfolio_fallback
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m17:12:07.932888 [debug] [Thread-1 (]: SQL status: OK in 0.194 seconds
[0m17:12:07.937658 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m17:12:07.937658 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m17:12:07.939216 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:07.948507 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m17:12:07.948507 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m17:12:07.949012 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m17:12:07.953054 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m17:12:07.958215 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m17:12:07.958215 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m17:12:07.958215 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:07.960379 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m17:12:07.963003 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002026F4EDF70>]}
[0m17:12:07.963003 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.27s]
[0m17:12:07.963791 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m17:12:07.963791 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m17:12:07.963791 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m17:12:07.965101 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m17:12:07.965101 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m17:12:07.968390 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m17:12:07.969915 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m17:12:07.975051 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m17:12:07.976116 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m17:12:07.976116 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m17:12:07.976116 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:07.977640 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:07.977640 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m17:12:07.977640 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL

    UNION

    -- Fallback: localizações de instituições presentes apenas nas tabelas SCR
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources

UNION

-- Sentinel para instituições sem dados de localização (cidade, uf, regiao = NULL)
SELECT
    md5(cast('' as varchar)) as id_localizacao,
    NULL as cidade,
    NULL as uf,
    NULL as regiao
    );
  
  
[0m17:12:08.026176 [debug] [Thread-1 (]: SQL status: OK in 0.049 seconds
[0m17:12:08.028697 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m17:12:08.028697 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m17:12:08.030369 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.031892 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m17:12:08.032400 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m17:12:08.032400 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m17:12:08.035033 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:08.035604 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m17:12:08.037192 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m17:12:08.037192 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.038736 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m17:12:08.038736 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202749AB350>]}
[0m17:12:08.039753 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.07s]
[0m17:12:08.039753 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m17:12:08.041274 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m17:12:08.041799 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m17:12:08.042816 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m17:12:08.043326 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m17:12:08.047215 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m17:12:08.048741 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m17:12:08.051901 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m17:12:08.052917 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m17:12:08.052917 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m17:12:08.054429 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:08.054429 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:08.054429 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m17:12:08.054429 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m17:12:08.074733 [debug] [Thread-1 (]: SQL status: OK in 0.019 seconds
[0m17:12:08.076273 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m17:12:08.076273 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m17:12:08.077784 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.078800 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m17:12:08.078800 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m17:12:08.078800 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m17:12:08.080380 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:08.082420 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m17:12:08.082420 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m17:12:08.083450 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.083450 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m17:12:08.084971 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002027494AE40>]}
[0m17:12:08.084971 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.04s]
[0m17:12:08.085527 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m17:12:08.085527 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m17:12:08.085527 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m17:12:08.087114 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m17:12:08.087114 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m17:12:08.091264 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m17:12:08.091791 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m17:12:08.094890 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m17:12:08.095476 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m17:12:08.096060 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m17:12:08.096060 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:08.097069 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:08.097069 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m17:12:08.097069 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m17:12:08.472646 [debug] [Thread-1 (]: SQL status: OK in 0.375 seconds
[0m17:12:08.477767 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m17:12:08.477767 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m17:12:08.478811 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.478811 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m17:12:08.478811 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m17:12:08.478811 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m17:12:08.572708 [debug] [Thread-1 (]: SQL status: OK in 0.093 seconds
[0m17:12:08.575291 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m17:12:08.575810 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m17:12:08.575810 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.576811 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m17:12:08.577816 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020209E35FA0>]}
[0m17:12:08.578323 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.49s]
[0m17:12:08.578828 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m17:12:08.578828 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m17:12:08.578828 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m17:12:08.578828 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m17:12:08.580396 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m17:12:08.582695 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m17:12:08.583704 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m17:12:08.586131 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m17:12:08.587142 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m17:12:08.587142 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m17:12:08.587142 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:08.588665 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.588665 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m17:12:08.589184 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m17:12:08.741796 [debug] [Thread-1 (]: SQL status: OK in 0.152 seconds
[0m17:12:08.743346 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m17:12:08.744355 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m17:12:08.745411 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:08.745969 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m17:12:08.745969 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m17:12:08.746976 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m17:12:08.752594 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m17:12:08.755108 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m17:12:08.755108 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m17:12:08.756113 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.756666 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m17:12:08.756666 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202749831D0>]}
[0m17:12:08.757672 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.18s]
[0m17:12:08.758177 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m17:12:08.758177 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m17:12:08.758177 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m17:12:08.758177 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m17:12:08.759745 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m17:12:08.761779 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m17:12:08.762882 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m17:12:08.764397 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m17:12:08.765902 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m17:12:08.765902 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m17:12:08.766521 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:08.766521 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.766521 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m17:12:08.767530 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m17:12:08.814564 [debug] [Thread-1 (]: SQL status: OK in 0.047 seconds
[0m17:12:08.817351 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m17:12:08.817351 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m17:12:08.818021 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.818593 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m17:12:08.818593 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m17:12:08.818593 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m17:12:08.835040 [debug] [Thread-1 (]: SQL status: OK in 0.015 seconds
[0m17:12:08.837393 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m17:12:08.837393 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m17:12:08.837393 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.839063 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m17:12:08.839063 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020209E57290>]}
[0m17:12:08.840069 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.08s]
[0m17:12:08.840069 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m17:12:08.840069 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m17:12:08.840069 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m17:12:08.842090 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m17:12:08.842090 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m17:12:08.845379 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m17:12:08.846447 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m17:12:08.848172 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m17:12:08.849694 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m17:12:08.849694 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m17:12:08.849694 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:08.849694 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.849694 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m17:12:08.851235 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m17:12:08.901942 [debug] [Thread-1 (]: SQL status: OK in 0.051 seconds
[0m17:12:08.906056 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m17:12:08.906686 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m17:12:08.907234 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.908329 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m17:12:08.908329 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m17:12:08.908329 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m17:12:08.972170 [debug] [Thread-1 (]: SQL status: OK in 0.063 seconds
[0m17:12:08.974328 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m17:12:08.974328 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m17:12:08.975339 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.975847 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m17:12:08.976861 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202749676E0>]}
[0m17:12:08.976861 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.13s]
[0m17:12:08.977859 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m17:12:08.977859 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m17:12:08.978374 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m17:12:08.978881 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m17:12:08.978881 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m17:12:08.983734 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m17:12:08.984998 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m17:12:08.987634 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m17:12:08.989148 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m17:12:08.989148 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m17:12:08.989148 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:08.990155 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:08.990155 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m17:12:08.990155 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH summary_prudential AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."prudential_conglomerates_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

summary_financial AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."financial_conglomerates_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

summary_individual AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."individual_institutions_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN summary_prudential r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN summary_financial r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN summary_individual r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m17:12:09.405516 [debug] [Thread-1 (]: SQL status: OK in 0.414 seconds
[0m17:12:09.408282 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m17:12:09.408282 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m17:12:09.409862 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:09.411395 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m17:12:09.411395 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m17:12:09.411927 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m17:12:09.498790 [debug] [Thread-1 (]: SQL status: OK in 0.087 seconds
[0m17:12:09.501957 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m17:12:09.501957 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m17:12:09.501957 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:09.502965 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m17:12:09.504471 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020209E784A0>]}
[0m17:12:09.504471 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.52s]
[0m17:12:09.505479 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m17:12:09.505479 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m17:12:09.506055 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m17:12:09.506619 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m17:12:09.506619 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m17:12:09.509801 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m17:12:09.509801 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m17:12:09.513038 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m17:12:09.514047 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m17:12:09.514554 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m17:12:09.515108 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:09.515108 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:09.515631 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m17:12:09.516139 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m17:12:09.520619 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m17:12:09.523943 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m17:12:09.523943 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m17:12:09.524961 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:09.524961 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m17:12:09.526356 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m17:12:09.526356 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m17:12:09.529386 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m17:12:09.532106 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m17:12:09.532667 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m17:12:09.533227 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:09.534239 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m17:12:09.534239 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020274995400>]}
[0m17:12:09.535236 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.03s]
[0m17:12:09.535236 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m17:12:09.535236 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m17:12:09.536323 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m17:12:09.536836 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m17:12:09.537489 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m17:12:09.540108 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m17:12:09.541614 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m17:12:09.543696 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m17:12:09.544892 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m17:12:09.545498 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m17:12:09.545498 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:09.546130 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:09.546732 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m17:12:09.546732 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m17:12:09.572805 [debug] [Thread-1 (]: SQL status: OK in 0.026 seconds
[0m17:12:09.575335 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m17:12:09.575335 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m17:12:09.576344 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:09.576344 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m17:12:09.577851 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m17:12:09.577851 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m17:12:09.585424 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m17:12:09.587620 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m17:12:09.587620 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m17:12:09.589141 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:09.590149 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m17:12:09.590149 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020209E757C0>]}
[0m17:12:09.590149 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.05s]
[0m17:12:09.592190 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m17:12:09.592190 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m17:12:09.592190 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m17:12:09.592190 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m17:12:09.592190 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m17:12:09.596730 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m17:12:09.598251 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m17:12:09.601305 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m17:12:09.601823 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m17:12:09.601823 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m17:12:09.602832 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:09.602832 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:09.602832 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m17:12:09.602832 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m17:12:09.855972 [debug] [Thread-1 (]: SQL status: OK in 0.252 seconds
[0m17:12:09.858690 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m17:12:09.858690 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m17:12:09.859755 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:09.859755 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m17:12:09.861387 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m17:12:09.861387 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m17:12:10.003197 [debug] [Thread-1 (]: SQL status: OK in 0.141 seconds
[0m17:12:10.004757 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m17:12:10.004757 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m17:12:10.005808 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.006493 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m17:12:10.006493 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202749A8200>]}
[0m17:12:10.006493 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.41s]
[0m17:12:10.008242 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m17:12:10.008242 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m17:12:10.008242 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m17:12:10.008242 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m17:12:10.008242 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m17:12:10.009881 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m17:12:10.026023 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m17:12:10.026023 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m17:12:10.027056 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.027056 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.027056 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m17:12:10.027056 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m17:12:10.028064 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.037711 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m17:12:10.038721 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m17:12:10.059319 [debug] [Thread-1 (]: SQL status: OK in 0.020 seconds
[0m17:12:10.068275 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m17:12:10.071874 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m17:12:10.072888 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m17:12:10.073888 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m17:12:10.080167 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m17:12:10.081220 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m17:12:10.082642 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202744AFDD0>]}
[0m17:12:10.083154 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.07s]
[0m17:12:10.085941 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m17:12:10.085941 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m17:12:10.087951 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m17:12:10.088964 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m17:12:10.089472 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m17:12:10.089472 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m17:12:10.096619 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m17:12:10.096619 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m17:12:10.096619 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.098551 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.099224 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m17:12:10.099733 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m17:12:10.099733 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.101794 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m17:12:10.102804 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m17:12:10.104888 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.105895 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m17:12:10.108527 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m17:12:10.109388 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m17:12:10.109896 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m17:12:10.110999 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.112662 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m17:12:10.113672 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202742E65A0>]}
[0m17:12:10.113672 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.02s]
[0m17:12:10.115504 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m17:12:10.117011 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m17:12:10.117629 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m17:12:10.118711 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m17:12:10.119346 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m17:12:10.119346 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m17:12:10.124208 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m17:12:10.124717 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m17:12:10.124717 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.125233 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.125233 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m17:12:10.125233 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m17:12:10.126471 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.128675 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m17:12:10.128675 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m17:12:10.131252 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.131811 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m17:12:10.132942 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m17:12:10.134024 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m17:12:10.134024 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m17:12:10.135613 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.135613 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m17:12:10.136968 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020274999B20>]}
[0m17:12:10.137571 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.02s]
[0m17:12:10.138503 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m17:12:10.139030 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m17:12:10.140042 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m17:12:10.140042 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m17:12:10.141551 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m17:12:10.142076 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m17:12:10.147465 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m17:12:10.147972 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m17:12:10.147972 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.147972 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.149558 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m17:12:10.149558 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m17:12:10.150583 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.151571 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m17:12:10.152076 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m17:12:10.154478 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.155022 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m17:12:10.156671 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m17:12:10.157679 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m17:12:10.158190 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m17:12:10.161867 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.164014 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m17:12:10.165024 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020274943E60>]}
[0m17:12:10.166892 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.02s]
[0m17:12:10.167976 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m17:12:10.168411 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m17:12:10.170153 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m17:12:10.170153 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m17:12:10.171552 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m17:12:10.172155 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m17:12:10.227707 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m17:12:10.228716 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m17:12:10.228716 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.229222 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.229222 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m17:12:10.229222 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m17:12:10.230228 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.231236 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m17:12:10.231236 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m17:12:10.233987 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.233987 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m17:12:10.235490 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m17:12:10.237043 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m17:12:10.237043 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m17:12:10.237598 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.239155 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m17:12:10.239155 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020209E7F440>]}
[0m17:12:10.239155 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.07s]
[0m17:12:10.240166 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m17:12:10.241163 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m17:12:10.241163 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m17:12:10.241669 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m17:12:10.242173 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m17:12:10.242173 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m17:12:10.245384 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m17:12:10.245384 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m17:12:10.245384 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.246394 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.246903 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m17:12:10.246903 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m17:12:10.247914 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.248437 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m17:12:10.249445 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m17:12:10.250702 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.251212 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m17:12:10.253745 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m17:12:10.253745 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m17:12:10.254741 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m17:12:10.256382 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.256382 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m17:12:10.257948 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020209E46330>]}
[0m17:12:10.257948 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.02s]
[0m17:12:10.257948 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m17:12:10.259544 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m17:12:10.259544 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m17:12:10.259544 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m17:12:10.260550 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m17:12:10.260550 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m17:12:10.264079 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m17:12:10.264079 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m17:12:10.264587 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.265094 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.265094 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m17:12:10.265094 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m17:12:10.266105 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.267305 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m17:12:10.267305 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m17:12:10.268516 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.268516 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m17:12:10.271561 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m17:12:10.271561 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m17:12:10.272158 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m17:12:10.273337 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.273856 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m17:12:10.273856 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202743259A0>]}
[0m17:12:10.273856 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.01s]
[0m17:12:10.275424 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m17:12:10.275424 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m17:12:10.276434 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m17:12:10.276434 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m17:12:10.276434 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m17:12:10.276434 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m17:12:10.280044 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m17:12:10.281508 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m17:12:10.281508 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.282518 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.282518 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m17:12:10.283026 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m17:12:10.283533 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.283533 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m17:12:10.283533 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m17:12:10.286783 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.287347 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m17:12:10.289158 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m17:12:10.289158 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m17:12:10.290456 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m17:12:10.291449 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.291962 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m17:12:10.291962 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020273F0A930>]}
[0m17:12:10.293572 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.02s]
[0m17:12:10.294396 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m17:12:10.294993 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m17:12:10.294993 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m17:12:10.295569 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m17:12:10.296235 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m17:12:10.296235 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m17:12:10.299286 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m17:12:10.299906 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m17:12:10.299906 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.301191 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.302207 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m17:12:10.302207 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m17:12:10.303293 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.304802 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m17:12:10.304802 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m17:12:10.306352 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.306352 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m17:12:10.307939 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m17:12:10.309465 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m17:12:10.309465 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m17:12:10.310474 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.311987 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m17:12:10.311987 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202745AE3F0>]}
[0m17:12:10.312642 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.02s]
[0m17:12:10.313219 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m17:12:10.313219 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m17:12:10.313762 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m17:12:10.313762 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m17:12:10.314772 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m17:12:10.314772 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m17:12:10.317850 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m17:12:10.317850 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m17:12:10.318431 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.318431 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.318431 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m17:12:10.318431 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m17:12:10.319441 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.320438 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m17:12:10.321024 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m17:12:10.322067 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.322648 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m17:12:10.324193 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m17:12:10.324193 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m17:12:10.324193 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m17:12:10.325713 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.326953 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m17:12:10.327953 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202740B8080>]}
[0m17:12:10.328463 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.01s]
[0m17:12:10.329475 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m17:12:10.329475 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m17:12:10.330473 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m17:12:10.330983 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m17:12:10.331507 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m17:12:10.337138 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m17:12:10.339269 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m17:12:10.352922 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m17:12:10.354437 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m17:12:10.354437 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m17:12:10.355449 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.355991 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.355991 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m17:12:10.356631 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.357559 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.358258 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m17:12:10.359956 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m17:12:10.359956 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m17:12:10.359956 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.03s]
[0m17:12:10.361519 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m17:12:10.362074 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m17:12:10.362074 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m17:12:10.362754 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m17:12:10.362754 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m17:12:10.366481 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m17:12:10.367529 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m17:12:10.368615 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m17:12:10.370394 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m17:12:10.371037 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m17:12:10.371037 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.371564 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.372194 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m17:12:10.372194 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.372925 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.374519 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m17:12:10.374519 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m17:12:10.375553 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m17:12:10.375553 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.01s]
[0m17:12:10.376596 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m17:12:10.376596 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m17:12:10.377145 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m17:12:10.377145 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m17:12:10.377145 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m17:12:10.382440 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m17:12:10.383482 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m17:12:10.385684 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m17:12:10.385684 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m17:12:10.385684 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m17:12:10.385684 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.387324 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.387324 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m17:12:10.388374 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m17:12:10.390486 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m17:12:10.392076 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m17:12:10.392076 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m17:12:10.393735 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m17:12:10.393735 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.02s]
[0m17:12:10.394423 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m17:12:10.395114 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m17:12:10.395114 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m17:12:10.395762 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m17:12:10.396383 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m17:12:10.397936 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m17:12:10.399572 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m17:12:10.401622 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m17:12:10.402172 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m17:12:10.403216 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m17:12:10.403216 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.403216 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.403216 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m17:12:10.404723 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.404723 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.406361 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m17:12:10.406361 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m17:12:10.406361 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m17:12:10.408050 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.01s]
[0m17:12:10.408050 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m17:12:10.408050 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m17:12:10.408050 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m17:12:10.409835 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m17:12:10.409835 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m17:12:10.413225 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m17:12:10.414027 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m17:12:10.418028 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m17:12:10.418705 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m17:12:10.418705 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m17:12:10.418705 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.418705 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.420504 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m17:12:10.420504 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.422872 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.424456 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m17:12:10.424456 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m17:12:10.425501 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m17:12:10.425501 [info ] [Thread-1 (]: 26 of 97 PASS relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[32mPASS[0m in 0.02s]
[0m17:12:10.426559 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m17:12:10.426559 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m17:12:10.426559 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m17:12:10.428099 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m17:12:10.428099 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m17:12:10.430561 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m17:12:10.431605 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m17:12:10.434191 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m17:12:10.435217 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m17:12:10.435779 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m17:12:10.435779 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.435779 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.437331 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m17:12:10.437331 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m17:12:10.438977 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.440023 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m17:12:10.440023 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m17:12:10.441572 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m17:12:10.442131 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.02s]
[0m17:12:10.442131 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m17:12:10.442131 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m17:12:10.443186 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m17:12:10.443732 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m17:12:10.443732 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m17:12:10.446360 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m17:12:10.448035 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m17:12:10.450407 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m17:12:10.451983 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m17:12:10.451983 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m17:12:10.453556 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.453556 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.454637 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m17:12:10.454637 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.455186 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.456454 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m17:12:10.457495 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m17:12:10.457495 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m17:12:10.458048 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.01s]
[0m17:12:10.458048 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m17:12:10.458048 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m17:12:10.458048 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m17:12:10.458048 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m17:12:10.459678 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m17:12:10.462571 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m17:12:10.463253 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m17:12:10.465877 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m17:12:10.467229 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m17:12:10.467229 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m17:12:10.467229 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.467880 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.468536 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m17:12:10.468536 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m17:12:10.470188 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.471228 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m17:12:10.472266 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m17:12:10.472266 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m17:12:10.472266 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.01s]
[0m17:12:10.472266 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m17:12:10.473880 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m17:12:10.473880 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m17:12:10.473880 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m17:12:10.473880 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m17:12:10.478147 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m17:12:10.478847 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m17:12:10.481260 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m17:12:10.481998 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m17:12:10.481998 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m17:12:10.483025 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.483025 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.483025 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m17:12:10.483025 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.484089 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.485586 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m17:12:10.485586 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m17:12:10.485586 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m17:12:10.487131 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.01s]
[0m17:12:10.488140 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m17:12:10.488685 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m17:12:10.489216 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m17:12:10.489742 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m17:12:10.489742 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m17:12:10.493381 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m17:12:10.494900 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m17:12:10.497160 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m17:12:10.498105 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m17:12:10.498105 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m17:12:10.498105 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.499335 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.499992 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m17:12:10.499992 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.501557 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.503094 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m17:12:10.503094 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m17:12:10.503094 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m17:12:10.503094 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.01s]
[0m17:12:10.504601 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m17:12:10.504601 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m17:12:10.505666 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m17:12:10.506205 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m17:12:10.506205 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m17:12:10.509903 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m17:12:10.511144 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m17:12:10.514086 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m17:12:10.515134 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m17:12:10.516098 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m17:12:10.516098 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.516605 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.516605 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m17:12:10.517239 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.520086 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.521174 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m17:12:10.522194 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m17:12:10.522701 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m17:12:10.522701 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m17:12:10.524326 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m17:12:10.524326 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m17:12:10.525340 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m17:12:10.525895 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m17:12:10.526938 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m17:12:10.531348 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m17:12:10.532410 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m17:12:10.534931 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m17:12:10.535548 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m17:12:10.535548 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m17:12:10.535548 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.537260 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.537260 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m17:12:10.538323 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.544910 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m17:12:10.545488 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m17:12:10.546498 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m17:12:10.546498 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m17:12:10.546498 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m17:12:10.548182 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m17:12:10.549194 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m17:12:10.549194 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m17:12:10.549702 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m17:12:10.549702 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m17:12:10.552777 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m17:12:10.554808 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m17:12:10.556440 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m17:12:10.558030 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m17:12:10.558030 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m17:12:10.559651 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.561700 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.562340 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m17:12:10.563099 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.564121 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.567460 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m17:12:10.569054 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m17:12:10.569054 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m17:12:10.570081 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.02s]
[0m17:12:10.572274 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m17:12:10.573289 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m17:12:10.574289 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m17:12:10.575353 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m17:12:10.575946 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m17:12:10.578761 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m17:12:10.578761 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m17:12:10.581397 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m17:12:10.583536 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m17:12:10.583536 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m17:12:10.583536 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.585045 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.585045 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m17:12:10.585636 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.588730 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.589847 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m17:12:10.591516 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m17:12:10.591516 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m17:12:10.592032 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m17:12:10.592032 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m17:12:10.592032 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m17:12:10.593616 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m17:12:10.594191 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m17:12:10.594842 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m17:12:10.599621 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m17:12:10.601137 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m17:12:10.603204 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m17:12:10.604204 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m17:12:10.604719 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m17:12:10.604719 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.604719 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.604719 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m17:12:10.604719 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.608402 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.609923 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m17:12:10.609923 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m17:12:10.609923 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m17:12:10.611439 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m17:12:10.611958 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m17:12:10.612581 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m17:12:10.612581 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m17:12:10.613170 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m17:12:10.613740 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m17:12:10.617401 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m17:12:10.618550 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m17:12:10.620127 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m17:12:10.622150 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m17:12:10.622724 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m17:12:10.622724 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.622724 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.624052 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m17:12:10.624052 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.627685 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m17:12:10.628695 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m17:12:10.628695 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m17:12:10.630697 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m17:12:10.631220 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m17:12:10.631775 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m17:12:10.632324 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m17:12:10.632902 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m17:12:10.632902 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m17:12:10.633910 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m17:12:10.637009 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m17:12:10.637613 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m17:12:10.639239 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m17:12:10.640248 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m17:12:10.641253 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m17:12:10.641253 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.641767 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.641767 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m17:12:10.641767 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.641767 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.644365 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m17:12:10.644971 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m17:12:10.645562 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m17:12:10.646130 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.01s]
[0m17:12:10.647142 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m17:12:10.647142 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m17:12:10.647142 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m17:12:10.648140 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m17:12:10.648140 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m17:12:10.651236 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m17:12:10.652860 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m17:12:10.654569 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m17:12:10.655579 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m17:12:10.656086 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m17:12:10.656086 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.656642 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.656642 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m17:12:10.656642 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.658158 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.658158 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m17:12:10.659711 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m17:12:10.659711 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m17:12:10.659711 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.01s]
[0m17:12:10.661230 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m17:12:10.661745 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m17:12:10.662321 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m17:12:10.662321 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m17:12:10.662893 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m17:12:10.667535 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m17:12:10.668677 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m17:12:10.675226 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m17:12:10.675226 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m17:12:10.676544 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m17:12:10.676544 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.676544 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.677747 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m17:12:10.677747 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.680332 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.681339 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m17:12:10.682410 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m17:12:10.682410 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m17:12:10.682410 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m17:12:10.683423 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m17:12:10.684420 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m17:12:10.684420 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m17:12:10.685591 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m17:12:10.685591 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m17:12:10.689785 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m17:12:10.690296 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m17:12:10.692830 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m17:12:10.694867 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m17:12:10.695472 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m17:12:10.696043 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.696043 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.697051 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m17:12:10.697051 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.699515 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m17:12:10.702030 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m17:12:10.702030 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m17:12:10.702030 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m17:12:10.703521 [info ] [Thread-1 (]: 41 of 97 PASS relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m17:12:10.704529 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m17:12:10.704529 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m17:12:10.704529 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m17:12:10.705542 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m17:12:10.706049 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m17:12:10.709743 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m17:12:10.709743 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m17:12:10.713142 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m17:12:10.713730 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m17:12:10.713730 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m17:12:10.714737 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.714737 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.714737 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m17:12:10.714737 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.716821 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.717902 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m17:12:10.718515 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m17:12:10.720088 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m17:12:10.720088 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.01s]
[0m17:12:10.720088 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m17:12:10.721626 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m17:12:10.722191 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m17:12:10.722751 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m17:12:10.722751 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m17:12:10.726806 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m17:12:10.728839 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m17:12:10.731691 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m17:12:10.732940 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m17:12:10.733958 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m17:12:10.734471 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.734980 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.735658 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m17:12:10.735658 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.735658 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.737269 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m17:12:10.738835 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m17:12:10.738835 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m17:12:10.738835 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.02s]
[0m17:12:10.739845 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m17:12:10.739845 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m17:12:10.739845 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m17:12:10.739845 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m17:12:10.741351 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m17:12:10.745590 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m17:12:10.746149 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m17:12:10.748671 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m17:12:10.749754 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m17:12:10.749754 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m17:12:10.749754 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.749754 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.749754 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m17:12:10.751281 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.752811 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.754330 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m17:12:10.754330 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m17:12:10.755911 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m17:12:10.755911 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m17:12:10.756488 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m17:12:10.756488 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m17:12:10.757497 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m17:12:10.757497 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m17:12:10.758058 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m17:12:10.762664 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m17:12:10.763898 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m17:12:10.766423 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m17:12:10.767995 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m17:12:10.768604 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m17:12:10.768604 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.768604 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.770126 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m17:12:10.770126 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.772509 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m17:12:10.774082 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m17:12:10.775596 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m17:12:10.775596 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m17:12:10.776728 [info ] [Thread-1 (]: 45 of 97 PASS relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m17:12:10.776728 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m17:12:10.777727 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m17:12:10.778232 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m17:12:10.778744 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m17:12:10.778744 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m17:12:10.782521 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m17:12:10.783563 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m17:12:10.785108 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m17:12:10.785947 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m17:12:10.786957 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m17:12:10.786957 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.787463 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.787463 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m17:12:10.787463 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.789075 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.790661 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m17:12:10.791675 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m17:12:10.791675 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m17:12:10.792226 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.01s]
[0m17:12:10.793849 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m17:12:10.794401 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m17:12:10.795068 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m17:12:10.795823 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m17:12:10.795823 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m17:12:10.799215 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m17:12:10.799763 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m17:12:10.801905 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m17:12:10.802964 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m17:12:10.804478 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m17:12:10.804478 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.804478 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.805528 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m17:12:10.805528 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.806708 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.807761 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m17:12:10.808311 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m17:12:10.808311 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m17:12:10.808311 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.01s]
[0m17:12:10.810092 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m17:12:10.810092 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m17:12:10.810092 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m17:12:10.811666 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m17:12:10.812337 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m17:12:10.817332 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m17:12:10.818643 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m17:12:10.820410 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m17:12:10.821579 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m17:12:10.821579 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m17:12:10.822198 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.822856 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.822856 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m17:12:10.822856 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.827084 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m17:12:10.828644 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m17:12:10.828644 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m17:12:10.830303 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m17:12:10.830303 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m17:12:10.831344 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m17:12:10.831344 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m17:12:10.831890 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m17:12:10.832543 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m17:12:10.832543 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m17:12:10.835818 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m17:12:10.837403 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m17:12:10.840093 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m17:12:10.842185 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m17:12:10.843193 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m17:12:10.843193 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.843743 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.844290 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m17:12:10.844290 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.850057 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m17:12:10.852189 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m17:12:10.853237 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m17:12:10.853237 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m17:12:10.854870 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m17:12:10.854870 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m17:12:10.855916 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m17:12:10.856455 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m17:12:10.856455 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m17:12:10.856455 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m17:12:10.859680 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m17:12:10.859680 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m17:12:10.862819 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m17:12:10.863936 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m17:12:10.864483 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m17:12:10.864483 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.864483 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.864483 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m17:12:10.866043 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.866721 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.867473 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m17:12:10.868521 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m17:12:10.869056 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m17:12:10.869056 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.01s]
[0m17:12:10.870101 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m17:12:10.870101 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m17:12:10.870101 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m17:12:10.870101 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m17:12:10.871659 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m17:12:10.873886 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m17:12:10.875625 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m17:12:10.877672 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m17:12:10.878759 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m17:12:10.878759 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m17:12:10.878759 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.878759 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.878759 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m17:12:10.880432 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.880432 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.881492 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m17:12:10.883079 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m17:12:10.883079 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m17:12:10.883079 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.01s]
[0m17:12:10.884117 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m17:12:10.884117 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m17:12:10.884117 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m17:12:10.885117 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m17:12:10.885654 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m17:12:10.890102 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m17:12:10.890651 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m17:12:10.893299 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m17:12:10.894409 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m17:12:10.894944 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m17:12:10.894944 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.894944 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.895984 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m17:12:10.895984 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.897026 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.899175 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m17:12:10.899822 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m17:12:10.901405 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m17:12:10.901962 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m17:12:10.901962 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m17:12:10.901962 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m17:12:10.901962 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m17:12:10.903517 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m17:12:10.903517 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m17:12:10.906336 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m17:12:10.908001 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m17:12:10.909815 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m17:12:10.911371 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m17:12:10.911371 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m17:12:10.911931 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.912610 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.912610 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m17:12:10.913284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.915060 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.916597 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m17:12:10.917237 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m17:12:10.917237 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m17:12:10.917917 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.01s]
[0m17:12:10.917917 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m17:12:10.918593 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m17:12:10.918593 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m17:12:10.918593 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m17:12:10.918593 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m17:12:10.923961 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m17:12:10.925550 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m17:12:10.926610 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m17:12:10.928816 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m17:12:10.928816 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m17:12:10.929748 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.930256 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.930256 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m17:12:10.930256 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.931294 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.932578 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m17:12:10.932578 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m17:12:10.932578 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m17:12:10.934133 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.01s]
[0m17:12:10.934133 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m17:12:10.934133 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m17:12:10.935176 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m17:12:10.935725 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m17:12:10.935725 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m17:12:10.938960 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m17:12:10.940012 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m17:12:10.941568 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m17:12:10.942141 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m17:12:10.942141 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m17:12:10.942141 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.943764 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.944370 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m17:12:10.944370 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.945075 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.946348 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m17:12:10.947393 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m17:12:10.947942 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m17:12:10.947942 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.01s]
[0m17:12:10.947942 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m17:12:10.947942 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m17:12:10.949738 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m17:12:10.949738 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m17:12:10.949738 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m17:12:10.954473 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m17:12:10.955520 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m17:12:10.957662 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m17:12:10.958203 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m17:12:10.958203 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m17:12:10.958203 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.959836 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:10.959836 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m17:12:10.959836 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.962718 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.964071 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m17:12:10.965119 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m17:12:10.965119 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m17:12:10.965119 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m17:12:10.966119 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m17:12:10.966119 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m17:12:10.966673 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m17:12:10.967336 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m17:12:10.967336 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m17:12:10.970857 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m17:12:10.971988 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m17:12:10.973914 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m17:12:10.975578 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m17:12:10.975578 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m17:12:10.976588 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.977124 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.977124 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m17:12:10.977124 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.980376 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:10.981431 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m17:12:10.982512 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m17:12:10.982512 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m17:12:10.982512 [info ] [Thread-1 (]: 57 of 97 PASS relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m17:12:10.983548 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m17:12:10.983548 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m17:12:10.983548 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m17:12:10.983548 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m17:12:10.985098 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m17:12:10.987754 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m17:12:10.988809 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m17:12:10.990373 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m17:12:10.991938 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m17:12:10.991938 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m17:12:10.991938 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:10.991938 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.991938 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m17:12:10.991938 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m17:12:10.994240 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:10.994883 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m17:12:10.995584 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m17:12:10.995584 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m17:12:10.996645 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.01s]
[0m17:12:10.996645 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m17:12:10.996645 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m17:12:10.996645 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m17:12:10.998345 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m17:12:10.998345 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m17:12:11.003091 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m17:12:11.003091 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m17:12:11.005667 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m17:12:11.006828 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m17:12:11.006828 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m17:12:11.006828 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:11.007880 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.008429 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m17:12:11.008429 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:11.008429 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.009980 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m17:12:11.011539 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m17:12:11.012095 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m17:12:11.012095 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.01s]
[0m17:12:11.012743 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m17:12:11.012743 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m17:12:11.013800 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m17:12:11.014342 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m17:12:11.014342 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m17:12:11.017946 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m17:12:11.018515 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m17:12:11.020168 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m17:12:11.022055 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m17:12:11.022680 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m17:12:11.022680 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:11.022680 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.022680 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m17:12:11.022680 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:11.025805 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:11.027844 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m17:12:11.028398 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m17:12:11.028950 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m17:12:11.028950 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m17:12:11.028950 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m17:12:11.028950 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m17:12:11.028950 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m17:12:11.030643 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m17:12:11.031238 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m17:12:11.035843 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m17:12:11.037439 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m17:12:11.039027 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m17:12:11.040072 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m17:12:11.040072 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m17:12:11.040072 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:11.041344 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.041344 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m17:12:11.041901 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:11.047127 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m17:12:11.048683 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m17:12:11.049225 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m17:12:11.049921 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m17:12:11.049921 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m17:12:11.049921 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m17:12:11.049921 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m17:12:11.051468 [info ] [Thread-1 (]: 62 of 97 START sql table model main.dim_atividade .............................. [RUN]
[0m17:12:11.052037 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m17:12:11.052037 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m17:12:11.054569 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m17:12:11.055597 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m17:12:11.058230 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m17:12:11.059787 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m17:12:11.059787 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m17:12:11.059787 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:11.061348 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.061912 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m17:12:11.061912 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m17:12:11.062600 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.064735 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m17:12:11.064735 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m17:12:11.064735 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.066241 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m17:12:11.066798 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m17:12:11.066798 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m17:12:11.067900 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.071575 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m17:12:11.072081 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m17:12:11.072395 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.072902 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m17:12:11.073912 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020209E49DF0>]}
[0m17:12:11.893393 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m17:12:11.896187 [info ] [Thread-1 (]: 62 of 97 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.02s]
[0m17:12:11.896187 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m17:12:11.897246 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m17:12:11.897246 [info ] [Thread-1 (]: 63 of 97 START sql table model main.dim_classe_instituicao ..................... [RUN]
[0m17:12:11.897246 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m17:12:11.898235 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m17:12:11.900005 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m17:12:11.901570 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m17:12:11.903170 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m17:12:11.904758 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m17:12:11.904758 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m17:12:11.904758 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:11.904758 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.905773 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m17:12:11.905773 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m17:12:11.906283 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.908765 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m17:12:11.909776 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m17:12:11.910284 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.911296 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m17:12:11.911296 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m17:12:11.911820 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m17:12:11.913155 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.914974 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m17:12:11.914974 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m17:12:11.916536 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.917588 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m17:12:11.918132 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002027498D9A0>]}
[0m17:12:11.918674 [info ] [Thread-1 (]: 63 of 97 OK created sql table model main.dim_classe_instituicao ................ [[32mOK[0m in 0.02s]
[0m17:12:11.918674 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m17:12:11.918674 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m17:12:11.920315 [info ] [Thread-1 (]: 64 of 97 START sql table model main.dim_consolidado ............................ [RUN]
[0m17:12:11.921383 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m17:12:11.922428 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m17:12:11.925253 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m17:12:11.926312 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m17:12:11.930386 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m17:12:11.931992 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m17:12:11.931992 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m17:12:11.932544 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:11.933574 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.933574 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m17:12:11.933574 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m17:12:11.935851 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.937585 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m17:12:11.939298 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m17:12:11.939298 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.940343 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m17:12:11.941343 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m17:12:11.941343 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m17:12:11.942434 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.944581 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m17:12:11.944581 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m17:12:11.945641 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.946192 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m17:12:11.946192 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020274954CB0>]}
[0m17:12:11.947239 [info ] [Thread-1 (]: 64 of 97 OK created sql table model main.dim_consolidado ....................... [[32mOK[0m in 0.02s]
[0m17:12:11.948244 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m17:12:11.948244 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m17:12:11.948795 [info ] [Thread-1 (]: 65 of 97 START sql table model main.dim_controle ............................... [RUN]
[0m17:12:11.949336 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m17:12:11.950118 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m17:12:11.952768 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m17:12:11.953768 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m17:12:11.956520 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m17:12:11.957569 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m17:12:11.958105 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m17:12:11.958105 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:11.958105 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.958105 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m17:12:11.958105 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m17:12:11.959689 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.962676 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m17:12:11.962676 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m17:12:11.963490 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.964159 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m17:12:11.964159 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m17:12:11.965201 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m17:12:11.966221 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.967585 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m17:12:11.967585 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m17:12:11.968628 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.969165 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m17:12:11.970210 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002027433B650>]}
[0m17:12:11.970210 [info ] [Thread-1 (]: 65 of 97 OK created sql table model main.dim_controle .......................... [[32mOK[0m in 0.02s]
[0m17:12:11.971259 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m17:12:11.971259 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m17:12:11.972315 [info ] [Thread-1 (]: 66 of 97 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m17:12:11.972857 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m17:12:11.973927 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m17:12:11.976657 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m17:12:11.978203 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m17:12:11.981487 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m17:12:11.982676 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m17:12:11.983222 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m17:12:11.983222 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:11.983222 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.984261 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m17:12:11.984261 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m17:12:11.985825 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.987560 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m17:12:11.987560 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m17:12:11.987560 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.989342 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m17:12:11.989342 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m17:12:11.989342 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m17:12:11.990912 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:11.992095 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m17:12:11.992095 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m17:12:11.992095 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:11.994615 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m17:12:11.994615 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020209E7C260>]}
[0m17:12:11.994615 [info ] [Thread-1 (]: 66 of 97 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.02s]
[0m17:12:11.996214 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m17:12:11.996214 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m17:12:11.996214 [info ] [Thread-1 (]: 67 of 97 START sql table model main.dim_porte .................................. [RUN]
[0m17:12:11.997276 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m17:12:11.997276 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m17:12:12.000086 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m17:12:12.000086 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m17:12:12.004768 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m17:12:12.005819 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m17:12:12.005819 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m17:12:12.005819 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.006473 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.006473 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m17:12:12.006473 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m17:12:12.008137 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.011941 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m17:12:12.011941 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m17:12:12.013013 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.013013 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m17:12:12.014066 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m17:12:12.014066 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m17:12:12.014626 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.016736 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m17:12:12.016736 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m17:12:12.017398 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.018146 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m17:12:12.018146 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020274965C10>]}
[0m17:12:12.019182 [info ] [Thread-1 (]: 67 of 97 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.02s]
[0m17:12:12.020191 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m17:12:12.020191 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m17:12:12.020744 [info ] [Thread-1 (]: 68 of 97 START sql table model main.dim_produto_credito ........................ [RUN]
[0m17:12:12.021327 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m17:12:12.021327 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m17:12:12.024500 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m17:12:12.025548 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m17:12:12.027144 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m17:12:12.028733 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m17:12:12.028733 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m17:12:12.028733 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.028733 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.030358 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m17:12:12.030358 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m17:12:12.031411 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.034076 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m17:12:12.034076 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m17:12:12.035075 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.035616 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m17:12:12.035616 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m17:12:12.035616 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m17:12:12.037256 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.038933 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m17:12:12.039979 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m17:12:12.039979 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.042141 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m17:12:12.042141 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020274964FE0>]}
[0m17:12:12.042141 [info ] [Thread-1 (]: 68 of 97 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.02s]
[0m17:12:12.043827 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m17:12:12.043827 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m17:12:12.044623 [info ] [Thread-1 (]: 69 of 97 START sql table model main.dim_regiao ................................. [RUN]
[0m17:12:12.045662 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m17:12:12.046210 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m17:12:12.048257 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m17:12:12.049355 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m17:12:12.051561 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m17:12:12.052124 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m17:12:12.053134 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m17:12:12.053134 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.053134 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.053134 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m17:12:12.053134 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m17:12:12.054641 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.059640 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m17:12:12.059640 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m17:12:12.059640 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.061197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m17:12:12.061769 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m17:12:12.061769 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m17:12:12.062581 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.064819 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m17:12:12.064819 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m17:12:12.064819 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.066374 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m17:12:12.066374 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002020A28F350>]}
[0m17:12:12.066374 [info ] [Thread-1 (]: 69 of 97 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.02s]
[0m17:12:12.067429 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m17:12:12.068009 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m17:12:12.068009 [info ] [Thread-1 (]: 70 of 97 START sql table model main.dim_risco .................................. [RUN]
[0m17:12:12.068765 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m17:12:12.068765 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m17:12:12.071210 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m17:12:12.072819 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m17:12:12.075394 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m17:12:12.075945 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m17:12:12.075945 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m17:12:12.075945 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.076989 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.076989 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m17:12:12.076989 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m17:12:12.077985 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.080223 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m17:12:12.080785 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m17:12:12.080785 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.081983 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m17:12:12.081983 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m17:12:12.082636 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m17:12:12.083685 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.085238 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m17:12:12.086283 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m17:12:12.086825 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.087511 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m17:12:12.087511 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202749C4CE0>]}
[0m17:12:12.087511 [info ] [Thread-1 (]: 70 of 97 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.02s]
[0m17:12:12.089155 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m17:12:12.089155 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m17:12:12.089155 [info ] [Thread-1 (]: 71 of 97 START sql table model main.dim_segmento ............................... [RUN]
[0m17:12:12.090191 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m17:12:12.090191 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m17:12:12.092843 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m17:12:12.094401 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m17:12:12.096792 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m17:12:12.098502 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m17:12:12.098502 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m17:12:12.098502 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.099146 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.099146 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m17:12:12.099813 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m17:12:12.099813 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.102978 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m17:12:12.102978 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m17:12:12.104518 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.106128 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m17:12:12.106128 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m17:12:12.106841 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m17:12:12.107957 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.109609 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m17:12:12.111157 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m17:12:12.111708 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.112341 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m17:12:12.112973 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002020A2A1F10>]}
[0m17:12:12.112973 [info ] [Thread-1 (]: 71 of 97 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.02s]
[0m17:12:12.114015 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m17:12:12.114015 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m17:12:12.114558 [info ] [Thread-1 (]: 72 of 97 START test not_null_dim_classe_instituicao_id_classe .................. [RUN]
[0m17:12:12.114558 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m17:12:12.114558 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m17:12:12.118708 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m17:12:12.120307 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m17:12:12.122987 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m17:12:12.125175 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m17:12:12.125175 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m17:12:12.125175 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.126223 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.126223 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m17:12:12.127772 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m17:12:12.127772 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.129394 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m17:12:12.130483 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m17:12:12.130483 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m17:12:12.131175 [info ] [Thread-1 (]: 72 of 97 PASS not_null_dim_classe_instituicao_id_classe ........................ [[32mPASS[0m in 0.02s]
[0m17:12:12.131866 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m17:12:12.132460 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m17:12:12.132460 [info ] [Thread-1 (]: 73 of 97 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m17:12:12.132460 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m17:12:12.133495 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m17:12:12.137323 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m17:12:12.138333 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m17:12:12.139902 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m17:12:12.139902 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m17:12:12.141410 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m17:12:12.141410 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.141970 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.141970 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m17:12:12.141970 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:12.143559 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.145610 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m17:12:12.146224 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m17:12:12.146224 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m17:12:12.147231 [info ] [Thread-1 (]: 73 of 97 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.01s]
[0m17:12:12.147231 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m17:12:12.147231 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m17:12:12.148234 [info ] [Thread-1 (]: 74 of 97 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m17:12:12.148741 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m17:12:12.149246 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m17:12:12.152879 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m17:12:12.154453 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m17:12:12.158485 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m17:12:12.159495 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m17:12:12.159495 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m17:12:12.160001 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.160001 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.160001 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m17:12:12.160001 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m17:12:12.162706 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.163351 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m17:12:12.163947 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m17:12:12.164965 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m17:12:12.166472 [info ] [Thread-1 (]: 74 of 97 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.02s]
[0m17:12:12.167532 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m17:12:12.167532 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m17:12:12.168822 [info ] [Thread-1 (]: 75 of 97 START test not_null_dim_consolidado_id_consolidado .................... [RUN]
[0m17:12:12.168822 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m17:12:12.168822 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m17:12:12.172816 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m17:12:12.173871 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m17:12:12.175456 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m17:12:12.176577 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m17:12:12.176577 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m17:12:12.176577 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.176577 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.176577 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m17:12:12.178124 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m17:12:12.178839 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.180526 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m17:12:12.180526 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m17:12:12.180526 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m17:12:12.181934 [info ] [Thread-1 (]: 75 of 97 PASS not_null_dim_consolidado_id_consolidado .......................... [[32mPASS[0m in 0.01s]
[0m17:12:12.182535 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m17:12:12.182535 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m17:12:12.182535 [info ] [Thread-1 (]: 76 of 97 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m17:12:12.184055 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m17:12:12.184055 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m17:12:12.188801 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m17:12:12.189810 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m17:12:12.191840 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m17:12:12.191840 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m17:12:12.193472 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m17:12:12.193472 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.193472 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.193472 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m17:12:12.193472 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:12.195827 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.196548 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m17:12:12.196548 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m17:12:12.198314 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m17:12:12.198314 [info ] [Thread-1 (]: 76 of 97 PASS relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[32mPASS[0m in 0.02s]
[0m17:12:12.199324 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m17:12:12.199324 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m17:12:12.199830 [info ] [Thread-1 (]: 77 of 97 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m17:12:12.199830 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m17:12:12.199830 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m17:12:12.202881 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m17:12:12.204391 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m17:12:12.206351 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m17:12:12.207973 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m17:12:12.207973 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m17:12:12.207973 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.207973 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.207973 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m17:12:12.209614 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m17:12:12.209614 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.211773 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m17:12:12.213104 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m17:12:12.213104 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m17:12:12.213104 [info ] [Thread-1 (]: 77 of 97 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.01s]
[0m17:12:12.214145 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m17:12:12.214145 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m17:12:12.214145 [info ] [Thread-1 (]: 78 of 97 START test not_null_dim_controle_id_controle .......................... [RUN]
[0m17:12:12.215621 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m17:12:12.216170 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m17:12:12.218517 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m17:12:12.220062 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m17:12:12.222158 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m17:12:12.222790 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m17:12:12.222790 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m17:12:12.222790 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.224353 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.224353 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m17:12:12.224353 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m17:12:12.225360 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.225360 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m17:12:12.226985 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m17:12:12.227996 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m17:12:12.228502 [info ] [Thread-1 (]: 78 of 97 PASS not_null_dim_controle_id_controle ................................ [[32mPASS[0m in 0.01s]
[0m17:12:12.228502 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m17:12:12.228502 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m17:12:12.228502 [info ] [Thread-1 (]: 79 of 97 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m17:12:12.230098 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m17:12:12.230098 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m17:12:12.233128 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m17:12:12.234131 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m17:12:12.235644 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m17:12:12.237318 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m17:12:12.237318 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m17:12:12.237318 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.237318 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.238903 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m17:12:12.238903 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:12.239964 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.241511 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m17:12:12.242088 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m17:12:12.242088 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m17:12:12.242088 [info ] [Thread-1 (]: 79 of 97 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.01s]
[0m17:12:12.243839 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m17:12:12.243839 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m17:12:12.244503 [info ] [Thread-1 (]: 80 of 97 START test unique_dim_controle_id_controle ............................ [RUN]
[0m17:12:12.244815 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m17:12:12.245549 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m17:12:12.248133 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m17:12:12.249267 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m17:12:12.253329 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m17:12:12.254881 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m17:12:12.254881 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m17:12:12.254881 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.254881 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.255954 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m17:12:12.256512 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m17:12:12.256512 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:12.258233 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m17:12:12.259593 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m17:12:12.259593 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m17:12:12.259593 [info ] [Thread-1 (]: 80 of 97 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.01s]
[0m17:12:12.260648 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m17:12:12.261184 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m17:12:12.261184 [info ] [Thread-1 (]: 81 of 97 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m17:12:12.261741 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m17:12:12.261741 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m17:12:12.265465 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m17:12:12.266011 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m17:12:12.269097 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m17:12:12.270144 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m17:12:12.270144 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m17:12:12.270144 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:12.271197 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:12.271197 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m17:12:12.271197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m17:12:13.295615 [debug] [Thread-1 (]: SQL status: OK in 1.024 seconds
[0m17:12:13.297316 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m17:12:13.298317 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m17:12:13.298900 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:13.299451 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m17:12:13.299451 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m17:12:13.299451 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m17:12:13.304715 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m17:12:13.306307 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m17:12:13.306307 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m17:12:13.306307 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:13.307953 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m17:12:13.307953 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002020A2D40E0>]}
[0m17:12:13.307953 [info ] [Thread-1 (]: 81 of 97 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 1.05s]
[0m17:12:13.309688 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m17:12:13.309688 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m17:12:13.309688 [info ] [Thread-1 (]: 82 of 97 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m17:12:13.309688 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m17:12:13.311273 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m17:12:13.314159 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m17:12:13.314712 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m17:12:13.317507 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m17:12:13.318516 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m17:12:13.318516 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m17:12:13.319058 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:13.319058 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:13.319058 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m17:12:13.319058 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m17:12:13.454640 [debug] [Thread-1 (]: SQL status: OK in 0.135 seconds
[0m17:12:13.456787 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m17:12:13.457836 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m17:12:13.458413 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:13.458970 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m17:12:13.459529 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m17:12:13.459529 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m17:12:13.463185 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m17:12:13.464774 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m17:12:13.464774 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m17:12:13.466319 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:13.466319 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m17:12:13.467369 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020274364B30>]}
[0m17:12:13.467916 [info ] [Thread-1 (]: 82 of 97 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.16s]
[0m17:12:13.467916 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m17:12:13.468627 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m17:12:13.468627 [info ] [Thread-1 (]: 83 of 97 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m17:12:13.468627 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m17:12:13.468627 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m17:12:13.472757 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m17:12:13.474321 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m17:12:13.476956 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m17:12:13.478537 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m17:12:13.478537 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m17:12:13.478537 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:13.478537 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:13.478537 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m17:12:13.480174 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m17:12:24.263883 [debug] [Thread-1 (]: SQL status: OK in 10.783 seconds
[0m17:12:24.265982 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m17:12:24.266570 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m17:12:24.266570 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:24.268182 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m17:12:24.268182 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m17:12:24.268182 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m17:12:24.390223 [debug] [Thread-1 (]: SQL status: OK in 0.122 seconds
[0m17:12:24.391805 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m17:12:24.391805 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m17:12:24.391805 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:24.393358 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m17:12:24.394393 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002027487EEA0>]}
[0m17:12:24.394393 [info ] [Thread-1 (]: 83 of 97 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 10.92s]
[0m17:12:24.394929 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m17:12:24.395636 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m17:12:24.395636 [info ] [Thread-1 (]: 84 of 97 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m17:12:24.396384 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m17:12:24.396384 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m17:12:24.399532 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m17:12:24.400591 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m17:12:24.402142 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m17:12:24.403727 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m17:12:24.404296 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m17:12:24.404296 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:24.404296 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:24.404296 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m17:12:24.404296 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m17:12:24.606270 [debug] [Thread-1 (]: SQL status: OK in 0.201 seconds
[0m17:12:24.608523 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m17:12:24.608523 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m17:12:24.609566 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:24.610110 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m17:12:24.610110 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m17:12:24.610110 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m17:12:24.620177 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m17:12:24.621974 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m17:12:24.621974 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m17:12:24.622673 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:24.623349 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m17:12:24.624410 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002020A261BE0>]}
[0m17:12:24.624410 [info ] [Thread-1 (]: 84 of 97 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.23s]
[0m17:12:24.624410 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m17:12:24.625465 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m17:12:24.626013 [info ] [Thread-1 (]: 85 of 97 START sql table model main.fato_risco_credito ......................... [RUN]
[0m17:12:24.626013 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m17:12:24.626013 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m17:12:24.629161 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m17:12:24.630206 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m17:12:24.633663 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m17:12:24.633663 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m17:12:24.633663 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m17:12:24.635205 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:24.635205 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:24.635205 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m17:12:24.635205 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m17:12:24.912158 [debug] [Thread-1 (]: SQL status: OK in 0.276 seconds
[0m17:12:24.914416 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m17:12:24.914416 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m17:12:24.914416 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:24.915953 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m17:12:24.916998 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m17:12:24.916998 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m17:12:24.952160 [debug] [Thread-1 (]: SQL status: OK in 0.035 seconds
[0m17:12:24.953689 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m17:12:24.954698 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m17:12:24.955287 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:24.955834 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m17:12:24.956603 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'a7e59cd8-aec3-4e27-9334-e910841ebaa2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002020A2FEF90>]}
[0m17:12:24.956603 [info ] [Thread-1 (]: 85 of 97 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.33s]
[0m17:12:24.957664 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m17:12:24.957664 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m17:12:24.958206 [info ] [Thread-1 (]: 86 of 97 START test not_null_dim_segmento_id_segmento .......................... [RUN]
[0m17:12:24.958206 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m17:12:24.958206 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m17:12:24.961378 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m17:12:24.962648 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m17:12:24.963881 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m17:12:24.964930 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m17:12:24.965931 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m17:12:24.965931 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:24.967294 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:24.967853 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m17:12:24.968498 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m17:12:24.968498 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:24.970076 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m17:12:24.972604 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m17:12:24.973233 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m17:12:24.973233 [info ] [Thread-1 (]: 86 of 97 PASS not_null_dim_segmento_id_segmento ................................ [[32mPASS[0m in 0.02s]
[0m17:12:24.974246 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m17:12:24.974246 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m17:12:24.975263 [info ] [Thread-1 (]: 87 of 97 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m17:12:24.975774 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m17:12:24.975774 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m17:12:24.981882 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m17:12:24.983997 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m17:12:24.987120 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m17:12:24.988740 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m17:12:24.990463 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m17:12:24.990463 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:24.991471 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:24.992045 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m17:12:24.992045 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:24.994994 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:24.997276 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m17:12:24.997276 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m17:12:24.998288 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m17:12:24.998288 [info ] [Thread-1 (]: 87 of 97 PASS relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[32mPASS[0m in 0.02s]
[0m17:12:24.999574 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m17:12:24.999574 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m17:12:25.000585 [info ] [Thread-1 (]: 88 of 97 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m17:12:25.000585 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m17:12:25.000585 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m17:12:25.004652 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m17:12:25.004652 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m17:12:25.007925 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m17:12:25.009458 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m17:12:25.009966 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m17:12:25.009966 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:25.010475 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:25.010475 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m17:12:25.011508 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m17:12:25.013838 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m17:12:25.014847 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m17:12:25.016367 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m17:12:25.016367 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m17:12:25.016367 [info ] [Thread-1 (]: 88 of 97 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.02s]
[0m17:12:25.017376 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m17:12:25.017974 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m17:12:25.018618 [info ] [Thread-1 (]: 89 of 97 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m17:12:25.018618 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m17:12:25.018618 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m17:12:25.025259 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m17:12:25.027797 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m17:12:25.030335 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m17:12:25.032191 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m17:12:25.032697 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m17:12:25.032697 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:25.033718 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:25.033718 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m17:12:25.033718 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:25.035228 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:25.036247 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m17:12:25.037249 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m17:12:25.037761 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m17:12:25.037761 [info ] [Thread-1 (]: 89 of 97 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.02s]
[0m17:12:25.038770 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m17:12:25.040428 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m17:12:25.040428 [info ] [Thread-1 (]: 90 of 97 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m17:12:25.041464 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m17:12:25.042031 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m17:12:25.046093 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m17:12:25.047103 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m17:12:25.049701 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m17:12:25.049701 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m17:12:25.051229 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m17:12:25.051229 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:25.051746 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:25.052268 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m17:12:25.052268 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:25.053283 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:25.054787 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m17:12:25.055798 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m17:12:25.055798 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m17:12:25.056445 [info ] [Thread-1 (]: 90 of 97 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.01s]
[0m17:12:25.056445 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m17:12:25.056445 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m17:12:25.056445 [info ] [Thread-1 (]: 91 of 97 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m17:12:25.058031 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m17:12:25.058031 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m17:12:25.060405 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m17:12:25.061921 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m17:12:25.063958 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m17:12:25.064967 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m17:12:25.065970 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m17:12:25.065970 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:25.066480 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:25.066480 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m17:12:25.066480 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m17:12:25.068017 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:25.068535 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m17:12:25.068535 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m17:12:25.070115 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m17:12:25.070700 [info ] [Thread-1 (]: 91 of 97 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.01s]
[0m17:12:25.071226 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m17:12:25.071226 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m17:12:25.071226 [info ] [Thread-1 (]: 92 of 97 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m17:12:25.072236 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m17:12:25.072236 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m17:12:25.075256 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m17:12:25.076381 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m17:12:25.078927 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m17:12:25.080531 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m17:12:25.081276 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m17:12:25.081276 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:25.081830 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:25.082431 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m17:12:25.082431 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:25.083440 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:25.083440 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m17:12:25.084946 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m17:12:25.085556 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m17:12:25.085556 [info ] [Thread-1 (]: 92 of 97 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.01s]
[0m17:12:25.085556 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m17:12:25.085556 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m17:12:25.087104 [info ] [Thread-1 (]: 93 of 97 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m17:12:25.087695 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m17:12:25.087695 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m17:12:25.091556 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m17:12:25.092079 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m17:12:25.095997 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m17:12:25.097006 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m17:12:25.098006 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m17:12:25.098006 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:25.098513 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:25.099018 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m17:12:25.099018 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:25.100148 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:25.101157 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m17:12:25.101664 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m17:12:25.102675 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m17:12:25.102675 [info ] [Thread-1 (]: 93 of 97 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.01s]
[0m17:12:25.103676 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m17:12:25.103676 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m17:12:25.103676 [info ] [Thread-1 (]: 94 of 97 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m17:12:25.104676 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m17:12:25.104676 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m17:12:25.108349 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m17:12:25.109362 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m17:12:25.111522 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m17:12:25.112670 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m17:12:25.112670 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m17:12:25.113394 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:25.113941 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:25.113941 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m17:12:25.113941 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m17:12:25.113941 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:25.115993 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m17:12:25.116533 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m17:12:25.116533 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m17:12:25.117549 [info ] [Thread-1 (]: 94 of 97 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.01s]
[0m17:12:25.118587 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m17:12:25.118587 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m17:12:25.118587 [info ] [Thread-1 (]: 95 of 97 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m17:12:25.118587 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m17:12:25.118587 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m17:12:25.125362 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m17:12:25.125874 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m17:12:25.127878 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m17:12:25.129012 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m17:12:25.129012 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m17:12:25.129012 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:25.129012 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:25.130655 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m17:12:25.130655 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m17:12:25.133904 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m17:12:25.134905 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m17:12:25.135417 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m17:12:25.135417 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m17:12:25.135417 [info ] [Thread-1 (]: 95 of 97 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.02s]
[0m17:12:25.136984 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m17:12:25.137645 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m17:12:25.137645 [info ] [Thread-1 (]: 96 of 97 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m17:12:25.138655 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m17:12:25.139163 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m17:12:25.142217 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m17:12:25.143226 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m17:12:25.144881 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m17:12:25.145996 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m17:12:25.145996 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m17:12:25.145996 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:25.147012 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:25.147012 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m17:12:25.147012 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m17:12:25.148003 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:25.149631 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m17:12:25.149631 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m17:12:25.149631 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m17:12:25.151160 [info ] [Thread-1 (]: 96 of 97 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.01s]
[0m17:12:25.151691 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m17:12:25.152210 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m17:12:25.152210 [info ] [Thread-1 (]: 97 of 97 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m17:12:25.152210 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m17:12:25.153218 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m17:12:25.156284 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m17:12:25.156284 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m17:12:25.158866 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m17:12:25.159876 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m17:12:25.159876 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m17:12:25.161396 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m17:12:25.161917 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m17:12:25.162528 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m17:12:25.162528 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m17:12:25.163139 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m17:12:25.163727 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m17:12:25.164735 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m17:12:25.164735 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m17:12:25.166242 [info ] [Thread-1 (]: 97 of 97 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.01s]
[0m17:12:25.166858 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m17:12:25.168560 [debug] [MainThread]: Using duckdb connection "master"
[0m17:12:25.168560 [debug] [MainThread]: On master: BEGIN
[0m17:12:25.169068 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m17:12:25.169068 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m17:12:25.169068 [debug] [MainThread]: On master: COMMIT
[0m17:12:25.170074 [debug] [MainThread]: Using duckdb connection "master"
[0m17:12:25.170074 [debug] [MainThread]: On master: COMMIT
[0m17:12:25.170074 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m17:12:25.170074 [debug] [MainThread]: On master: Close
[0m17:12:25.170074 [debug] [MainThread]: Connection 'master' was properly closed.
[0m17:12:25.170074 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m17:12:25.170074 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m17:12:25.171594 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m17:12:25.171594 [info ] [MainThread]: 
[0m17:12:25.172188 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 20.57 seconds (20.57s).
[0m17:12:25.181493 [debug] [MainThread]: Command end result
[0m17:12:25.214436 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m17:12:25.217355 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m17:12:25.225814 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m17:12:25.226827 [info ] [MainThread]: 
[0m17:12:25.227829 [info ] [MainThread]: [32mCompleted successfully[0m
[0m17:12:25.228348 [info ] [MainThread]: 
[0m17:12:25.228856 [info ] [MainThread]: Done. PASS=97 WARN=0 ERROR=0 SKIP=0 NO-OP=0 TOTAL=97
[0m17:12:25.228856 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 22 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m17:12:25.228856 [debug] [MainThread]: Command `dbt build` succeeded at 17:12:25.228856 after 24.66 seconds
[0m17:12:25.230412 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020271F6AC00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202726A4BC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000202725C4CE0>]}
[0m17:12:25.230412 [debug] [MainThread]: Flushing usage events
[0m17:12:25.978757 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m20:02:35.166815 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018285061760>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018285CA1850>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018285CA1C10>]}


============================== 20:02:35.172254 | 8ef54f9c-e875-43ea-a847-72e6c9ecbdad ==============================
[0m20:02:35.172254 [info ] [MainThread]: Running with dbt=1.11.5
[0m20:02:35.173883 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m20:02:35.459554 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000182852E41A0>]}
[0m20:02:35.507617 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018288710F50>]}
[0m20:02:35.549829 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m20:02:35.749918 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m20:02:35.939027 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
[0m20:02:35.939027 [debug] [MainThread]: Nothing changed, skipping partial parsing.
[0m20:02:35.939027 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
[0m20:02:35.944564 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m20:02:35.982815 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018287965F70>]}
[0m20:02:36.059575 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m20:02:36.062881 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m20:02:36.158923 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018289D26720>]}
[0m20:02:36.158923 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m20:02:36.165620 [info ] [MainThread]: 
[0m20:02:36.165999 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m20:02:36.166477 [info ] [MainThread]: 
[0m20:02:36.166987 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m20:02:36.171214 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m20:02:36.295850 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m20:02:36.296852 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m20:02:36.296852 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m20:02:37.042286 [debug] [ThreadPool]: SQL status: OK in 0.745 seconds
[0m20:02:37.043799 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m20:02:37.044316 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m20:02:37.044316 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m20:02:37.049958 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m20:02:37.049958 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m20:02:37.049958 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m20:02:37.051417 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m20:02:37.052426 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m20:02:37.052426 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m20:02:37.052931 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m20:02:37.052931 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m20:02:37.052931 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m20:02:37.053936 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m20:02:37.054450 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m20:02:37.054450 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m20:02:37.054450 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m20:02:37.054450 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m20:02:37.055457 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m20:02:37.057601 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m20:02:37.061292 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m20:02:37.061888 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m20:02:37.061888 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m20:02:37.062471 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m20:02:37.062471 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m20:02:37.062471 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m20:02:37.072142 [debug] [ThreadPool]: SQL status: OK in 0.010 seconds
[0m20:02:37.073798 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m20:02:37.074638 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m20:02:37.074638 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m20:02:37.075643 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018289E8E600>]}
[0m20:02:37.075643 [debug] [MainThread]: Using duckdb connection "master"
[0m20:02:37.076646 [debug] [MainThread]: On master: BEGIN
[0m20:02:37.076646 [debug] [MainThread]: Opening a new connection, currently in state init
[0m20:02:37.076646 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m20:02:37.076646 [debug] [MainThread]: On master: COMMIT
[0m20:02:37.077644 [debug] [MainThread]: Using duckdb connection "master"
[0m20:02:37.077644 [debug] [MainThread]: On master: COMMIT
[0m20:02:37.078150 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m20:02:37.078150 [debug] [MainThread]: On master: Close
[0m20:02:37.082454 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m20:02:37.082454 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m20:02:37.082454 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m20:02:37.082454 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m20:02:37.089850 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m20:02:37.091357 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m20:02:37.113785 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m20:02:37.114914 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m20:02:37.115459 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m20:02:37.115459 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m20:02:37.116465 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:37.116465 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m20:02:37.116995 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
    UNION ALL
    SELECT * FROM portfolio_fallback
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(segmento as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(tipo_de_controle as varchar)) as id_controle,
    md5(cast(consolidado_bancario as varchar)) as id_consolidado,
    md5(cast(tipo_de_instituicao as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m20:02:37.338223 [debug] [Thread-1 (]: SQL status: OK in 0.221 seconds
[0m20:02:37.346586 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m20:02:37.347197 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m20:02:37.348749 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:37.358215 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m20:02:37.358215 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m20:02:37.358215 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m20:02:37.368002 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m20:02:37.372182 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m20:02:37.372182 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m20:02:37.373275 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:37.376382 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m20:02:37.378453 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A38B530>]}
[0m20:02:37.380012 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.29s]
[0m20:02:37.380529 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m20:02:37.380529 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m20:02:37.381542 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m20:02:37.381542 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m20:02:37.382647 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m20:02:37.385175 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m20:02:37.385175 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m20:02:37.389283 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m20:02:37.390290 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m20:02:37.391289 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m20:02:37.391289 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:37.392289 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:37.392289 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m20:02:37.392289 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL

    UNION

    -- Fallback: localizações de instituições presentes apenas nas tabelas SCR
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources

UNION

-- Sentinel para instituições sem dados de localização (cidade, uf, regiao = NULL)
SELECT
    md5(cast('' as varchar)) as id_localizacao,
    NULL as cidade,
    NULL as uf,
    NULL as regiao
    );
  
  
[0m20:02:37.461616 [debug] [Thread-1 (]: SQL status: OK in 0.069 seconds
[0m20:02:37.463632 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m20:02:37.464637 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m20:02:37.465142 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:37.465711 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m20:02:37.465711 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m20:02:37.465711 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m20:02:37.469773 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m20:02:37.471988 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m20:02:37.471988 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m20:02:37.473547 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:37.475081 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m20:02:37.476077 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A38AE70>]}
[0m20:02:37.476077 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.09s]
[0m20:02:37.477583 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m20:02:37.478177 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m20:02:37.478177 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m20:02:37.479391 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m20:02:37.479391 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m20:02:37.482557 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m20:02:37.484068 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m20:02:37.487232 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m20:02:37.489237 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m20:02:37.490341 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m20:02:37.490341 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:37.491365 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:37.492363 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m20:02:37.492363 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m20:02:37.518460 [debug] [Thread-1 (]: SQL status: OK in 0.025 seconds
[0m20:02:37.523216 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m20:02:37.523791 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m20:02:37.524356 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:37.526388 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m20:02:37.527388 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m20:02:37.527923 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m20:02:37.529488 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:37.532148 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m20:02:37.532704 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m20:02:37.532704 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:37.534219 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m20:02:37.534219 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828873A660>]}
[0m20:02:37.535232 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.06s]
[0m20:02:37.535232 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m20:02:37.536742 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m20:02:37.537380 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m20:02:37.538944 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m20:02:37.538944 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m20:02:37.547303 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m20:02:37.548818 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m20:02:37.552845 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m20:02:37.553868 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m20:02:37.554880 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m20:02:37.555391 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:37.555902 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:37.555902 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m20:02:37.556911 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m20:02:38.074920 [debug] [Thread-1 (]: SQL status: OK in 0.518 seconds
[0m20:02:38.077458 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m20:02:38.078475 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m20:02:38.078475 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:38.080119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m20:02:38.080626 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m20:02:38.080626 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m20:02:38.209367 [debug] [Thread-1 (]: SQL status: OK in 0.128 seconds
[0m20:02:38.210412 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m20:02:38.212007 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m20:02:38.212007 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:38.213711 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m20:02:38.213711 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A3BA630>]}
[0m20:02:38.214819 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.68s]
[0m20:02:38.215325 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m20:02:38.215325 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m20:02:38.215325 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m20:02:38.216939 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m20:02:38.216939 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m20:02:38.220460 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m20:02:38.220966 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m20:02:38.223991 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m20:02:38.224496 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m20:02:38.224496 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m20:02:38.225502 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:38.225502 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:38.225502 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m20:02:38.226532 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m20:02:38.390079 [debug] [Thread-1 (]: SQL status: OK in 0.164 seconds
[0m20:02:38.393077 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m20:02:38.393077 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m20:02:38.394062 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:38.394580 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m20:02:38.394580 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m20:02:38.395592 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m20:02:38.410491 [debug] [Thread-1 (]: SQL status: OK in 0.014 seconds
[0m20:02:38.412571 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m20:02:38.412571 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m20:02:38.412571 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:38.414222 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m20:02:38.414222 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A33C5F0>]}
[0m20:02:38.414898 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.20s]
[0m20:02:38.415470 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m20:02:38.415470 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m20:02:38.416475 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m20:02:38.416979 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m20:02:38.416979 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m20:02:38.419606 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m20:02:38.420615 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m20:02:38.421742 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m20:02:38.423795 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m20:02:38.424304 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m20:02:38.424304 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:38.424304 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:38.425307 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m20:02:38.425307 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m20:02:38.470821 [debug] [Thread-1 (]: SQL status: OK in 0.045 seconds
[0m20:02:38.474119 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m20:02:38.474119 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m20:02:38.475146 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:38.476130 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m20:02:38.476130 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m20:02:38.476130 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m20:02:38.505773 [debug] [Thread-1 (]: SQL status: OK in 0.029 seconds
[0m20:02:38.508880 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m20:02:38.508880 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m20:02:38.509901 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:38.511586 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m20:02:38.512403 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A3CC620>]}
[0m20:02:38.512936 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.10s]
[0m20:02:38.514037 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m20:02:38.514563 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m20:02:38.515162 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m20:02:38.515699 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m20:02:38.515699 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m20:02:38.520619 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m20:02:38.521822 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m20:02:38.524993 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m20:02:38.525991 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m20:02:38.525991 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m20:02:38.525991 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:38.525991 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:38.527497 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m20:02:38.527497 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m20:02:38.574294 [debug] [Thread-1 (]: SQL status: OK in 0.046 seconds
[0m20:02:38.576314 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m20:02:38.576314 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m20:02:38.577314 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:38.578491 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m20:02:38.578491 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m20:02:38.578491 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m20:02:38.662725 [debug] [Thread-1 (]: SQL status: OK in 0.084 seconds
[0m20:02:38.664835 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m20:02:38.665339 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m20:02:38.665339 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:38.665339 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m20:02:38.666992 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018289CC0350>]}
[0m20:02:38.667667 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.15s]
[0m20:02:38.668680 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m20:02:38.668680 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m20:02:38.669681 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m20:02:38.670726 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m20:02:38.670726 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m20:02:38.673918 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m20:02:38.674923 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m20:02:38.677432 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m20:02:38.678439 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m20:02:38.678439 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m20:02:38.678439 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:38.679692 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:38.679692 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m20:02:38.680699 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH summary_prudential AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."prudential_conglomerates_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

summary_financial AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."financial_conglomerates_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

summary_individual AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."individual_institutions_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN summary_prudential r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN summary_financial r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN summary_individual r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m20:02:39.320423 [debug] [Thread-1 (]: SQL status: OK in 0.639 seconds
[0m20:02:39.322508 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m20:02:39.322508 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m20:02:39.323513 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:39.324097 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m20:02:39.325107 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m20:02:39.326131 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m20:02:39.486619 [debug] [Thread-1 (]: SQL status: OK in 0.160 seconds
[0m20:02:39.489760 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m20:02:39.489760 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m20:02:39.490793 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:39.491792 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m20:02:39.492791 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A3EF920>]}
[0m20:02:39.492791 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.82s]
[0m20:02:39.494283 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m20:02:39.494283 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m20:02:39.494933 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m20:02:39.494933 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m20:02:39.494933 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m20:02:39.497563 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m20:02:39.499070 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m20:02:39.501077 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m20:02:39.501583 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m20:02:39.502588 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m20:02:39.502588 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:39.502588 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:39.502588 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m20:02:39.502588 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m20:02:39.508336 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m20:02:39.510503 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m20:02:39.510503 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m20:02:39.511618 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:39.511618 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m20:02:39.512763 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m20:02:39.512763 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m20:02:39.519685 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m20:02:39.521202 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m20:02:39.522208 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m20:02:39.522208 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:39.523736 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m20:02:39.524309 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A2B0C80>]}
[0m20:02:39.524309 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.03s]
[0m20:02:39.525314 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m20:02:39.525314 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m20:02:39.525314 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m20:02:39.526313 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m20:02:39.526313 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m20:02:39.529483 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m20:02:39.529483 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m20:02:39.532430 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m20:02:39.532430 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m20:02:39.532430 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m20:02:39.534016 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:39.534016 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:39.534016 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m20:02:39.535027 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m20:02:39.560183 [debug] [Thread-1 (]: SQL status: OK in 0.025 seconds
[0m20:02:39.561714 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m20:02:39.562742 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m20:02:39.563271 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:39.563793 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m20:02:39.563793 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m20:02:39.563793 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m20:02:39.583089 [debug] [Thread-1 (]: SQL status: OK in 0.019 seconds
[0m20:02:39.586633 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m20:02:39.586633 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m20:02:39.587318 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:39.588346 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m20:02:39.588346 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001829818D970>]}
[0m20:02:39.588346 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.06s]
[0m20:02:39.589346 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m20:02:39.589346 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m20:02:39.590429 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m20:02:39.591424 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m20:02:39.591424 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m20:02:39.594536 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m20:02:39.595325 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m20:02:39.597037 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m20:02:39.598616 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m20:02:39.599172 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m20:02:39.599172 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:39.599172 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:39.600175 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m20:02:39.600175 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m20:02:39.854466 [debug] [Thread-1 (]: SQL status: OK in 0.254 seconds
[0m20:02:39.857027 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m20:02:39.857027 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m20:02:39.857576 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:39.858181 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m20:02:39.858181 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m20:02:39.858181 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m20:02:40.035744 [debug] [Thread-1 (]: SQL status: OK in 0.177 seconds
[0m20:02:40.039579 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m20:02:40.040586 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m20:02:40.040586 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.041586 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m20:02:40.041586 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A360560>]}
[0m20:02:40.042586 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.45s]
[0m20:02:40.042586 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m20:02:40.044092 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m20:02:40.045098 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m20:02:40.045098 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m20:02:40.045098 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m20:02:40.045098 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m20:02:40.063744 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m20:02:40.064777 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m20:02:40.064777 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.065285 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.065285 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m20:02:40.065285 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m20:02:40.065285 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.073442 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m20:02:40.073985 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m20:02:40.079213 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m20:02:40.083724 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m20:02:40.085839 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m20:02:40.085839 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m20:02:40.085839 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m20:02:40.092683 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m20:02:40.093667 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m20:02:40.093667 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A3316A0>]}
[0m20:02:40.093667 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.05s]
[0m20:02:40.094745 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m20:02:40.094745 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m20:02:40.095760 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m20:02:40.095760 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m20:02:40.096760 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m20:02:40.096760 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m20:02:40.101344 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m20:02:40.101344 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m20:02:40.101344 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.102373 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.102373 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m20:02:40.102373 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m20:02:40.102373 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.104436 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m20:02:40.104436 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m20:02:40.105950 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.106955 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m20:02:40.108138 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m20:02:40.109195 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m20:02:40.109195 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m20:02:40.110320 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.111763 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m20:02:40.111763 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A3AF200>]}
[0m20:02:40.112771 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.02s]
[0m20:02:40.113784 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m20:02:40.113784 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m20:02:40.113784 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m20:02:40.114790 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m20:02:40.115295 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m20:02:40.115295 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m20:02:40.117899 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m20:02:40.117899 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m20:02:40.117899 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.119406 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.119406 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m20:02:40.119406 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m20:02:40.120413 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.120919 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m20:02:40.120919 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m20:02:40.122433 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.123962 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m20:02:40.125968 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m20:02:40.125968 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m20:02:40.125968 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m20:02:40.129295 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.129295 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m20:02:40.129295 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A3BA450>]}
[0m20:02:40.129295 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.01s]
[0m20:02:40.131480 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m20:02:40.131480 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m20:02:40.132002 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m20:02:40.132510 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m20:02:40.132510 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m20:02:40.132510 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m20:02:40.136530 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m20:02:40.136530 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m20:02:40.137098 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.137098 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.138105 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m20:02:40.138105 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m20:02:40.138105 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.139102 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m20:02:40.139102 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m20:02:40.141200 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.141200 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m20:02:40.142216 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m20:02:40.143749 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m20:02:40.143749 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m20:02:40.146405 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.147028 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m20:02:40.147028 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A3EB350>]}
[0m20:02:40.147028 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.01s]
[0m20:02:40.148542 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m20:02:40.149132 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m20:02:40.149132 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m20:02:40.150139 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m20:02:40.150139 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m20:02:40.150139 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m20:02:40.152646 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m20:02:40.154207 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m20:02:40.154207 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.154751 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.154751 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m20:02:40.155793 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m20:02:40.155793 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.155793 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m20:02:40.155793 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m20:02:40.158343 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.158343 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m20:02:40.160476 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m20:02:40.160476 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m20:02:40.160476 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m20:02:40.163815 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.164383 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m20:02:40.165390 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018289E65E50>]}
[0m20:02:40.165897 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.02s]
[0m20:02:40.167412 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m20:02:40.167412 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m20:02:40.168215 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m20:02:40.169937 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m20:02:40.169937 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m20:02:40.170482 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m20:02:40.175045 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m20:02:40.175045 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m20:02:40.175045 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.176047 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.176047 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m20:02:40.176047 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m20:02:40.176047 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.178248 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m20:02:40.178248 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m20:02:40.180442 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.180948 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m20:02:40.182459 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m20:02:40.182993 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m20:02:40.182993 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m20:02:40.185006 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.186007 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m20:02:40.186007 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018288674F80>]}
[0m20:02:40.187007 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.02s]
[0m20:02:40.187007 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m20:02:40.187007 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m20:02:40.188329 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m20:02:40.188329 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m20:02:40.188329 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m20:02:40.189335 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m20:02:40.191846 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m20:02:40.192846 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m20:02:40.192846 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.193457 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.193980 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m20:02:40.193980 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m20:02:40.194661 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.194982 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m20:02:40.194982 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m20:02:40.197498 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.198497 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m20:02:40.200265 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m20:02:40.200265 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m20:02:40.200265 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m20:02:40.202902 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.203908 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m20:02:40.204414 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018289B0FD10>]}
[0m20:02:40.204918 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.02s]
[0m20:02:40.205521 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m20:02:40.205521 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m20:02:40.205521 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m20:02:40.205521 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m20:02:40.205521 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m20:02:40.205521 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m20:02:40.210337 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m20:02:40.210337 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m20:02:40.211345 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.211850 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.211850 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m20:02:40.211850 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m20:02:40.212383 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.212383 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m20:02:40.212383 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m20:02:40.215053 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.215689 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m20:02:40.217322 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m20:02:40.217322 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m20:02:40.217322 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m20:02:40.218328 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.219328 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m20:02:40.219833 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000182850623F0>]}
[0m20:02:40.220338 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.01s]
[0m20:02:40.220956 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m20:02:40.220956 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m20:02:40.220956 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m20:02:40.221993 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m20:02:40.221993 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m20:02:40.221993 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m20:02:40.225756 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m20:02:40.225756 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m20:02:40.225756 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.225756 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.227262 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m20:02:40.227262 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m20:02:40.227262 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.228774 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m20:02:40.228774 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m20:02:40.229367 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.230985 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m20:02:40.232615 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m20:02:40.233122 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m20:02:40.233122 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m20:02:40.234132 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.235138 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m20:02:40.235138 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A2B7C80>]}
[0m20:02:40.235138 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.01s]
[0m20:02:40.236643 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m20:02:40.236643 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m20:02:40.237253 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m20:02:40.238286 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m20:02:40.238286 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m20:02:40.238286 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m20:02:40.242796 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m20:02:40.243798 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m20:02:40.243798 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.243798 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.244836 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m20:02:40.244836 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m20:02:40.244836 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.246442 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m20:02:40.247448 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m20:02:40.249963 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.250962 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m20:02:40.255607 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m20:02:40.256144 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m20:02:40.258226 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m20:02:40.261178 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.261930 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m20:02:40.262473 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A2B4500>]}
[0m20:02:40.262473 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.03s]
[0m20:02:40.263774 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m20:02:40.264304 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m20:02:40.264304 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m20:02:40.265420 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m20:02:40.265420 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m20:02:40.276336 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m20:02:40.277841 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m20:02:40.290087 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m20:02:40.292087 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m20:02:40.292087 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m20:02:40.293086 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.293086 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.294088 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m20:02:40.294088 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.296599 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.299284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m20:02:40.299284 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m20:02:40.300299 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m20:02:40.300299 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.04s]
[0m20:02:40.301295 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m20:02:40.301802 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m20:02:40.301802 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m20:02:40.302809 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m20:02:40.302809 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m20:02:40.306104 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m20:02:40.307109 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m20:02:40.308299 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m20:02:40.309868 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m20:02:40.310443 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m20:02:40.310443 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.312062 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.312575 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m20:02:40.313109 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.315243 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.317408 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m20:02:40.318417 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m20:02:40.319923 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m20:02:40.320428 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m20:02:40.320999 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m20:02:40.320999 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m20:02:40.322005 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m20:02:40.322005 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m20:02:40.322005 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m20:02:40.328300 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m20:02:40.329551 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m20:02:40.332636 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m20:02:40.333140 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m20:02:40.334145 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m20:02:40.334145 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.334145 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.334145 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m20:02:40.335397 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m20:02:40.337907 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.339411 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m20:02:40.341200 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m20:02:40.341200 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m20:02:40.341706 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.02s]
[0m20:02:40.342712 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m20:02:40.342712 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m20:02:40.342712 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m20:02:40.343713 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m20:02:40.344220 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m20:02:40.347265 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m20:02:40.348771 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m20:02:40.353242 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m20:02:40.356328 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m20:02:40.357406 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m20:02:40.359029 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.360694 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.361704 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m20:02:40.362799 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.363962 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.365720 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m20:02:40.368366 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m20:02:40.369361 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m20:02:40.369361 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.03s]
[0m20:02:40.371118 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m20:02:40.371118 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m20:02:40.372124 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m20:02:40.373206 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m20:02:40.373740 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m20:02:40.384886 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m20:02:40.385904 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m20:02:40.388922 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m20:02:40.390930 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m20:02:40.392269 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m20:02:40.392829 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.393853 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.394360 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m20:02:40.394360 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.397695 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m20:02:40.399201 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m20:02:40.400208 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m20:02:40.400208 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m20:02:40.401209 [info ] [Thread-1 (]: 26 of 97 PASS relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[32mPASS[0m in 0.03s]
[0m20:02:40.401209 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m20:02:40.403210 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m20:02:40.403731 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m20:02:40.404748 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m20:02:40.404748 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m20:02:40.409481 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m20:02:40.410020 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m20:02:40.412582 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m20:02:40.412582 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m20:02:40.414095 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m20:02:40.414095 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.414675 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.414675 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m20:02:40.415450 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m20:02:40.417981 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m20:02:40.421002 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m20:02:40.422008 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m20:02:40.422008 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m20:02:40.422514 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.02s]
[0m20:02:40.423019 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m20:02:40.424067 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m20:02:40.425155 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m20:02:40.425155 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m20:02:40.426156 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m20:02:40.431611 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m20:02:40.433122 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m20:02:40.435131 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m20:02:40.436634 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m20:02:40.436634 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m20:02:40.437231 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.437231 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.437231 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m20:02:40.438238 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.439239 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.440750 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m20:02:40.441771 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m20:02:40.441771 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m20:02:40.442777 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.02s]
[0m20:02:40.442777 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m20:02:40.442777 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m20:02:40.443749 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m20:02:40.444275 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m20:02:40.444821 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m20:02:40.446901 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m20:02:40.448543 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m20:02:40.450127 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m20:02:40.451142 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m20:02:40.451142 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m20:02:40.452763 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.452763 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.453788 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m20:02:40.453788 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m20:02:40.455613 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.455613 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m20:02:40.458096 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m20:02:40.458096 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m20:02:40.458096 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.01s]
[0m20:02:40.458096 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m20:02:40.459764 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m20:02:40.460397 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m20:02:40.460397 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m20:02:40.460967 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m20:02:40.464021 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m20:02:40.465193 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m20:02:40.467384 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m20:02:40.468479 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m20:02:40.469463 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m20:02:40.469463 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.469463 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.469463 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m20:02:40.470648 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.470648 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.472158 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m20:02:40.473164 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m20:02:40.473164 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m20:02:40.473164 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.01s]
[0m20:02:40.474171 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m20:02:40.474171 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m20:02:40.475237 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m20:02:40.475789 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m20:02:40.475789 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m20:02:40.479439 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m20:02:40.479439 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m20:02:40.481645 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m20:02:40.482653 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m20:02:40.482653 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m20:02:40.482653 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.484353 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.484353 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m20:02:40.484353 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.485362 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.487501 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m20:02:40.489094 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m20:02:40.489094 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m20:02:40.490102 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.01s]
[0m20:02:40.490102 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m20:02:40.491101 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m20:02:40.491711 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m20:02:40.491711 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m20:02:40.491711 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m20:02:40.496420 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m20:02:40.497443 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m20:02:40.498948 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m20:02:40.499962 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m20:02:40.501468 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m20:02:40.501468 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.502477 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.502477 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m20:02:40.502982 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.506006 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m20:02:40.507651 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m20:02:40.508244 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m20:02:40.508244 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m20:02:40.508841 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m20:02:40.508841 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m20:02:40.509856 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m20:02:40.509856 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m20:02:40.510361 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m20:02:40.510361 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m20:02:40.515546 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m20:02:40.516572 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m20:02:40.518081 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m20:02:40.518081 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m20:02:40.519584 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m20:02:40.519584 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.519584 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.520588 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m20:02:40.520588 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.525646 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m20:02:40.526647 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m20:02:40.527647 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m20:02:40.528152 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m20:02:40.528837 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m20:02:40.528837 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m20:02:40.529460 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m20:02:40.529460 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m20:02:40.530466 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m20:02:40.530466 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m20:02:40.532538 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m20:02:40.534133 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m20:02:40.535148 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m20:02:40.537374 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m20:02:40.537374 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m20:02:40.537374 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.537374 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.538923 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m20:02:40.538923 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.539650 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.541290 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m20:02:40.541804 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m20:02:40.542363 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m20:02:40.542363 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.01s]
[0m20:02:40.542363 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m20:02:40.542363 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m20:02:40.543875 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m20:02:40.544389 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m20:02:40.544903 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m20:02:40.549098 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m20:02:40.550103 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m20:02:40.551104 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m20:02:40.553693 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m20:02:40.554198 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m20:02:40.554198 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.554703 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.555366 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m20:02:40.555366 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.556429 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.557450 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m20:02:40.558457 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m20:02:40.558781 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m20:02:40.558781 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.01s]
[0m20:02:40.559783 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m20:02:40.559783 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m20:02:40.560310 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m20:02:40.561312 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m20:02:40.561312 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m20:02:40.565637 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m20:02:40.566640 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m20:02:40.568148 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m20:02:40.568148 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m20:02:40.569652 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m20:02:40.569652 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.569652 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.570856 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m20:02:40.571443 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.574779 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m20:02:40.575804 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m20:02:40.576780 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m20:02:40.577286 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m20:02:40.577854 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m20:02:40.578362 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m20:02:40.578362 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m20:02:40.578362 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m20:02:40.579366 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m20:02:40.580043 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m20:02:40.584089 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m20:02:40.585681 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m20:02:40.587333 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m20:02:40.588345 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m20:02:40.588345 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m20:02:40.588345 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.589367 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.589367 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m20:02:40.589367 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.593939 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m20:02:40.595155 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m20:02:40.595155 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m20:02:40.596715 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m20:02:40.596715 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m20:02:40.597721 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m20:02:40.597721 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m20:02:40.597721 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m20:02:40.598720 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m20:02:40.599358 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m20:02:40.601583 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m20:02:40.603094 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m20:02:40.604670 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m20:02:40.605706 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m20:02:40.605706 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m20:02:40.605706 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.605706 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.607342 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m20:02:40.607342 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.608351 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.609860 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m20:02:40.610585 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m20:02:40.610585 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m20:02:40.611602 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.01s]
[0m20:02:40.611602 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m20:02:40.611602 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m20:02:40.611602 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m20:02:40.612972 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m20:02:40.612972 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m20:02:40.615415 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m20:02:40.617092 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m20:02:40.619645 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m20:02:40.620463 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m20:02:40.620993 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m20:02:40.620993 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.620993 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.621999 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m20:02:40.621999 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.622505 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.624031 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m20:02:40.625037 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m20:02:40.625037 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m20:02:40.625037 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.01s]
[0m20:02:40.626039 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m20:02:40.626039 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m20:02:40.626039 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m20:02:40.627544 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m20:02:40.627544 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m20:02:40.630832 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m20:02:40.632291 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m20:02:40.634444 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m20:02:40.635450 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m20:02:40.635450 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m20:02:40.635450 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.635450 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.636956 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m20:02:40.636956 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.638979 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.640143 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m20:02:40.640143 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m20:02:40.641158 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m20:02:40.641158 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m20:02:40.642155 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m20:02:40.642155 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m20:02:40.642155 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m20:02:40.642155 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m20:02:40.643664 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m20:02:40.648815 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m20:02:40.649821 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m20:02:40.651325 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m20:02:40.652839 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m20:02:40.652839 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m20:02:40.653844 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.654361 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.654361 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m20:02:40.655997 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.658257 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m20:02:40.659931 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m20:02:40.659931 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m20:02:40.661695 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m20:02:40.661695 [info ] [Thread-1 (]: 41 of 97 PASS relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m20:02:40.661695 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m20:02:40.662709 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m20:02:40.663215 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m20:02:40.663724 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m20:02:40.663724 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m20:02:40.667146 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m20:02:40.668159 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m20:02:40.669663 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m20:02:40.670669 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m20:02:40.670669 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m20:02:40.670669 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.672463 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.672463 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m20:02:40.672463 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.673495 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.674096 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m20:02:40.675099 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m20:02:40.675099 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m20:02:40.676120 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.01s]
[0m20:02:40.676120 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m20:02:40.676120 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m20:02:40.676120 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m20:02:40.677628 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m20:02:40.677628 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m20:02:40.680482 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m20:02:40.681512 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m20:02:40.684182 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m20:02:40.685187 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m20:02:40.685187 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m20:02:40.685187 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.686188 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.686188 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m20:02:40.686188 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.687189 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.687696 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m20:02:40.689203 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m20:02:40.689203 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m20:02:40.689203 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.01s]
[0m20:02:40.690210 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m20:02:40.690210 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m20:02:40.691208 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m20:02:40.691208 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m20:02:40.691208 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m20:02:40.696541 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m20:02:40.697653 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m20:02:40.699144 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m20:02:40.700149 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m20:02:40.701150 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m20:02:40.701655 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.701655 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.702659 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m20:02:40.702659 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.705015 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.705673 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m20:02:40.707410 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m20:02:40.707786 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m20:02:40.707786 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m20:02:40.708305 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m20:02:40.708305 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m20:02:40.708305 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m20:02:40.708305 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m20:02:40.709978 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m20:02:40.713690 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m20:02:40.715285 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m20:02:40.717064 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m20:02:40.718081 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m20:02:40.718081 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m20:02:40.718081 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.719586 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.719586 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m20:02:40.719586 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.721882 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m20:02:40.724094 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m20:02:40.724094 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m20:02:40.725118 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m20:02:40.725118 [info ] [Thread-1 (]: 45 of 97 PASS relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m20:02:40.725740 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m20:02:40.726745 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m20:02:40.726745 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m20:02:40.727743 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m20:02:40.727743 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m20:02:40.730520 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m20:02:40.731600 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m20:02:40.733858 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m20:02:40.734734 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m20:02:40.734734 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m20:02:40.735751 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.735751 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.735751 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m20:02:40.736751 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.737255 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.738298 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m20:02:40.739277 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m20:02:40.739277 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m20:02:40.740308 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.01s]
[0m20:02:40.740990 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m20:02:40.740990 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m20:02:40.740990 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m20:02:40.741996 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m20:02:40.741996 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m20:02:40.745507 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m20:02:40.746625 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m20:02:40.748633 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m20:02:40.750142 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m20:02:40.750142 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m20:02:40.750142 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.751146 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.751146 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m20:02:40.751146 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.752320 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.752320 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m20:02:40.753924 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m20:02:40.754933 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m20:02:40.755438 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.01s]
[0m20:02:40.756510 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m20:02:40.756510 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m20:02:40.757035 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m20:02:40.757035 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m20:02:40.757772 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m20:02:40.760099 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m20:02:40.761814 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m20:02:40.763840 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m20:02:40.764405 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m20:02:40.765069 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m20:02:40.765069 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.765838 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.766439 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m20:02:40.766439 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.768050 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.771715 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m20:02:40.772817 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m20:02:40.772817 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m20:02:40.773327 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m20:02:40.773854 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m20:02:40.774371 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m20:02:40.774913 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m20:02:40.774913 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m20:02:40.774913 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m20:02:40.778925 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m20:02:40.780435 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m20:02:40.782454 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m20:02:40.782959 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m20:02:40.783964 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m20:02:40.783964 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.784480 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.784480 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m20:02:40.784480 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.795387 [debug] [Thread-1 (]: SQL status: OK in 0.011 seconds
[0m20:02:40.796891 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m20:02:40.796891 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m20:02:40.798451 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m20:02:40.799033 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m20:02:40.799033 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m20:02:40.799033 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m20:02:40.800094 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m20:02:40.800094 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m20:02:40.800094 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m20:02:40.804142 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m20:02:40.806069 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m20:02:40.808449 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m20:02:40.809852 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m20:02:40.809852 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m20:02:40.810423 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.810773 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.810773 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m20:02:40.811278 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.811989 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.812543 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m20:02:40.812543 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m20:02:40.814060 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m20:02:40.814713 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.01s]
[0m20:02:40.815451 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m20:02:40.815451 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m20:02:40.816457 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m20:02:40.816961 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m20:02:40.816961 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m20:02:40.819476 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m20:02:40.821271 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m20:02:40.821939 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m20:02:40.824536 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m20:02:40.824536 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m20:02:40.824536 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.825542 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.825542 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m20:02:40.825542 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.826540 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.828047 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m20:02:40.828853 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m20:02:40.828853 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m20:02:40.829357 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.01s]
[0m20:02:40.829357 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m20:02:40.831216 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m20:02:40.831216 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m20:02:40.831914 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m20:02:40.832526 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m20:02:40.836688 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m20:02:40.837453 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m20:02:40.839460 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m20:02:40.839965 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m20:02:40.839965 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m20:02:40.840972 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.840972 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.840972 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m20:02:40.840972 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.842972 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.843974 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m20:02:40.844804 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m20:02:40.844804 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m20:02:40.845310 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.01s]
[0m20:02:40.845310 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m20:02:40.845310 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m20:02:40.847036 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m20:02:40.847036 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m20:02:40.847036 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m20:02:40.851879 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m20:02:40.854079 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m20:02:40.857517 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m20:02:40.858629 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m20:02:40.858629 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m20:02:40.858629 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.859980 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.859980 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m20:02:40.859980 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.861772 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.862805 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m20:02:40.863881 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m20:02:40.864515 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m20:02:40.865125 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m20:02:40.865721 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m20:02:40.865721 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m20:02:40.866236 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m20:02:40.866745 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m20:02:40.867330 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m20:02:40.870044 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m20:02:40.870918 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m20:02:40.871923 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m20:02:40.873727 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m20:02:40.874051 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m20:02:40.874051 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.874051 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.875099 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m20:02:40.875099 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.876056 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.876056 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m20:02:40.877662 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m20:02:40.877662 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m20:02:40.877662 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.01s]
[0m20:02:40.879460 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m20:02:40.880080 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m20:02:40.880591 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m20:02:40.881204 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m20:02:40.881568 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m20:02:40.884319 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m20:02:40.885215 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m20:02:40.887130 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m20:02:40.887130 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m20:02:40.888134 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m20:02:40.888134 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.888134 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.889137 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m20:02:40.889137 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.889137 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.890399 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m20:02:40.891456 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m20:02:40.891456 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m20:02:40.892354 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.01s]
[0m20:02:40.892354 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m20:02:40.892354 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m20:02:40.893860 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m20:02:40.894866 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m20:02:40.894866 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m20:02:40.898437 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m20:02:40.899444 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m20:02:40.901455 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m20:02:40.901455 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m20:02:40.902463 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m20:02:40.902463 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.902967 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.902967 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m20:02:40.902967 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.905499 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.907010 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m20:02:40.907736 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m20:02:40.907736 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m20:02:40.908495 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.01s]
[0m20:02:40.908495 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m20:02:40.908495 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m20:02:40.908495 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m20:02:40.910279 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m20:02:40.910279 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m20:02:40.914217 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m20:02:40.915384 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m20:02:40.917401 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m20:02:40.918409 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m20:02:40.918409 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m20:02:40.918409 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.919417 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.919417 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m20:02:40.920043 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.922454 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.923881 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m20:02:40.923881 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m20:02:40.924889 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m20:02:40.924889 [info ] [Thread-1 (]: 57 of 97 PASS relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.01s]
[0m20:02:40.925943 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m20:02:40.926731 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m20:02:40.926731 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m20:02:40.926731 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m20:02:40.927737 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m20:02:40.931492 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m20:02:40.933059 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m20:02:40.934093 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m20:02:40.935104 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m20:02:40.935104 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m20:02:40.935104 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.936608 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.936608 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m20:02:40.937188 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.937523 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.938220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m20:02:40.939217 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m20:02:40.939217 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m20:02:40.939217 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.01s]
[0m20:02:40.940309 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m20:02:40.940309 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m20:02:40.941295 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m20:02:40.942078 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m20:02:40.942078 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m20:02:40.945635 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m20:02:40.946619 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m20:02:40.947123 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m20:02:40.948627 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m20:02:40.949189 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m20:02:40.949189 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.949189 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.950192 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m20:02:40.950192 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.950192 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.951193 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m20:02:40.952237 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m20:02:40.952237 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m20:02:40.952237 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.01s]
[0m20:02:40.953815 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m20:02:40.954834 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m20:02:40.955340 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m20:02:40.955340 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m20:02:40.955843 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m20:02:40.959628 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m20:02:40.960264 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m20:02:40.962362 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m20:02:40.962362 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m20:02:40.962362 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m20:02:40.963877 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.964409 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.964409 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m20:02:40.964959 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.967237 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:40.968922 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m20:02:40.968922 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m20:02:40.969921 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m20:02:40.969921 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.01s]
[0m20:02:40.970551 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m20:02:40.971148 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m20:02:40.971148 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m20:02:40.971673 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m20:02:40.971673 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m20:02:40.975838 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m20:02:40.975838 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m20:02:40.978853 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m20:02:40.979481 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m20:02:40.979481 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m20:02:40.979481 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.980995 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:40.980995 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m20:02:40.981498 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:40.986108 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m20:02:40.987212 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m20:02:40.987212 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m20:02:40.988431 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m20:02:40.988936 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m20:02:40.989448 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m20:02:40.989448 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m20:02:40.990453 [info ] [Thread-1 (]: 62 of 97 START sql table model main.dim_atividade .............................. [RUN]
[0m20:02:40.990453 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m20:02:40.991458 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m20:02:40.994208 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m20:02:40.994846 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m20:02:40.997648 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m20:02:40.998665 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m20:02:40.999492 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m20:02:40.999492 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:40.999492 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:40.999492 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m20:02:40.999492 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m20:02:41.001147 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:41.003811 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m20:02:41.003811 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m20:02:41.005127 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.005642 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m20:02:41.005642 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m20:02:41.005642 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m20:02:41.010050 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m20:02:41.011706 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m20:02:41.011706 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m20:02:41.012713 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.013724 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m20:02:41.013724 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018298255FA0>]}
[0m20:02:41.013724 [info ] [Thread-1 (]: 62 of 97 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.02s]
[0m20:02:41.015104 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m20:02:41.015665 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m20:02:41.015665 [info ] [Thread-1 (]: 63 of 97 START sql table model main.dim_classe_instituicao ..................... [RUN]
[0m20:02:41.015665 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m20:02:41.017018 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m20:02:41.018140 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m20:02:41.020349 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m20:02:41.022451 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m20:02:41.023964 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m20:02:41.023964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m20:02:41.024474 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:41.024474 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.024474 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m20:02:41.025480 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m20:02:41.027530 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:41.029645 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m20:02:41.029645 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m20:02:41.030651 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.031723 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m20:02:41.031723 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m20:02:41.031723 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m20:02:41.035245 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m20:02:41.037759 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m20:02:41.039330 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m20:02:41.040338 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.042338 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m20:02:41.042338 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000182899AD790>]}
[0m20:02:41.043843 [info ] [Thread-1 (]: 63 of 97 OK created sql table model main.dim_classe_instituicao ................ [[32mOK[0m in 0.03s]
[0m20:02:41.044353 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m20:02:41.045036 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m20:02:41.045036 [info ] [Thread-1 (]: 64 of 97 START sql table model main.dim_consolidado ............................ [RUN]
[0m20:02:41.045036 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m20:02:41.046708 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m20:02:41.050102 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m20:02:41.050990 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m20:02:41.052948 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m20:02:41.054069 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m20:02:41.054069 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m20:02:41.054614 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:41.054614 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.054614 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m20:02:41.055720 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m20:02:41.056328 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:41.060139 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m20:02:41.060139 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m20:02:41.060139 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.061927 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m20:02:41.062690 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m20:02:41.062690 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m20:02:41.066038 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m20:02:41.068187 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m20:02:41.068187 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m20:02:41.068187 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.069695 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m20:02:41.070721 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018299366750>]}
[0m20:02:41.923813 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m20:02:41.928441 [info ] [Thread-1 (]: 64 of 97 OK created sql table model main.dim_consolidado ....................... [[32mOK[0m in 0.02s]
[0m20:02:41.929510 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m20:02:41.929510 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m20:02:41.930554 [info ] [Thread-1 (]: 65 of 97 START sql table model main.dim_controle ............................... [RUN]
[0m20:02:41.931165 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m20:02:41.931716 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m20:02:41.934121 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m20:02:41.934121 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m20:02:41.936913 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m20:02:41.937917 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m20:02:41.937917 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m20:02:41.938918 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:41.939421 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.939421 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m20:02:41.939421 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m20:02:41.940426 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:41.942426 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m20:02:41.942426 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m20:02:41.943935 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.945014 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m20:02:41.945581 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m20:02:41.945581 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m20:02:41.951657 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m20:02:41.953704 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m20:02:41.953704 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m20:02:41.953704 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.955716 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m20:02:41.955716 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A371D90>]}
[0m20:02:41.955716 [info ] [Thread-1 (]: 65 of 97 OK created sql table model main.dim_controle .......................... [[32mOK[0m in 0.02s]
[0m20:02:41.957256 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m20:02:41.957808 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m20:02:41.958374 [info ] [Thread-1 (]: 66 of 97 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m20:02:41.958374 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m20:02:41.958374 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m20:02:41.959931 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m20:02:41.961547 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m20:02:41.964343 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m20:02:41.964936 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m20:02:41.964936 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m20:02:41.965601 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:41.965601 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.965601 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m20:02:41.966605 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m20:02:41.967108 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.968131 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m20:02:41.968131 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m20:02:41.969658 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.970672 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m20:02:41.970672 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m20:02:41.970672 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m20:02:41.976664 [debug] [Thread-1 (]: SQL status: OK in 0.005 seconds
[0m20:02:41.979321 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m20:02:41.979321 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m20:02:41.980852 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.981388 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m20:02:41.981388 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000182993822A0>]}
[0m20:02:41.982417 [info ] [Thread-1 (]: 66 of 97 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.02s]
[0m20:02:41.982924 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m20:02:41.982924 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m20:02:41.983929 [info ] [Thread-1 (]: 67 of 97 START sql table model main.dim_porte .................................. [RUN]
[0m20:02:41.984937 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m20:02:41.984937 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m20:02:41.987442 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m20:02:41.987442 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m20:02:41.989957 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m20:02:41.991462 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m20:02:41.991462 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m20:02:41.991462 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:41.992469 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.992469 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m20:02:41.992469 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m20:02:41.992469 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.995697 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m20:02:41.996371 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m20:02:41.996885 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:41.996885 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m20:02:41.996885 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m20:02:41.998544 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m20:02:42.000441 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:42.002412 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m20:02:42.002412 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m20:02:42.002412 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.003923 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m20:02:42.004440 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018289B0FA10>]}
[0m20:02:42.004440 [info ] [Thread-1 (]: 67 of 97 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.02s]
[0m20:02:42.005484 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m20:02:42.005484 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m20:02:42.005484 [info ] [Thread-1 (]: 68 of 97 START sql table model main.dim_produto_credito ........................ [RUN]
[0m20:02:42.007049 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m20:02:42.007049 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m20:02:42.009834 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m20:02:42.010419 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m20:02:42.012436 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m20:02:42.012436 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m20:02:42.013952 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m20:02:42.013952 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.015131 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:42.015131 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m20:02:42.015719 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m20:02:42.016273 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.019795 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m20:02:42.021114 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m20:02:42.021638 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.022676 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m20:02:42.022676 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m20:02:42.023662 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m20:02:42.025175 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:42.026177 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m20:02:42.027683 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m20:02:42.027683 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.028758 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m20:02:42.029321 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A20EF90>]}
[0m20:02:42.029321 [info ] [Thread-1 (]: 68 of 97 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.02s]
[0m20:02:42.029321 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m20:02:42.029321 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m20:02:42.030881 [info ] [Thread-1 (]: 69 of 97 START sql table model main.dim_regiao ................................. [RUN]
[0m20:02:42.031957 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m20:02:42.032361 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m20:02:42.037019 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m20:02:42.037564 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m20:02:42.040083 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m20:02:42.041082 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m20:02:42.041082 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m20:02:42.041082 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.042584 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.042584 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m20:02:42.042584 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m20:02:42.042584 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.045687 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m20:02:42.045687 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m20:02:42.046701 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.047952 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m20:02:42.047952 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m20:02:42.047952 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m20:02:42.050026 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:42.051011 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m20:02:42.051011 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m20:02:42.052694 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.052694 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m20:02:42.053717 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000182981C9880>]}
[0m20:02:42.054251 [info ] [Thread-1 (]: 69 of 97 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.02s]
[0m20:02:42.054764 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m20:02:42.054764 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m20:02:42.055768 [info ] [Thread-1 (]: 70 of 97 START sql table model main.dim_risco .................................. [RUN]
[0m20:02:42.055768 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m20:02:42.055768 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m20:02:42.058882 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m20:02:42.059952 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m20:02:42.061619 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m20:02:42.062652 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m20:02:42.062652 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m20:02:42.062652 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.063974 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.063974 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m20:02:42.063974 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m20:02:42.065150 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:42.067185 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m20:02:42.068192 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m20:02:42.069191 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.070707 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m20:02:42.070707 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m20:02:42.070707 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m20:02:42.073228 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:42.074304 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m20:02:42.074304 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m20:02:42.075832 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.075832 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m20:02:42.075832 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A395280>]}
[0m20:02:42.077362 [info ] [Thread-1 (]: 70 of 97 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.02s]
[0m20:02:42.077362 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m20:02:42.078383 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m20:02:42.078383 [info ] [Thread-1 (]: 71 of 97 START sql table model main.dim_segmento ............................... [RUN]
[0m20:02:42.078934 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m20:02:42.079499 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m20:02:42.081754 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m20:02:42.082339 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m20:02:42.085873 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m20:02:42.086871 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m20:02:42.086871 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m20:02:42.087575 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.087575 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.087575 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m20:02:42.087575 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m20:02:42.089201 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:42.091222 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m20:02:42.091222 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m20:02:42.092224 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.092224 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m20:02:42.092224 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m20:02:42.093732 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m20:02:42.094854 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:42.097537 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m20:02:42.097537 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m20:02:42.097537 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.099055 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m20:02:42.099055 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000182993AA8A0>]}
[0m20:02:42.100068 [info ] [Thread-1 (]: 71 of 97 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.02s]
[0m20:02:42.100068 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m20:02:42.101070 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m20:02:42.101070 [info ] [Thread-1 (]: 72 of 97 START test not_null_dim_classe_instituicao_id_classe .................. [RUN]
[0m20:02:42.101070 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m20:02:42.101070 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m20:02:42.104644 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m20:02:42.105648 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m20:02:42.107856 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m20:02:42.108525 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m20:02:42.108525 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m20:02:42.108525 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.109538 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.109538 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m20:02:42.110208 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m20:02:42.110208 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.111760 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m20:02:42.112775 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m20:02:42.112775 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m20:02:42.113317 [info ] [Thread-1 (]: 72 of 97 PASS not_null_dim_classe_instituicao_id_classe ........................ [[32mPASS[0m in 0.01s]
[0m20:02:42.113823 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m20:02:42.114364 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m20:02:42.114911 [info ] [Thread-1 (]: 73 of 97 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m20:02:42.114911 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m20:02:42.115439 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m20:02:42.119545 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m20:02:42.121179 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m20:02:42.122203 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m20:02:42.123318 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m20:02:42.123848 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m20:02:42.123848 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.123848 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.124870 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m20:02:42.124870 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:42.125893 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:42.128409 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m20:02:42.129552 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m20:02:42.130559 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m20:02:42.131062 [info ] [Thread-1 (]: 73 of 97 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.02s]
[0m20:02:42.131687 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m20:02:42.131687 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m20:02:42.132239 [info ] [Thread-1 (]: 74 of 97 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m20:02:42.132239 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m20:02:42.132239 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m20:02:42.135360 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m20:02:42.136882 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m20:02:42.138444 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m20:02:42.138966 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m20:02:42.138966 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m20:02:42.138966 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.139979 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.139979 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m20:02:42.139979 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m20:02:42.141979 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:42.142982 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m20:02:42.144000 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m20:02:42.144506 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m20:02:42.144830 [info ] [Thread-1 (]: 74 of 97 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.01s]
[0m20:02:42.145333 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m20:02:42.145333 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m20:02:42.145333 [info ] [Thread-1 (]: 75 of 97 START test not_null_dim_consolidado_id_consolidado .................... [RUN]
[0m20:02:42.146336 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m20:02:42.146857 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m20:02:42.151471 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m20:02:42.152474 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m20:02:42.153560 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m20:02:42.154710 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m20:02:42.155731 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m20:02:42.155731 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.155731 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.155731 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m20:02:42.155731 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m20:02:42.157314 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.158336 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m20:02:42.161938 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m20:02:42.162505 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m20:02:42.162505 [info ] [Thread-1 (]: 75 of 97 PASS not_null_dim_consolidado_id_consolidado .......................... [[32mPASS[0m in 0.02s]
[0m20:02:42.162505 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m20:02:42.163830 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m20:02:42.164436 [info ] [Thread-1 (]: 76 of 97 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m20:02:42.164976 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m20:02:42.165549 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m20:02:42.169658 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m20:02:42.170863 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m20:02:42.171884 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m20:02:42.171884 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m20:02:42.173904 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m20:02:42.173904 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.174919 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:42.174919 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m20:02:42.174919 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:42.177955 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:02:42.178550 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m20:02:42.179575 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m20:02:42.180110 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m20:02:42.180633 [error] [Thread-1 (]: 76 of 97 FAIL 1852 relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[31mFAIL 1852[0m in 0.02s]
[0m20:02:42.181292 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m20:02:42.181292 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m20:02:42.182443 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e' to be skipped because of status 'fail'.  Reason: Got 1852 results, configured to fail if != 0.
[0m20:02:42.181885 [info ] [Thread-1 (]: 77 of 97 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m20:02:42.182443 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m20:02:42.182443 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m20:02:42.185982 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m20:02:42.187484 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m20:02:42.188990 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m20:02:42.189997 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m20:02:42.189997 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m20:02:42.189997 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.191000 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:42.191999 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m20:02:42.191999 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m20:02:42.192996 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:42.194526 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m20:02:42.195177 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m20:02:42.195177 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m20:02:42.195177 [info ] [Thread-1 (]: 77 of 97 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.01s]
[0m20:02:42.196848 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m20:02:42.196848 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m20:02:42.196848 [info ] [Thread-1 (]: 78 of 97 START test not_null_dim_controle_id_controle .......................... [RUN]
[0m20:02:42.198389 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m20:02:42.199013 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m20:02:42.201549 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m20:02:42.202573 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m20:02:42.204869 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m20:02:42.206754 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m20:02:42.207420 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m20:02:42.207420 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.207420 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.208423 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m20:02:42.208423 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m20:02:42.208423 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.210381 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m20:02:42.210381 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m20:02:42.211409 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m20:02:42.211409 [info ] [Thread-1 (]: 78 of 97 PASS not_null_dim_controle_id_controle ................................ [[32mPASS[0m in 0.01s]
[0m20:02:42.212643 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m20:02:42.212643 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m20:02:42.212643 [info ] [Thread-1 (]: 79 of 97 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m20:02:42.212643 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m20:02:42.214152 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m20:02:42.218479 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m20:02:42.219480 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m20:02:42.222337 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m20:02:42.223464 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m20:02:42.223464 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m20:02:42.223990 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.223990 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.223990 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m20:02:42.223990 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:02:42.226533 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:42.228087 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m20:02:42.228610 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m20:02:42.228610 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m20:02:42.228610 [info ] [Thread-1 (]: 79 of 97 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.02s]
[0m20:02:42.229639 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m20:02:42.229639 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m20:02:42.229639 [info ] [Thread-1 (]: 80 of 97 START test unique_dim_controle_id_controle ............................ [RUN]
[0m20:02:42.230686 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m20:02:42.230686 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m20:02:42.233998 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m20:02:42.235002 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m20:02:42.236530 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m20:02:42.237226 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m20:02:42.237226 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m20:02:42.237226 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.238234 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:42.238234 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m20:02:42.239232 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m20:02:42.240475 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:02:42.241492 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m20:02:42.241492 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m20:02:42.242491 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m20:02:42.242491 [info ] [Thread-1 (]: 80 of 97 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.01s]
[0m20:02:42.242491 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m20:02:42.242491 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m20:02:42.244016 [info ] [Thread-1 (]: 81 of 97 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m20:02:42.244554 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m20:02:42.244554 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m20:02:42.247122 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m20:02:42.248645 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m20:02:42.251198 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m20:02:42.252243 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m20:02:42.252243 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m20:02:42.252243 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:42.253769 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:42.253769 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m20:02:42.253769 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m20:02:49.254995 [debug] [Thread-1 (]: SQL status: OK in 7.001 seconds
[0m20:02:49.257690 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m20:02:49.257690 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m20:02:49.258252 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:49.258252 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m20:02:49.258252 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m20:02:49.259813 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m20:02:49.396651 [debug] [Thread-1 (]: SQL status: OK in 0.137 seconds
[0m20:02:49.399193 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m20:02:49.399193 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m20:02:49.400222 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:49.401220 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m20:02:49.401220 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A372510>]}
[0m20:02:49.401750 [info ] [Thread-1 (]: 81 of 97 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 7.16s]
[0m20:02:49.402255 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m20:02:49.402255 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m20:02:49.402255 [info ] [Thread-1 (]: 82 of 97 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m20:02:49.403762 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m20:02:49.403762 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m20:02:49.405833 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m20:02:49.407956 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m20:02:49.410013 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m20:02:49.410888 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m20:02:49.411393 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m20:02:49.411393 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:49.411939 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:49.411939 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m20:02:49.412523 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m20:02:49.553787 [debug] [Thread-1 (]: SQL status: OK in 0.142 seconds
[0m20:02:49.557946 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m20:02:49.557946 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m20:02:49.558450 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:49.558921 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m20:02:49.559925 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m20:02:49.559925 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m20:02:49.580012 [debug] [Thread-1 (]: SQL status: OK in 0.019 seconds
[0m20:02:49.581676 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m20:02:49.581676 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m20:02:49.582682 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:49.583691 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m20:02:49.584203 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001829D71F950>]}
[0m20:02:49.584203 [info ] [Thread-1 (]: 82 of 97 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.18s]
[0m20:02:49.585207 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m20:02:49.585207 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m20:02:49.585207 [info ] [Thread-1 (]: 83 of 97 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m20:02:49.586844 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m20:02:49.586844 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m20:02:49.589930 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m20:02:49.591602 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m20:02:49.594622 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m20:02:49.595629 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m20:02:49.595629 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m20:02:49.596629 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:02:49.597138 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:02:49.597138 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m20:02:49.597138 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m20:03:00.639906 [debug] [Thread-1 (]: SQL status: OK in 11.042 seconds
[0m20:03:00.641920 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m20:03:00.642457 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m20:03:00.642457 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:00.643965 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m20:03:00.644483 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m20:03:00.644483 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m20:03:00.684865 [debug] [Thread-1 (]: SQL status: OK in 0.041 seconds
[0m20:03:00.687437 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m20:03:00.687437 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m20:03:00.688445 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:00.689445 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m20:03:00.689981 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828A275160>]}
[0m20:03:00.689981 [info ] [Thread-1 (]: 83 of 97 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 11.10s]
[0m20:03:00.690975 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m20:03:00.690975 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m20:03:00.690975 [info ] [Thread-1 (]: 84 of 97 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m20:03:00.691974 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m20:03:00.691974 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m20:03:00.695132 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m20:03:00.695132 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m20:03:00.698259 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m20:03:00.698775 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m20:03:00.699780 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m20:03:00.699780 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:00.700403 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:00.700403 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m20:03:00.700403 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m20:03:00.908368 [debug] [Thread-1 (]: SQL status: OK in 0.207 seconds
[0m20:03:00.910011 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m20:03:00.910011 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m20:03:00.910011 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:00.911696 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m20:03:00.911696 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m20:03:00.912804 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m20:03:00.932660 [debug] [Thread-1 (]: SQL status: OK in 0.020 seconds
[0m20:03:00.937552 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m20:03:00.937552 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m20:03:00.937552 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:00.940212 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m20:03:00.940212 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000182993B8260>]}
[0m20:03:00.941228 [info ] [Thread-1 (]: 84 of 97 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.25s]
[0m20:03:00.942213 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m20:03:00.942213 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m20:03:00.942213 [info ] [Thread-1 (]: 85 of 97 START sql table model main.fato_risco_credito ......................... [RUN]
[0m20:03:00.942213 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m20:03:00.943718 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m20:03:00.947281 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m20:03:00.948801 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m20:03:00.951315 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m20:03:00.951315 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m20:03:00.952993 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m20:03:00.952993 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:00.953998 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:00.953998 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m20:03:00.954503 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m20:03:01.271943 [debug] [Thread-1 (]: SQL status: OK in 0.317 seconds
[0m20:03:01.274056 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m20:03:01.274056 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m20:03:01.275060 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.276080 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m20:03:01.276080 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m20:03:01.276080 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m20:03:01.327748 [debug] [Thread-1 (]: SQL status: OK in 0.051 seconds
[0m20:03:01.329022 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m20:03:01.329022 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m20:03:01.329022 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.330767 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m20:03:01.331564 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '8ef54f9c-e875-43ea-a847-72e6c9ecbdad', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000182981F0CB0>]}
[0m20:03:01.331955 [info ] [Thread-1 (]: 85 of 97 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.39s]
[0m20:03:01.332580 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m20:03:01.333115 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m20:03:01.333115 [info ] [Thread-1 (]: 86 of 97 START test not_null_dim_segmento_id_segmento .......................... [RUN]
[0m20:03:01.334140 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m20:03:01.334140 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m20:03:01.337474 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m20:03:01.337474 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m20:03:01.339790 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m20:03:01.340827 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m20:03:01.340827 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m20:03:01.341824 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:01.341824 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.341824 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m20:03:01.341824 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m20:03:01.342823 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.344573 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m20:03:01.345743 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m20:03:01.345743 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m20:03:01.346707 [info ] [Thread-1 (]: 86 of 97 PASS not_null_dim_segmento_id_segmento ................................ [[32mPASS[0m in 0.01s]
[0m20:03:01.347359 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m20:03:01.347359 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m20:03:01.347359 [info ] [Thread-1 (]: 87 of 97 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m20:03:01.348902 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m20:03:01.348902 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m20:03:01.352957 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m20:03:01.354062 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m20:03:01.355775 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m20:03:01.356375 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m20:03:01.356375 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m20:03:01.357482 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:01.358185 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:03:01.358185 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m20:03:01.358185 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:03:01.359876 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:03:01.360747 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m20:03:01.361484 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m20:03:01.361484 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m20:03:01.362591 [error] [Thread-1 (]: 87 of 97 FAIL 1220 relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[31mFAIL 1220[0m in 0.01s]
[0m20:03:01.362591 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m20:03:01.362591 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m20:03:01.362591 [info ] [Thread-1 (]: 88 of 97 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m20:03:01.362591 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e' to be skipped because of status 'fail'.  Reason: Got 1220 results, configured to fail if != 0.
[0m20:03:01.364493 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m20:03:01.364493 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m20:03:01.369609 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m20:03:01.371411 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m20:03:01.372038 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m20:03:01.373784 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m20:03:01.373784 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m20:03:01.373784 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:01.374905 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.374905 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m20:03:01.374905 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m20:03:01.375890 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:03:01.377498 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m20:03:01.378608 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m20:03:01.378608 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m20:03:01.379222 [info ] [Thread-1 (]: 88 of 97 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.01s]
[0m20:03:01.379851 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m20:03:01.380471 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m20:03:01.380471 [info ] [Thread-1 (]: 89 of 97 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m20:03:01.380471 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m20:03:01.381570 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m20:03:01.384474 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m20:03:01.385551 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m20:03:01.388251 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m20:03:01.388251 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m20:03:01.389270 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m20:03:01.389270 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:01.389270 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:03:01.389270 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m20:03:01.390926 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:03:01.392020 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:03:01.393039 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m20:03:01.394038 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m20:03:01.394640 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m20:03:01.394640 [info ] [Thread-1 (]: 89 of 97 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.01s]
[0m20:03:01.395670 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m20:03:01.395670 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m20:03:01.395670 [info ] [Thread-1 (]: 90 of 97 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m20:03:01.396748 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m20:03:01.396748 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m20:03:01.399238 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m20:03:01.400348 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m20:03:01.402518 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m20:03:01.402518 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m20:03:01.402518 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m20:03:01.404124 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:01.404714 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:03:01.404714 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m20:03:01.404714 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:03:01.405817 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.406362 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m20:03:01.407765 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m20:03:01.408371 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m20:03:01.408371 [info ] [Thread-1 (]: 90 of 97 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.01s]
[0m20:03:01.408371 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m20:03:01.408371 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m20:03:01.408371 [info ] [Thread-1 (]: 91 of 97 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m20:03:01.410263 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m20:03:01.410263 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m20:03:01.413927 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m20:03:01.414527 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m20:03:01.416953 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m20:03:01.417523 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m20:03:01.418173 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m20:03:01.418173 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:01.418173 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.418173 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m20:03:01.419822 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m20:03:01.419822 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.420636 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m20:03:01.420636 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m20:03:01.422504 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m20:03:01.422504 [info ] [Thread-1 (]: 91 of 97 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.01s]
[0m20:03:01.422504 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m20:03:01.422504 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m20:03:01.424335 [info ] [Thread-1 (]: 92 of 97 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m20:03:01.424335 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m20:03:01.424335 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m20:03:01.428057 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m20:03:01.429117 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m20:03:01.430895 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m20:03:01.431509 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m20:03:01.432777 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m20:03:01.432777 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:01.432777 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.432777 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m20:03:01.433888 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:03:01.434507 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.435628 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m20:03:01.437687 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m20:03:01.437687 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m20:03:01.438301 [info ] [Thread-1 (]: 92 of 97 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.01s]
[0m20:03:01.438301 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m20:03:01.439343 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m20:03:01.439343 [info ] [Thread-1 (]: 93 of 97 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m20:03:01.439955 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m20:03:01.439955 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m20:03:01.443049 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m20:03:01.443662 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m20:03:01.445453 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m20:03:01.446554 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m20:03:01.447671 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m20:03:01.447671 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:01.447671 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:03:01.448655 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m20:03:01.448655 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:03:01.449264 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.450372 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m20:03:01.451368 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m20:03:01.451980 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m20:03:01.451980 [info ] [Thread-1 (]: 93 of 97 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.01s]
[0m20:03:01.452584 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m20:03:01.452584 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m20:03:01.452584 [info ] [Thread-1 (]: 94 of 97 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m20:03:01.452584 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m20:03:01.454228 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m20:03:01.457436 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m20:03:01.458556 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m20:03:01.460276 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m20:03:01.460827 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m20:03:01.460827 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m20:03:01.461666 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:01.461666 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:03:01.462717 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m20:03:01.462717 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m20:03:01.463890 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:03:01.465025 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m20:03:01.465695 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m20:03:01.465695 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m20:03:01.466749 [info ] [Thread-1 (]: 94 of 97 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.01s]
[0m20:03:01.467354 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m20:03:01.467354 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m20:03:01.468466 [info ] [Thread-1 (]: 95 of 97 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m20:03:01.468466 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m20:03:01.468466 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m20:03:01.472162 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m20:03:01.474118 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m20:03:01.475898 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m20:03:01.476907 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m20:03:01.476907 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m20:03:01.476907 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:01.477905 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m20:03:01.477905 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m20:03:01.478518 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m20:03:01.481202 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m20:03:01.481820 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m20:03:01.482568 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m20:03:01.482568 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m20:03:01.482568 [info ] [Thread-1 (]: 95 of 97 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.01s]
[0m20:03:01.484208 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m20:03:01.484208 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m20:03:01.485340 [info ] [Thread-1 (]: 96 of 97 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m20:03:01.485340 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m20:03:01.485340 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m20:03:01.489249 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m20:03:01.490370 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m20:03:01.492021 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m20:03:01.493129 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m20:03:01.493129 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m20:03:01.493129 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:01.494128 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.494128 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m20:03:01.494748 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m20:03:01.495058 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.495857 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m20:03:01.496853 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m20:03:01.497462 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m20:03:01.497462 [info ] [Thread-1 (]: 96 of 97 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.01s]
[0m20:03:01.498560 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m20:03:01.498560 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m20:03:01.499172 [info ] [Thread-1 (]: 97 of 97 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m20:03:01.499172 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m20:03:01.499172 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m20:03:01.502767 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m20:03:01.504426 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m20:03:01.507314 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m20:03:01.508414 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m20:03:01.509049 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m20:03:01.509049 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m20:03:01.509049 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.509049 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m20:03:01.510161 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m20:03:01.510161 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m20:03:01.511783 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m20:03:01.511783 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m20:03:01.512895 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m20:03:01.512895 [info ] [Thread-1 (]: 97 of 97 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.01s]
[0m20:03:01.513505 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m20:03:01.514907 [debug] [MainThread]: Using duckdb connection "master"
[0m20:03:01.515785 [debug] [MainThread]: On master: BEGIN
[0m20:03:01.515785 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m20:03:01.515785 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m20:03:01.516896 [debug] [MainThread]: On master: COMMIT
[0m20:03:01.516896 [debug] [MainThread]: Using duckdb connection "master"
[0m20:03:01.517498 [debug] [MainThread]: On master: COMMIT
[0m20:03:01.517498 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m20:03:01.517498 [debug] [MainThread]: On master: Close
[0m20:03:01.517498 [debug] [MainThread]: Connection 'master' was properly closed.
[0m20:03:01.517498 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m20:03:01.518592 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m20:03:01.518592 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m20:03:01.518592 [info ] [MainThread]: 
[0m20:03:01.519538 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 25.35 seconds (25.35s).
[0m20:03:01.527311 [debug] [MainThread]: Command end result
[0m20:03:01.612613 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m20:03:01.615283 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m20:03:01.622304 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m20:03:01.622304 [info ] [MainThread]: 
[0m20:03:01.622913 [info ] [MainThread]: [31mCompleted with 2 errors, 0 partial successes, and 0 warnings:[0m
[0m20:03:01.623519 [info ] [MainThread]: 
[0m20:03:01.624197 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)[0m
[0m20:03:01.624197 [error] [MainThread]:   Got 1852 results, configured to fail if != 0
[0m20:03:01.625318 [info ] [MainThread]: 
[0m20:03:01.625952 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_0eacdd127a052df6ef946b12273a2332.sql
[0m20:03:01.625952 [info ] [MainThread]: 
[0m20:03:01.625952 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)[0m
[0m20:03:01.625952 [error] [MainThread]:   Got 1220 results, configured to fail if != 0
[0m20:03:01.627504 [info ] [MainThread]: 
[0m20:03:01.627504 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_cf3f8176c8c99f31e0910db0802babb1.sql
[0m20:03:01.628571 [info ] [MainThread]: 
[0m20:03:01.628571 [info ] [MainThread]: Done. PASS=95 WARN=0 ERROR=2 SKIP=0 NO-OP=0 TOTAL=97
[0m20:03:01.629181 [debug] [MainThread]: Command `dbt build` failed at 20:03:01.629181 after 26.79 seconds
[0m20:03:01.629181 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828865A9F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000018285CD8770>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001828513E630>]}
[0m20:03:01.629181 [debug] [MainThread]: Flushing usage events
[0m20:03:02.443833 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m06:28:20.180685 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0D71CFD40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DA87EDB0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DA87FFE0>]}


============================== 06:28:20.185223 | 489d8884-2da8-411b-b575-cfecdc493de2 ==============================
[0m06:28:20.185223 [info ] [MainThread]: Running with dbt=1.11.5
[0m06:28:20.186206 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'invocation_command': 'dbt build', 'use_colors': 'True', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m06:28:20.429559 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DB8D1160>]}
[0m06:28:20.492010 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0D84B8C50>]}
[0m06:28:20.494015 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m06:28:20.754291 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m06:28:20.935676 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 1 files changed.
[0m06:28:20.935676 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_balanco_patrimonial.sql
[0m06:28:20.935676 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_capital_prudencial.sql
[0m06:28:20.937199 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_carteira_credito_indexador.sql
[0m06:28:20.937803 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_carteira_credito_totais.sql
[0m06:28:20.937803 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_demonstracao_resultado.sql
[0m06:28:20.938721 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_movimentacao_cambio.sql
[0m06:28:20.939226 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_operacoes_clientes.sql
[0m06:28:20.939226 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\fato_resumo_financeiro.sql
[0m06:28:20.939741 [debug] [MainThread]: Partial parsing: updated file: bacen_ifdata_analytics://models\gold\dim_instituicao.sql
[0m06:28:21.320751 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on
'fato_balanco_patrimonial' in package 'bacen_ifdata_analytics'
(models\gold\schema.yml). Arguments to generic tests should be nested under the
`arguments` property.
[0m06:28:21.321823 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0D791E5D0>]}
[0m06:28:21.511043 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m06:28:21.521863 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD062090>]}
[0m06:28:21.601216 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m06:28:21.604610 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m06:28:21.663911 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DCDA3B00>]}
[0m06:28:21.663911 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 31 sources, 590 macros
[0m06:28:21.670331 [info ] [MainThread]: 
[0m06:28:21.671337 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m06:28:21.672353 [info ] [MainThread]: 
[0m06:28:21.673363 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m06:28:21.681170 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m06:28:21.826946 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m06:28:21.827468 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m06:28:21.827468 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m06:28:22.462392 [debug] [ThreadPool]: SQL status: OK in 0.635 seconds
[0m06:28:22.463577 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m06:28:22.465160 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m06:28:22.465160 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m06:28:22.470621 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m06:28:22.470621 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m06:28:22.471200 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m06:28:22.472298 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m06:28:22.473352 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m06:28:22.473896 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m06:28:22.473896 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m06:28:22.474408 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m06:28:22.474408 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m06:28:22.476057 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m06:28:22.476632 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m06:28:22.477148 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m06:28:22.477751 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m06:28:22.478353 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m06:28:22.478353 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m06:28:22.480638 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m06:28:22.485782 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m06:28:22.486341 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m06:28:22.486341 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m06:28:22.486878 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m06:28:22.487391 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m06:28:22.487391 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m06:28:22.506497 [debug] [ThreadPool]: SQL status: OK in 0.019 seconds
[0m06:28:22.507552 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m06:28:22.508665 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m06:28:22.508665 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m06:28:22.509719 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD07B830>]}
[0m06:28:22.510276 [debug] [MainThread]: Using duckdb connection "master"
[0m06:28:22.510276 [debug] [MainThread]: On master: BEGIN
[0m06:28:22.510900 [debug] [MainThread]: Opening a new connection, currently in state init
[0m06:28:22.511499 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m06:28:22.511499 [debug] [MainThread]: On master: COMMIT
[0m06:28:22.512090 [debug] [MainThread]: Using duckdb connection "master"
[0m06:28:22.512090 [debug] [MainThread]: On master: COMMIT
[0m06:28:22.512602 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m06:28:22.512602 [debug] [MainThread]: On master: Close
[0m06:28:22.517721 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m06:28:22.517721 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m06:28:22.518761 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m06:28:22.518761 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m06:28:22.525986 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:28:22.527007 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m06:28:22.554527 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:28:22.555763 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:28:22.555763 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m06:28:22.556300 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m06:28:22.556300 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:22.556300 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:28:22.557311 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
    UNION ALL
    SELECT * FROM exchange
    UNION ALL
    SELECT * FROM portfolio_fallback
)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(nullif(segmento, '') as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(nullif(tipo_de_controle, '') as varchar)) as id_controle,
    md5(cast(nullif(consolidado_bancario, '') as varchar)) as id_consolidado,
    md5(cast(nullif(tipo_de_instituicao, '') as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m06:28:22.783063 [debug] [Thread-1 (]: SQL status: OK in 0.226 seconds
[0m06:28:22.787581 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:28:22.788591 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m06:28:22.789737 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:22.800253 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m06:28:22.800253 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:28:22.800253 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m06:28:22.807661 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m06:28:22.812471 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:28:22.812471 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m06:28:22.813531 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:22.815096 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m06:28:22.817807 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD07B7D0>]}
[0m06:28:22.818814 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.30s]
[0m06:28:22.818814 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m06:28:22.818814 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m06:28:22.820319 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m06:28:22.820319 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m06:28:22.820319 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m06:28:22.823880 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:28:22.824478 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m06:28:22.828124 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:28:22.829651 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:28:22.830219 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m06:28:22.830752 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:22.830752 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:22.830752 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:28:22.832282 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL

    UNION

    -- Fallback: localizações de instituições presentes apenas nas tabelas SCR
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources

UNION

-- Sentinel para instituições sem dados de localização (cidade, uf, regiao = NULL)
SELECT
    md5(cast('' as varchar)) as id_localizacao,
    NULL as cidade,
    NULL as uf,
    NULL as regiao
    );
  
  
[0m06:28:22.906395 [debug] [Thread-1 (]: SQL status: OK in 0.074 seconds
[0m06:28:22.910137 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:28:22.910137 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m06:28:22.911166 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:22.912159 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m06:28:22.912159 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:28:22.912159 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m06:28:22.914806 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:22.917201 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:28:22.917201 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m06:28:22.917201 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:22.918959 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m06:28:22.918959 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE70ED80>]}
[0m06:28:22.918959 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.10s]
[0m06:28:22.920471 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m06:28:22.920471 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m06:28:22.921575 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m06:28:22.922126 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m06:28:22.922682 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m06:28:22.925395 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m06:28:22.925395 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m06:28:22.929491 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m06:28:22.930165 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m06:28:22.930165 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m06:28:22.930165 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:22.931176 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:22.931176 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m06:28:22.931176 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m06:28:22.958120 [debug] [Thread-1 (]: SQL status: OK in 0.026 seconds
[0m06:28:22.960741 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m06:28:22.960741 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m06:28:22.960741 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:22.962246 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m06:28:22.962246 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m06:28:22.963255 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m06:28:22.964766 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:22.966793 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m06:28:22.966793 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m06:28:22.967358 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:22.968366 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m06:28:22.969366 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE721A00>]}
[0m06:28:22.969366 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.05s]
[0m06:28:22.970365 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m06:28:22.970871 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m06:28:22.970871 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m06:28:22.971375 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m06:28:22.971375 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m06:28:22.975403 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:28:22.977033 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m06:28:22.979549 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:28:22.981126 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:28:22.981126 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m06:28:22.982043 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:22.982587 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:22.982587 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:28:22.982587 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m06:28:23.446178 [debug] [Thread-1 (]: SQL status: OK in 0.464 seconds
[0m06:28:23.451000 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:28:23.452595 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m06:28:23.453182 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:23.454194 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m06:28:23.454743 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:28:23.455281 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m06:28:23.581870 [debug] [Thread-1 (]: SQL status: OK in 0.127 seconds
[0m06:28:23.583891 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:28:23.583891 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m06:28:23.584892 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:23.585892 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m06:28:23.585892 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD04EE40>]}
[0m06:28:23.585892 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.61s]
[0m06:28:23.587401 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m06:28:23.587996 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m06:28:23.587996 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m06:28:23.587996 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m06:28:23.587996 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m06:28:23.591845 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:28:23.592862 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m06:28:23.595402 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:28:23.596755 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:28:23.596755 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m06:28:23.596755 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:23.597752 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:23.597752 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:28:23.597752 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m06:28:23.782830 [debug] [Thread-1 (]: SQL status: OK in 0.184 seconds
[0m06:28:23.784830 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:28:23.785845 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m06:28:23.785845 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:23.787353 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m06:28:23.787353 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:28:23.787899 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m06:28:23.798791 [debug] [Thread-1 (]: SQL status: OK in 0.011 seconds
[0m06:28:23.800530 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:28:23.801118 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m06:28:23.801118 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:23.801118 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m06:28:23.802706 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE716900>]}
[0m06:28:23.803237 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.21s]
[0m06:28:23.803237 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m06:28:23.804241 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m06:28:23.804241 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m06:28:23.804744 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m06:28:23.805280 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m06:28:23.807861 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:28:23.808534 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m06:28:23.813764 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:28:23.814774 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:28:23.814774 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m06:28:23.814774 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:23.816347 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:23.816347 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:28:23.816926 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m06:28:23.868496 [debug] [Thread-1 (]: SQL status: OK in 0.051 seconds
[0m06:28:23.870496 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:28:23.871021 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m06:28:23.872214 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:23.872745 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m06:28:23.874262 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:28:23.874262 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m06:28:23.900376 [debug] [Thread-1 (]: SQL status: OK in 0.026 seconds
[0m06:28:23.902623 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:28:23.902623 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m06:28:23.903232 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:23.904262 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m06:28:23.904907 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE6B6C90>]}
[0m06:28:23.904907 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.10s]
[0m06:28:23.905501 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m06:28:23.905501 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m06:28:23.906513 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m06:28:23.907015 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m06:28:23.907015 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m06:28:23.910300 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:28:23.911328 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m06:28:23.914940 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:28:23.916978 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:28:23.917483 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m06:28:23.917483 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:23.918003 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:23.919024 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:28:23.919024 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m06:28:24.002668 [debug] [Thread-1 (]: SQL status: OK in 0.083 seconds
[0m06:28:24.006522 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:28:24.006522 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m06:28:24.007531 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:24.009044 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m06:28:24.009550 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:28:24.009550 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m06:28:24.078169 [debug] [Thread-1 (]: SQL status: OK in 0.069 seconds
[0m06:28:24.080297 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:28:24.080297 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m06:28:24.080297 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:24.081874 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m06:28:24.082906 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE777110>]}
[0m06:28:24.082906 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.18s]
[0m06:28:24.083887 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m06:28:24.083887 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m06:28:24.083887 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m06:28:24.084905 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m06:28:24.084905 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m06:28:24.090148 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:28:24.091683 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m06:28:24.095954 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:28:24.098616 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:28:24.098616 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m06:28:24.098616 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:24.100212 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:24.101224 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:28:24.102997 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH summary_prudential AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."prudential_conglomerates_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

summary_financial AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."financial_conglomerates_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

summary_individual AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."individual_institutions_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN summary_prudential r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN summary_financial r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN summary_individual r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m06:28:24.687729 [debug] [Thread-1 (]: SQL status: OK in 0.583 seconds
[0m06:28:24.690239 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:28:24.690239 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m06:28:24.691243 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:24.691829 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m06:28:24.692838 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:28:24.692838 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m06:28:24.813916 [debug] [Thread-1 (]: SQL status: OK in 0.121 seconds
[0m06:28:24.814946 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:28:24.816538 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m06:28:24.817085 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:24.818108 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m06:28:24.818108 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD5C0560>]}
[0m06:28:24.819105 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.73s]
[0m06:28:24.819105 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m06:28:24.819105 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m06:28:24.820614 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m06:28:24.821229 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m06:28:24.821752 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m06:28:24.823864 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:28:24.825376 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m06:28:24.826956 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:28:24.828273 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:28:24.828273 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m06:28:24.828273 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:24.829291 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:24.829796 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:28:24.830341 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m06:28:24.834940 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m06:28:24.837241 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:28:24.838079 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m06:28:24.838824 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:24.840355 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m06:28:24.840355 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:28:24.840355 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m06:28:24.845429 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m06:28:24.848503 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:28:24.848503 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m06:28:24.848503 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:24.850150 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m06:28:24.850150 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE6E9F10>]}
[0m06:28:24.850824 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.03s]
[0m06:28:24.851836 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m06:28:24.851836 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m06:28:24.853735 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m06:28:24.854273 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m06:28:24.854820 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m06:28:24.857662 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:28:24.858236 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m06:28:24.861265 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:28:24.862270 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:28:24.863275 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m06:28:24.863780 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:24.863780 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:24.863780 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:28:24.864803 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m06:28:24.894198 [debug] [Thread-1 (]: SQL status: OK in 0.029 seconds
[0m06:28:24.896720 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:28:24.896720 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m06:28:24.897723 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:24.898825 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m06:28:24.898825 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:28:24.899332 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m06:28:24.907266 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m06:28:24.909314 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:28:24.909820 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m06:28:24.910324 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:24.911331 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m06:28:24.911331 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD607CE0>]}
[0m06:28:24.912336 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.06s]
[0m06:28:24.912336 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m06:28:24.912336 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m06:28:24.913370 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m06:28:24.914098 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m06:28:24.914867 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m06:28:24.918186 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:28:24.918848 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m06:28:24.921864 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:28:24.922370 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:28:24.923377 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m06:28:24.923377 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:24.923882 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:24.924388 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:28:24.924388 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m06:28:25.213915 [debug] [Thread-1 (]: SQL status: OK in 0.289 seconds
[0m06:28:25.215484 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:28:25.216509 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m06:28:25.217093 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.217093 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m06:28:25.218126 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:28:25.218126 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m06:28:25.378163 [debug] [Thread-1 (]: SQL status: OK in 0.160 seconds
[0m06:28:25.381046 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:28:25.381046 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m06:28:25.382068 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.383229 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m06:28:25.383229 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE6B43E0>]}
[0m06:28:25.384229 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.47s]
[0m06:28:25.384229 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m06:28:25.385214 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m06:28:25.385214 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m06:28:25.386213 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m06:28:25.386213 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m06:28:25.386213 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m06:28:25.404651 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m06:28:25.404651 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m06:28:25.404651 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.405657 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.405657 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m06:28:25.405657 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m06:28:25.407551 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.416338 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m06:28:25.416338 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:28:25.425401 [debug] [Thread-1 (]: SQL status: OK in 0.010 seconds
[0m06:28:25.431209 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m06:28:25.433328 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m06:28:25.433328 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m06:28:25.433328 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m06:28:25.436331 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:25.436331 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m06:28:25.437959 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE730C20>]}
[0m06:28:25.437959 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.05s]
[0m06:28:25.437959 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m06:28:25.437959 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m06:28:25.439717 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m06:28:25.439717 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m06:28:25.439717 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m06:28:25.439717 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m06:28:25.445803 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m06:28:25.446815 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m06:28:25.448321 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.450613 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:25.451005 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m06:28:25.451619 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m06:28:25.453167 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.454681 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m06:28:25.454681 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:28:25.457072 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:25.459259 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m06:28:25.461379 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m06:28:25.462384 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m06:28:25.463874 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m06:28:25.464886 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:25.467288 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m06:28:25.468297 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE731F70>]}
[0m06:28:25.469296 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.03s]
[0m06:28:25.471456 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m06:28:25.472312 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m06:28:25.472997 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m06:28:25.475946 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m06:28:25.477466 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m06:28:25.478483 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m06:28:25.483502 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m06:28:25.484505 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m06:28:25.484505 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.485502 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.486505 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m06:28:25.486505 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m06:28:25.486505 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.488012 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m06:28:25.488012 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:28:25.490115 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:25.492248 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m06:28:25.494258 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m06:28:25.494764 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m06:28:25.495270 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m06:28:25.496278 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:25.499114 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m06:28:25.500123 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE70DBE0>]}
[0m06:28:25.500846 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.02s]
[0m06:28:25.501855 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m06:28:25.501855 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m06:28:25.501855 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m06:28:25.502852 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m06:28:25.503356 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m06:28:25.503356 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m06:28:25.507524 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m06:28:25.508189 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m06:28:25.508189 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.508189 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.509812 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m06:28:25.509812 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m06:28:25.509812 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.510826 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m06:28:25.510826 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:28:25.513371 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.513921 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m06:28:25.515431 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m06:28:25.515431 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m06:28:25.516437 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m06:28:25.517068 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.518074 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m06:28:25.518074 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD568FB0>]}
[0m06:28:25.518074 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.02s]
[0m06:28:25.519073 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m06:28:25.519073 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m06:28:25.519073 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m06:28:25.520601 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m06:28:25.521335 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m06:28:25.521335 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m06:28:25.524607 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m06:28:25.525625 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m06:28:25.525625 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.525625 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.525625 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m06:28:25.527253 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m06:28:25.527253 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.528287 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m06:28:25.529811 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:28:25.531826 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:25.532918 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m06:28:25.533917 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m06:28:25.533917 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m06:28:25.535423 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m06:28:25.536264 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.537780 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m06:28:25.537780 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE6E4E90>]}
[0m06:28:25.537780 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.02s]
[0m06:28:25.539452 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m06:28:25.539452 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m06:28:25.540458 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m06:28:25.540458 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m06:28:25.541457 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m06:28:25.541457 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m06:28:25.544588 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m06:28:25.544588 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m06:28:25.544588 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.545594 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.545594 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m06:28:25.545594 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m06:28:25.546611 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.547600 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m06:28:25.547600 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:28:25.548650 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.548650 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m06:28:25.551861 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m06:28:25.552401 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m06:28:25.552401 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m06:28:25.554039 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.554581 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m06:28:25.554581 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE74CB90>]}
[0m06:28:25.555585 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.01s]
[0m06:28:25.555585 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m06:28:25.555585 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m06:28:25.557110 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m06:28:25.557662 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m06:28:25.557662 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m06:28:25.558252 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m06:28:25.562277 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m06:28:25.562782 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m06:28:25.562782 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.563287 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.563919 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m06:28:25.563919 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m06:28:25.563919 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.564926 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m06:28:25.565431 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:28:25.567448 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:25.568054 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m06:28:25.570583 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m06:28:25.570583 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m06:28:25.571223 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m06:28:25.572343 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.572343 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m06:28:25.573348 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE74E0C0>]}
[0m06:28:25.573348 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.01s]
[0m06:28:25.574505 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m06:28:25.574505 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m06:28:25.575538 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m06:28:25.577291 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m06:28:25.577291 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m06:28:25.577291 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m06:28:25.580812 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m06:28:25.582328 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m06:28:25.582328 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.583337 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.583984 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m06:28:25.583984 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m06:28:25.584999 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.585993 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m06:28:25.585993 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:28:25.587502 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:25.588520 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m06:28:25.591435 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m06:28:25.591435 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m06:28:25.592013 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m06:28:25.593019 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.594045 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m06:28:25.594045 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE74F020>]}
[0m06:28:25.594045 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.02s]
[0m06:28:25.595739 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m06:28:25.595739 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m06:28:25.596749 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m06:28:25.596749 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m06:28:25.597748 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m06:28:25.598252 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m06:28:25.601444 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m06:28:25.601444 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m06:28:25.601949 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.602453 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.602453 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m06:28:25.603032 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m06:28:25.603032 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.603032 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m06:28:25.604384 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:28:25.605390 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.606481 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m06:28:25.608068 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m06:28:25.608656 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m06:28:25.608656 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m06:28:25.610371 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.611377 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m06:28:25.611377 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE6CDAF0>]}
[0m06:28:25.611377 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.01s]
[0m06:28:25.612392 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m06:28:25.612392 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m06:28:25.613461 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m06:28:25.613965 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m06:28:25.613965 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m06:28:25.614583 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m06:28:25.617127 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m06:28:25.618221 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m06:28:25.618221 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.618221 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.619202 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m06:28:25.619202 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m06:28:25.619202 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.620202 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m06:28:25.620202 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:28:25.621302 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.622532 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m06:28:25.624044 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m06:28:25.624774 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m06:28:25.624774 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m06:28:25.625926 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.625926 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m06:28:25.626932 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD61B830>]}
[0m06:28:25.627436 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.01s]
[0m06:28:25.627436 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m06:28:25.628440 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m06:28:25.628440 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m06:28:25.628440 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m06:28:25.629947 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m06:28:25.636120 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m06:28:25.637624 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m06:28:25.651120 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m06:28:25.652719 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m06:28:25.653529 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m06:28:25.653529 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.654214 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.654871 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m06:28:25.654871 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:25.656456 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.660092 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m06:28:25.661098 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m06:28:25.663032 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m06:28:25.663637 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.04s]
[0m06:28:25.664643 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m06:28:25.664643 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m06:28:25.664643 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m06:28:25.666285 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m06:28:25.666860 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m06:28:25.669413 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m06:28:25.670424 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m06:28:25.672156 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m06:28:25.674319 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m06:28:25.674319 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m06:28:25.674319 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.675353 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.675353 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m06:28:25.675883 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m06:28:25.675883 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.677896 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m06:28:25.679900 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m06:28:25.680404 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m06:28:25.680404 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.01s]
[0m06:28:25.681410 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m06:28:25.681410 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m06:28:25.681410 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m06:28:25.682409 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m06:28:25.682409 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m06:28:25.743071 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m06:28:25.744071 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m06:28:25.745741 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m06:28:25.747284 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m06:28:25.747284 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m06:28:25.748909 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.750292 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.750292 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m06:28:25.750797 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m06:28:25.753327 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m06:28:25.756613 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m06:28:25.757143 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m06:28:25.758191 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m06:28:25.758191 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.08s]
[0m06:28:25.758191 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m06:28:25.759779 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m06:28:25.759779 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m06:28:25.760301 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m06:28:25.760301 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m06:28:25.766602 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m06:28:25.767107 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m06:28:25.771499 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m06:28:25.772537 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m06:28:25.772537 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m06:28:25.772537 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.773567 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.773567 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m06:28:25.774130 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m06:28:25.774829 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.777141 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m06:28:25.778150 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m06:28:25.778150 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m06:28:25.779655 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m06:28:25.780271 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m06:28:25.780271 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m06:28:25.780271 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m06:28:25.781276 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m06:28:25.782277 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m06:28:25.785486 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m06:28:25.787251 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m06:28:25.789864 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m06:28:25.789864 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m06:28:25.791371 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m06:28:25.791371 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.791371 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.792379 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m06:28:25.792886 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:25.795750 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m06:28:25.797756 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m06:28:25.798763 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m06:28:25.798763 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m06:28:25.798763 [info ] [Thread-1 (]: 26 of 97 PASS relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[32mPASS[0m in 0.02s]
[0m06:28:25.798763 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m06:28:25.800363 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m06:28:25.800363 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m06:28:25.801369 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m06:28:25.801369 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m06:28:25.804433 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m06:28:25.805440 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m06:28:25.807499 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m06:28:25.808087 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m06:28:25.808703 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m06:28:25.808703 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.809709 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.810213 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m06:28:25.810213 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m06:28:25.811220 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.812226 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m06:28:25.813978 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m06:28:25.813978 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m06:28:25.813978 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.01s]
[0m06:28:25.814983 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m06:28:25.814983 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m06:28:25.814983 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m06:28:25.816620 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m06:28:25.817193 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m06:28:25.821429 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m06:28:25.822513 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m06:28:25.825611 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m06:28:25.827221 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m06:28:25.827221 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m06:28:25.827221 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.828226 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.828226 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m06:28:25.828226 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:28:25.828226 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.830311 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m06:28:25.830311 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m06:28:25.832523 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m06:28:25.834245 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.02s]
[0m06:28:25.835241 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m06:28:25.836244 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m06:28:25.836244 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m06:28:25.837750 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m06:28:25.837750 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m06:28:25.841882 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m06:28:25.842886 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m06:28:25.845042 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m06:28:25.846183 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m06:28:25.846183 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m06:28:25.848287 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.848815 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.848815 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m06:28:25.850340 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m06:28:25.853460 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m06:28:25.855987 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m06:28:25.856992 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m06:28:25.856992 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m06:28:25.857677 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.02s]
[0m06:28:25.858813 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m06:28:25.859326 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m06:28:25.859326 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m06:28:25.860334 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m06:28:25.860334 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m06:28:25.864494 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m06:28:25.866030 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m06:28:25.868079 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m06:28:25.869077 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m06:28:25.869077 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m06:28:25.869077 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.870585 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.870585 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m06:28:25.870585 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:28:25.871752 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.872271 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m06:28:25.872271 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m06:28:25.873800 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m06:28:25.873800 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.01s]
[0m06:28:25.874341 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m06:28:25.874341 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m06:28:25.875347 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m06:28:25.875347 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m06:28:25.875347 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m06:28:25.879443 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m06:28:25.880628 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m06:28:25.882139 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m06:28:25.883146 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m06:28:25.884143 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m06:28:25.884143 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.884143 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.885143 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m06:28:25.885143 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:25.885143 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.886143 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m06:28:25.887647 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m06:28:25.887647 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m06:28:25.887647 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.01s]
[0m06:28:25.889183 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m06:28:25.889183 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m06:28:25.889716 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m06:28:25.889716 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m06:28:25.889716 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m06:28:25.894265 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m06:28:25.894265 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m06:28:25.896705 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m06:28:25.897730 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m06:28:25.898857 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m06:28:25.898857 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.898857 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.900001 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m06:28:25.900001 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:25.904684 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m06:28:25.905712 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m06:28:25.906831 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m06:28:25.907366 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m06:28:25.908056 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m06:28:25.908810 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m06:28:25.909339 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m06:28:25.909875 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m06:28:25.910071 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m06:28:25.910071 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m06:28:25.916240 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m06:28:25.917352 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m06:28:25.919359 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m06:28:25.920358 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m06:28:25.920864 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m06:28:25.920864 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.921368 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.921368 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m06:28:25.922383 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:25.925653 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m06:28:25.927876 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m06:28:25.929887 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m06:28:25.930394 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m06:28:25.930394 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m06:28:25.930394 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m06:28:25.931898 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m06:28:25.931898 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m06:28:25.931898 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m06:28:25.932946 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m06:28:25.935906 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m06:28:25.935906 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m06:28:25.938037 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m06:28:25.939643 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m06:28:25.939643 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m06:28:25.939643 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.940650 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.940650 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m06:28:25.940650 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:28:25.941650 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.943866 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m06:28:25.944997 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m06:28:25.944997 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m06:28:25.945789 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.01s]
[0m06:28:25.945789 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m06:28:25.945789 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m06:28:25.947369 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m06:28:25.947369 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m06:28:25.947369 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m06:28:25.951097 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m06:28:25.952897 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m06:28:25.954585 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m06:28:25.955593 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m06:28:25.956819 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m06:28:25.957827 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.958332 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.958860 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m06:28:25.959372 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:25.959372 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:25.960884 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m06:28:25.960884 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m06:28:25.960884 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m06:28:25.962389 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m06:28:25.963395 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m06:28:25.963395 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m06:28:25.963899 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m06:28:25.963899 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
[0m06:28:25.964931 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m06:28:25.968113 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m06:28:25.969131 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m06:28:25.971917 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m06:28:25.974151 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m06:28:25.974151 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: BEGIN
[0m06:28:25.974722 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.975407 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:25.975407 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"
[0m06:28:25.975407 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:25.979692 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:25.980425 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: ROLLBACK
[0m06:28:25.980425 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391'
[0m06:28:25.982040 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391: Close
[0m06:28:25.982040 [info ] [Thread-1 (]: 36 of 97 PASS relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m06:28:25.982897 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m06:28:25.983910 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m06:28:25.983910 [info ] [Thread-1 (]: 37 of 97 START test relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m06:28:25.983910 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c)
[0m06:28:25.984907 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m06:28:25.988148 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m06:28:25.988148 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m06:28:25.995290 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m06:28:25.996294 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m06:28:25.997295 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: BEGIN
[0m06:28:25.997295 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:25.998811 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:25.998811 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"
[0m06:28:26.000669 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_capital_prudencial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.007175 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m06:28:26.009481 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: ROLLBACK
[0m06:28:26.010103 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c'
[0m06:28:26.011116 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c: Close
[0m06:28:26.011116 [info ] [Thread-1 (]: 37 of 97 PASS relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.03s]
[0m06:28:26.012620 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c
[0m06:28:26.012620 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m06:28:26.012620 [info ] [Thread-1 (]: 38 of 97 START test not_null_fato_carteira_credito_indexador_id_data ........... [RUN]
[0m06:28:26.013626 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_instituicao__id_instituicao__ref_dim_instituicao_.b9c1b22f8c, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f)
[0m06:28:26.013626 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m06:28:26.016230 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m06:28:26.017269 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m06:28:26.019687 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m06:28:26.021187 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m06:28:26.021187 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: BEGIN
[0m06:28:26.021741 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.022362 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.022362 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"
[0m06:28:26.022362 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.023370 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.024379 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: ROLLBACK
[0m06:28:26.025385 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f'
[0m06:28:26.025385 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f: Close
[0m06:28:26.025890 [info ] [Thread-1 (]: 38 of 97 PASS not_null_fato_carteira_credito_indexador_id_data ................. [[32mPASS[0m in 0.01s]
[0m06:28:26.025890 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f
[0m06:28:26.026955 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m06:28:26.026955 [info ] [Thread-1 (]: 39 of 97 START test not_null_fato_carteira_credito_indexador_id_instituicao .... [RUN]
[0m06:28:26.027661 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_data.8fc078031f, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22)
[0m06:28:26.027661 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m06:28:26.030434 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m06:28:26.030434 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m06:28:26.034365 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m06:28:26.036429 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m06:28:26.037058 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: BEGIN
[0m06:28:26.037058 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.037646 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.037646 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"
[0m06:28:26.038714 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_indexador"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.038714 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.040811 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: ROLLBACK
[0m06:28:26.042173 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22'
[0m06:28:26.042173 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22: Close
[0m06:28:26.042173 [info ] [Thread-1 (]: 39 of 97 PASS not_null_fato_carteira_credito_indexador_id_instituicao .......... [[32mPASS[0m in 0.01s]
[0m06:28:26.043290 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22
[0m06:28:26.043290 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m06:28:26.043290 [info ] [Thread-1 (]: 40 of 97 START test relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [RUN]
[0m06:28:26.044237 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_indexador_id_instituicao.a75109cf22, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a)
[0m06:28:26.044237 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m06:28:26.047582 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m06:28:26.048870 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m06:28:26.050869 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m06:28:26.052153 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m06:28:26.052671 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: BEGIN
[0m06:28:26.053350 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.054709 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.055657 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"
[0m06:28:26.055657 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.057743 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:26.058419 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: ROLLBACK
[0m06:28:26.059453 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a'
[0m06:28:26.059986 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a: Close
[0m06:28:26.059986 [info ] [Thread-1 (]: 40 of 97 PASS relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m06:28:26.061004 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a
[0m06:28:26.061004 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m06:28:26.061004 [info ] [Thread-1 (]: 41 of 97 START test relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m06:28:26.062510 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_data__id_data__ref_dim_tempo_.bdd0239a0a, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29)
[0m06:28:26.062510 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m06:28:26.066135 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m06:28:26.067171 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m06:28:26.069406 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m06:28:26.070897 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m06:28:26.071403 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: BEGIN
[0m06:28:26.071403 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.071403 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.072449 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"
[0m06:28:26.072449 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_indexador"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.075611 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m06:28:26.077151 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: ROLLBACK
[0m06:28:26.078169 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29'
[0m06:28:26.078169 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29: Close
[0m06:28:26.078169 [info ] [Thread-1 (]: 41 of 97 PASS relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m06:28:26.078169 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29
[0m06:28:26.079680 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m06:28:26.079680 [info ] [Thread-1 (]: 42 of 97 START test not_null_fato_carteira_credito_totais_id_data .............. [RUN]
[0m06:28:26.080253 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_indexador_id_instituicao__id_instituicao__ref_dim_instituicao_.d0e42b7f29, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6)
[0m06:28:26.080253 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m06:28:26.085042 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m06:28:26.085632 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m06:28:26.087287 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m06:28:26.087929 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m06:28:26.087929 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: BEGIN
[0m06:28:26.087929 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.089505 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.089505 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"
[0m06:28:26.089505 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.090536 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.092037 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: ROLLBACK
[0m06:28:26.093072 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6'
[0m06:28:26.093072 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6: Close
[0m06:28:26.093072 [info ] [Thread-1 (]: 42 of 97 PASS not_null_fato_carteira_credito_totais_id_data .................... [[32mPASS[0m in 0.01s]
[0m06:28:26.094053 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6
[0m06:28:26.094053 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m06:28:26.094053 [info ] [Thread-1 (]: 43 of 97 START test not_null_fato_carteira_credito_totais_id_instituicao ....... [RUN]
[0m06:28:26.095659 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_data.bdfcb49be6, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec)
[0m06:28:26.095659 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m06:28:26.098724 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m06:28:26.100372 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m06:28:26.103019 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m06:28:26.103019 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m06:28:26.103019 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: BEGIN
[0m06:28:26.104784 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.104784 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.105795 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"
[0m06:28:26.105795 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_totais"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.107203 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.107777 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: ROLLBACK
[0m06:28:26.108476 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec'
[0m06:28:26.109512 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec: Close
[0m06:28:26.109512 [info ] [Thread-1 (]: 43 of 97 PASS not_null_fato_carteira_credito_totais_id_instituicao ............. [[32mPASS[0m in 0.01s]
[0m06:28:26.110041 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec
[0m06:28:26.110041 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m06:28:26.111095 [info ] [Thread-1 (]: 44 of 97 START test relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [RUN]
[0m06:28:26.111095 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_totais_id_instituicao.d86e6398ec, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510)
[0m06:28:26.111095 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m06:28:26.115700 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m06:28:26.116213 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m06:28:26.118447 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m06:28:26.119435 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m06:28:26.119435 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: BEGIN
[0m06:28:26.120421 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.120940 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.120940 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"
[0m06:28:26.121463 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.123031 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.124282 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: ROLLBACK
[0m06:28:26.125003 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510'
[0m06:28:26.125003 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510: Close
[0m06:28:26.125642 [info ] [Thread-1 (]: 44 of 97 PASS relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.01s]
[0m06:28:26.125642 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510
[0m06:28:26.125642 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m06:28:26.125642 [info ] [Thread-1 (]: 45 of 97 START test relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m06:28:26.127280 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_data__id_data__ref_dim_tempo_.621b7c2510, now test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33)
[0m06:28:26.127280 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m06:28:26.131956 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m06:28:26.132850 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m06:28:26.134857 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m06:28:26.135456 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m06:28:26.135456 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: BEGIN
[0m06:28:26.136462 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.136462 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.137463 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"
[0m06:28:26.137463 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_carteira_credito_totais"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.139697 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m06:28:26.141718 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: ROLLBACK
[0m06:28:26.142223 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33'
[0m06:28:26.142223 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33: Close
[0m06:28:26.143229 [info ] [Thread-1 (]: 45 of 97 PASS relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.01s]
[0m06:28:26.144229 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33
[0m06:28:26.144229 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m06:28:26.144229 [info ] [Thread-1 (]: 46 of 97 START test not_null_fato_demonstracao_resultado_id_data ............... [RUN]
[0m06:28:26.145961 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_carteira_credito_totais_id_instituicao__id_instituicao__ref_dim_instituicao_.a79729ab33, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e)
[0m06:28:26.145961 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m06:28:26.148753 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m06:28:26.150461 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m06:28:26.153055 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m06:28:26.155806 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m06:28:26.156313 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: BEGIN
[0m06:28:26.156313 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.156816 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.157353 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"
[0m06:28:26.157938 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.158573 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.159578 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: ROLLBACK
[0m06:28:26.160080 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e'
[0m06:28:26.160080 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e: Close
[0m06:28:26.161385 [info ] [Thread-1 (]: 46 of 97 PASS not_null_fato_demonstracao_resultado_id_data ..................... [[32mPASS[0m in 0.02s]
[0m06:28:26.162402 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e
[0m06:28:26.162402 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m06:28:26.162402 [info ] [Thread-1 (]: 47 of 97 START test not_null_fato_demonstracao_resultado_id_instituicao ........ [RUN]
[0m06:28:26.163406 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_data.b7fc8fd40e, now test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6)
[0m06:28:26.164194 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m06:28:26.166969 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m06:28:26.167975 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m06:28:26.168976 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m06:28:26.171682 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m06:28:26.171682 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: BEGIN
[0m06:28:26.172316 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.172822 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.172822 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"
[0m06:28:26.172822 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_demonstracao_resultado"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.173827 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.174625 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: ROLLBACK
[0m06:28:26.176137 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6'
[0m06:28:26.176137 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6: Close
[0m06:28:26.176137 [info ] [Thread-1 (]: 47 of 97 PASS not_null_fato_demonstracao_resultado_id_instituicao .............. [[32mPASS[0m in 0.01s]
[0m06:28:26.177893 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6
[0m06:28:26.177893 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m06:28:26.178901 [info ] [Thread-1 (]: 48 of 97 START test relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [RUN]
[0m06:28:26.179902 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_demonstracao_resultado_id_instituicao.5d48c3d2c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6)
[0m06:28:26.180409 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m06:28:26.184928 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m06:28:26.185930 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m06:28:26.188106 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m06:28:26.189824 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m06:28:26.189824 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: BEGIN
[0m06:28:26.189824 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.189824 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.191569 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"
[0m06:28:26.192144 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.196269 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m06:28:26.196269 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: ROLLBACK
[0m06:28:26.197775 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6'
[0m06:28:26.198780 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6: Close
[0m06:28:26.198780 [info ] [Thread-1 (]: 48 of 97 PASS relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m06:28:26.198780 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6
[0m06:28:26.198780 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m06:28:26.200195 [info ] [Thread-1 (]: 49 of 97 START test relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m06:28:26.200195 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_data__id_data__ref_dim_tempo_.7bf767a7c6, now test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71)
[0m06:28:26.200195 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m06:28:26.204726 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m06:28:26.205304 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m06:28:26.207728 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m06:28:26.209152 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m06:28:26.209663 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: BEGIN
[0m06:28:26.209663 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.210260 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.210823 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"
[0m06:28:26.210823 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_demonstracao_resultado"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.218028 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m06:28:26.219029 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: ROLLBACK
[0m06:28:26.220535 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71'
[0m06:28:26.221151 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71: Close
[0m06:28:26.221151 [info ] [Thread-1 (]: 49 of 97 PASS relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m06:28:26.221777 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71
[0m06:28:26.222393 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m06:28:26.222393 [info ] [Thread-1 (]: 50 of 97 START test not_null_fato_movimentacao_cambio_id_data .................. [RUN]
[0m06:28:26.222393 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_demonstracao_resultado_id_instituicao__id_instituicao__ref_dim_instituicao_.ef75907a71, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962)
[0m06:28:26.223399 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m06:28:26.226128 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m06:28:26.227134 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m06:28:26.229632 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m06:28:26.230253 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m06:28:26.230253 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: BEGIN
[0m06:28:26.230253 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.231283 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.231283 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"
[0m06:28:26.231283 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.232286 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.233380 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: ROLLBACK
[0m06:28:26.234383 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962'
[0m06:28:26.234383 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962: Close
[0m06:28:26.235407 [info ] [Thread-1 (]: 50 of 97 PASS not_null_fato_movimentacao_cambio_id_data ........................ [[32mPASS[0m in 0.01s]
[0m06:28:26.235407 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962
[0m06:28:26.235407 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m06:28:26.235407 [info ] [Thread-1 (]: 51 of 97 START test not_null_fato_movimentacao_cambio_id_instituicao ........... [RUN]
[0m06:28:26.236914 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_data.fa68311962, now test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070)
[0m06:28:26.237427 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m06:28:26.240201 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m06:28:26.240201 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m06:28:26.244228 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m06:28:26.245234 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m06:28:26.245234 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: BEGIN
[0m06:28:26.246293 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.246293 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.247294 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"
[0m06:28:26.247294 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_movimentacao_cambio"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.248328 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.248835 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: ROLLBACK
[0m06:28:26.250188 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070'
[0m06:28:26.250691 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070: Close
[0m06:28:26.251328 [info ] [Thread-1 (]: 51 of 97 PASS not_null_fato_movimentacao_cambio_id_instituicao ................. [[32mPASS[0m in 0.01s]
[0m06:28:26.251328 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070
[0m06:28:26.251328 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m06:28:26.251328 [info ] [Thread-1 (]: 52 of 97 START test relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [RUN]
[0m06:28:26.252964 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_movimentacao_cambio_id_instituicao.c0baed0070, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013)
[0m06:28:26.252964 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m06:28:26.257741 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m06:28:26.258348 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m06:28:26.259894 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m06:28:26.260918 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m06:28:26.262427 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: BEGIN
[0m06:28:26.262427 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.263449 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.263449 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"
[0m06:28:26.264165 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.265178 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.266403 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: ROLLBACK
[0m06:28:26.266969 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013'
[0m06:28:26.266969 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013: Close
[0m06:28:26.267980 [info ] [Thread-1 (]: 52 of 97 PASS relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m06:28:26.268982 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013
[0m06:28:26.268982 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m06:28:26.268982 [info ] [Thread-1 (]: 53 of 97 START test relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m06:28:26.268982 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_data__id_data__ref_dim_tempo_.61d7ac8013, now test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59)
[0m06:28:26.270486 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m06:28:26.274144 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m06:28:26.275475 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m06:28:26.278161 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m06:28:26.278161 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m06:28:26.279665 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: BEGIN
[0m06:28:26.279665 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.280217 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.280217 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"
[0m06:28:26.281250 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_movimentacao_cambio"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.282823 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:26.284815 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: ROLLBACK
[0m06:28:26.285796 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59'
[0m06:28:26.285796 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59: Close
[0m06:28:26.286812 [info ] [Thread-1 (]: 53 of 97 PASS relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m06:28:26.286812 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59
[0m06:28:26.287691 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m06:28:26.287691 [info ] [Thread-1 (]: 54 of 97 START test not_null_fato_operacoes_clientes_id_data ................... [RUN]
[0m06:28:26.288305 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_movimentacao_cambio_id_instituicao__id_instituicao__ref_dim_instituicao_.dbd2e3bb59, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21)
[0m06:28:26.289311 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m06:28:26.292039 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m06:28:26.293069 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m06:28:26.295603 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m06:28:26.296617 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m06:28:26.296617 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: BEGIN
[0m06:28:26.296617 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.297615 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.297615 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"
[0m06:28:26.297615 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.299108 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.300618 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: ROLLBACK
[0m06:28:26.301313 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21'
[0m06:28:26.301313 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21: Close
[0m06:28:26.302944 [info ] [Thread-1 (]: 54 of 97 PASS not_null_fato_operacoes_clientes_id_data ......................... [[32mPASS[0m in 0.01s]
[0m06:28:26.302944 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21
[0m06:28:26.303696 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m06:28:26.304207 [info ] [Thread-1 (]: 55 of 97 START test not_null_fato_operacoes_clientes_id_instituicao ............ [RUN]
[0m06:28:26.305477 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_data.efb68a7b21, now test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004)
[0m06:28:26.305477 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m06:28:26.309005 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m06:28:26.310225 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m06:28:26.312761 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m06:28:26.313774 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m06:28:26.313774 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: BEGIN
[0m06:28:26.314960 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.314960 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.315466 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"
[0m06:28:26.315466 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_operacoes_clientes"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.316470 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.317086 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: ROLLBACK
[0m06:28:26.318118 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004'
[0m06:28:26.318714 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004: Close
[0m06:28:26.318714 [info ] [Thread-1 (]: 55 of 97 PASS not_null_fato_operacoes_clientes_id_instituicao .................. [[32mPASS[0m in 0.01s]
[0m06:28:26.319719 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004
[0m06:28:26.319719 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m06:28:26.320720 [info ] [Thread-1 (]: 56 of 97 START test relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [RUN]
[0m06:28:26.321223 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_operacoes_clientes_id_instituicao.805731e004, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5)
[0m06:28:26.321223 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m06:28:26.325523 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m06:28:26.327518 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m06:28:26.328552 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m06:28:26.330047 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m06:28:26.331062 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: BEGIN
[0m06:28:26.331062 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.332577 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.332577 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"
[0m06:28:26.332577 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.335364 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.336366 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: ROLLBACK
[0m06:28:26.336366 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5'
[0m06:28:26.337366 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5: Close
[0m06:28:26.337871 [info ] [Thread-1 (]: 56 of 97 PASS relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m06:28:26.337871 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5
[0m06:28:26.337871 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m06:28:26.339617 [info ] [Thread-1 (]: 57 of 97 START test relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m06:28:26.339617 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_data__id_data__ref_dim_tempo_.9db571ddf5, now test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871)
[0m06:28:26.340624 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m06:28:26.344137 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m06:28:26.345653 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m06:28:26.348170 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m06:28:26.349434 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m06:28:26.349434 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: BEGIN
[0m06:28:26.349946 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.350583 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.351353 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"
[0m06:28:26.351353 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_operacoes_clientes"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.354627 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m06:28:26.355640 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: ROLLBACK
[0m06:28:26.356797 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871'
[0m06:28:26.357345 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871: Close
[0m06:28:26.357345 [info ] [Thread-1 (]: 57 of 97 PASS relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m06:28:26.358005 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871
[0m06:28:26.358701 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m06:28:26.358701 [info ] [Thread-1 (]: 58 of 97 START test not_null_fato_resumo_financeiro_id_data .................... [RUN]
[0m06:28:26.359236 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_operacoes_clientes_id_instituicao__id_instituicao__ref_dim_instituicao_.283993c871, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946)
[0m06:28:26.359236 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m06:28:26.362345 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m06:28:26.363924 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m06:28:26.365676 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m06:28:26.367212 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m06:28:26.367718 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: BEGIN
[0m06:28:26.367718 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.367718 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.368724 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"
[0m06:28:26.368724 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.369721 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.370724 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: ROLLBACK
[0m06:28:26.371296 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946'
[0m06:28:26.371296 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946: Close
[0m06:28:26.372309 [info ] [Thread-1 (]: 58 of 97 PASS not_null_fato_resumo_financeiro_id_data .......................... [[32mPASS[0m in 0.01s]
[0m06:28:26.372309 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946
[0m06:28:26.372309 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m06:28:26.373614 [info ] [Thread-1 (]: 59 of 97 START test not_null_fato_resumo_financeiro_id_instituicao ............. [RUN]
[0m06:28:26.374317 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_data.1bbc863946, now test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7)
[0m06:28:26.374317 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m06:28:26.376828 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m06:28:26.377860 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m06:28:26.382387 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m06:28:26.383505 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m06:28:26.383505 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: BEGIN
[0m06:28:26.384487 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.384487 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.385503 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"
[0m06:28:26.386488 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_resumo_financeiro"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.387488 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.388600 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: ROLLBACK
[0m06:28:26.388600 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7'
[0m06:28:26.389600 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7: Close
[0m06:28:26.389600 [info ] [Thread-1 (]: 59 of 97 PASS not_null_fato_resumo_financeiro_id_instituicao ................... [[32mPASS[0m in 0.02s]
[0m06:28:26.390680 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7
[0m06:28:26.390680 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m06:28:26.390680 [info ] [Thread-1 (]: 60 of 97 START test relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [RUN]
[0m06:28:26.391682 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_resumo_financeiro_id_instituicao.40bd8e5dc7, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff)
[0m06:28:26.391682 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m06:28:26.395901 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m06:28:26.395901 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m06:28:26.399927 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m06:28:26.401242 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m06:28:26.401242 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: BEGIN
[0m06:28:26.401242 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.401242 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.402894 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"
[0m06:28:26.402894 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.405660 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:26.406723 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: ROLLBACK
[0m06:28:26.407808 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff'
[0m06:28:26.408313 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff: Close
[0m06:28:26.408313 [info ] [Thread-1 (]: 60 of 97 PASS relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.02s]
[0m06:28:26.409324 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff
[0m06:28:26.409324 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m06:28:26.409827 [info ] [Thread-1 (]: 61 of 97 START test relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m06:28:26.410329 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_data__id_data__ref_dim_tempo_.d11c3caeff, now test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a)
[0m06:28:26.410329 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m06:28:26.414760 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m06:28:26.414760 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m06:28:26.418042 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m06:28:26.419041 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m06:28:26.419041 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: BEGIN
[0m06:28:26.419041 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.419041 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.420547 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"
[0m06:28:26.420547 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_resumo_financeiro"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:26.427820 [debug] [Thread-1 (]: SQL status: OK in 0.006 seconds
[0m06:28:26.429829 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: ROLLBACK
[0m06:28:26.429829 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a'
[0m06:28:26.430962 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a: Close
[0m06:28:26.430962 [info ] [Thread-1 (]: 61 of 97 PASS relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m06:28:26.431970 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a
[0m06:28:26.431970 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_atividade
[0m06:28:26.433067 [info ] [Thread-1 (]: 62 of 97 START sql table model main.dim_atividade .............................. [RUN]
[0m06:28:26.433067 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_resumo_financeiro_id_instituicao__id_instituicao__ref_dim_instituicao_.277d6a556a, now model.bacen_ifdata_analytics.dim_atividade)
[0m06:28:26.433067 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_atividade
[0m06:28:26.436069 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_atividade"
[0m06:28:26.437577 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_atividade
[0m06:28:26.440084 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_atividade"
[0m06:28:26.440084 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m06:28:26.440084 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: BEGIN
[0m06:28:26.441589 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.442246 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.442958 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m06:28:26.442958 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_atividade__dbt_tmp"
  
    as (
      

SELECT 
    id_atividade,
    nome_atividade,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_atividade"
    );
  
  
[0m06:28:26.444470 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.446542 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m06:28:26.446542 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */
alter table "gold_warehouse"."main"."dim_atividade__dbt_tmp" rename to "dim_atividade"
[0m06:28:26.446542 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.447525 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m06:28:26.448548 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m06:28:26.448548 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: COMMIT
[0m06:28:26.450282 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.451793 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_atividade"
[0m06:28:26.451793 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_atividade"} */

      drop table if exists "gold_warehouse"."main"."dim_atividade__dbt_backup" cascade
    
[0m06:28:26.452796 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.453401 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_atividade: Close
[0m06:28:26.453401 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0EC5641D0>]}
[0m06:28:26.454433 [info ] [Thread-1 (]: 62 of 97 OK created sql table model main.dim_atividade ......................... [[32mOK[0m in 0.02s]
[0m06:28:26.454433 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_atividade
[0m06:28:26.455515 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m06:28:26.455515 [info ] [Thread-1 (]: 63 of 97 START sql table model main.dim_classe_instituicao ..................... [RUN]
[0m06:28:26.456643 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_atividade, now model.bacen_ifdata_analytics.dim_classe_instituicao)
[0m06:28:26.456643 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m06:28:26.459454 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m06:28:26.460462 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m06:28:26.463504 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m06:28:26.464780 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m06:28:26.464780 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: BEGIN
[0m06:28:26.464780 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:26.466296 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.466874 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m06:28:26.466874 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_classe,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_classe_instituicao"
    );
  
  
[0m06:28:26.467879 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.471413 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m06:28:26.471413 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */
alter table "gold_warehouse"."main"."dim_classe_instituicao__dbt_tmp" rename to "dim_classe_instituicao"
[0m06:28:26.472652 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.472652 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m06:28:26.473674 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m06:28:26.474182 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: COMMIT
[0m06:28:26.475323 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:26.476855 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_classe_instituicao"
[0m06:28:26.477862 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_classe_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_classe_instituicao__dbt_backup" cascade
    
[0m06:28:26.477862 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:26.478862 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_classe_instituicao: Close
[0m06:28:26.479861 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE6C30E0>]}
[0m06:28:27.290567 [debug] [Thread-1 (]: An error was encountered while trying to send an event
[0m06:28:27.292673 [info ] [Thread-1 (]: 63 of 97 OK created sql table model main.dim_classe_instituicao ................ [[32mOK[0m in 0.02s]
[0m06:28:27.294181 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_classe_instituicao
[0m06:28:27.294181 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_consolidado
[0m06:28:27.295188 [info ] [Thread-1 (]: 64 of 97 START sql table model main.dim_consolidado ............................ [RUN]
[0m06:28:27.295188 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_classe_instituicao, now model.bacen_ifdata_analytics.dim_consolidado)
[0m06:28:27.296622 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_consolidado
[0m06:28:27.298766 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m06:28:27.299850 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_consolidado
[0m06:28:27.302541 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_consolidado"
[0m06:28:27.303860 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m06:28:27.304373 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: BEGIN
[0m06:28:27.304373 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.304939 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.305504 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m06:28:27.305504 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_consolidado__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_consolidado,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_consolidado"
    );
  
  
[0m06:28:27.306527 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.308658 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m06:28:27.308658 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */
alter table "gold_warehouse"."main"."dim_consolidado__dbt_tmp" rename to "dim_consolidado"
[0m06:28:27.310166 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.311176 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m06:28:27.311176 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m06:28:27.311176 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: COMMIT
[0m06:28:27.313250 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.314833 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_consolidado"
[0m06:28:27.314833 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_consolidado"} */

      drop table if exists "gold_warehouse"."main"."dim_consolidado__dbt_backup" cascade
    
[0m06:28:27.314833 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.316491 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_consolidado: Close
[0m06:28:27.317079 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD1E9BB0>]}
[0m06:28:27.317079 [info ] [Thread-1 (]: 64 of 97 OK created sql table model main.dim_consolidado ....................... [[32mOK[0m in 0.02s]
[0m06:28:27.318094 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_consolidado
[0m06:28:27.318094 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_controle
[0m06:28:27.319092 [info ] [Thread-1 (]: 65 of 97 START sql table model main.dim_controle ............................... [RUN]
[0m06:28:27.319717 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_consolidado, now model.bacen_ifdata_analytics.dim_controle)
[0m06:28:27.319717 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_controle
[0m06:28:27.321815 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_controle"
[0m06:28:27.322337 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_controle
[0m06:28:27.325415 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_controle"
[0m06:28:27.326982 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m06:28:27.326982 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: BEGIN
[0m06:28:27.326982 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.327988 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.327988 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m06:28:27.327988 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_controle__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_controle,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_controle"
    );
  
  
[0m06:28:27.327988 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.331089 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m06:28:27.332088 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */
alter table "gold_warehouse"."main"."dim_controle__dbt_tmp" rename to "dim_controle"
[0m06:28:27.332595 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.333615 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m06:28:27.333615 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m06:28:27.333615 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: COMMIT
[0m06:28:27.335204 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.337714 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_controle"
[0m06:28:27.337714 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_controle"} */

      drop table if exists "gold_warehouse"."main"."dim_controle__dbt_backup" cascade
    
[0m06:28:27.337714 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.339838 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_controle: Close
[0m06:28:27.339838 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD1486E0>]}
[0m06:28:27.339838 [info ] [Thread-1 (]: 65 of 97 OK created sql table model main.dim_controle .......................... [[32mOK[0m in 0.02s]
[0m06:28:27.341446 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_controle
[0m06:28:27.341446 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m06:28:27.342024 [info ] [Thread-1 (]: 66 of 97 START sql table model main.dim_faixa_vencimento ....................... [RUN]
[0m06:28:27.342024 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_controle, now model.bacen_ifdata_analytics.dim_faixa_vencimento)
[0m06:28:27.343029 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m06:28:27.344030 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m06:28:27.346623 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m06:28:27.348676 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m06:28:27.348676 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m06:28:27.350271 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: BEGIN
[0m06:28:27.350271 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.350271 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.351433 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m06:28:27.351433 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp"
  
    as (
      

SELECT 
    id_faixa,
    nome_faixa,
    ordem,
    sufixo_coluna
FROM "gold_warehouse"."main"."seed_dim_faixa_vencimento"
    );
  
  
[0m06:28:27.352949 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.355976 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m06:28:27.356509 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */
alter table "gold_warehouse"."main"."dim_faixa_vencimento__dbt_tmp" rename to "dim_faixa_vencimento"
[0m06:28:27.356509 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.357625 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m06:28:27.358215 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m06:28:27.358215 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: COMMIT
[0m06:28:27.359811 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.360845 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_faixa_vencimento"
[0m06:28:27.362358 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_faixa_vencimento"} */

      drop table if exists "gold_warehouse"."main"."dim_faixa_vencimento__dbt_backup" cascade
    
[0m06:28:27.362358 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.363380 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_faixa_vencimento: Close
[0m06:28:27.363985 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DCB278C0>]}
[0m06:28:27.363985 [info ] [Thread-1 (]: 66 of 97 OK created sql table model main.dim_faixa_vencimento .................. [[32mOK[0m in 0.02s]
[0m06:28:27.364996 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_faixa_vencimento
[0m06:28:27.364996 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_porte
[0m06:28:27.366026 [info ] [Thread-1 (]: 67 of 97 START sql table model main.dim_porte .................................. [RUN]
[0m06:28:27.366532 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_faixa_vencimento, now model.bacen_ifdata_analytics.dim_porte)
[0m06:28:27.367046 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_porte
[0m06:28:27.371121 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_porte"
[0m06:28:27.371669 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_porte
[0m06:28:27.374984 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_porte"
[0m06:28:27.377139 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m06:28:27.377654 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: BEGIN
[0m06:28:27.377654 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.378660 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.378660 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m06:28:27.378660 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_porte__dbt_tmp"
  
    as (
      

SELECT 
    id_porte,
    nome_porte,
    coluna
FROM "gold_warehouse"."main"."seed_dim_porte"
    );
  
  
[0m06:28:27.380162 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.382118 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m06:28:27.383149 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */
alter table "gold_warehouse"."main"."dim_porte__dbt_tmp" rename to "dim_porte"
[0m06:28:27.383149 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.384139 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m06:28:27.384139 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m06:28:27.385137 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: COMMIT
[0m06:28:27.386123 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.388679 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_porte"
[0m06:28:27.388679 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_porte"} */

      drop table if exists "gold_warehouse"."main"."dim_porte__dbt_backup" cascade
    
[0m06:28:27.389690 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.390720 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_porte: Close
[0m06:28:27.390720 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD138C50>]}
[0m06:28:27.390720 [info ] [Thread-1 (]: 67 of 97 OK created sql table model main.dim_porte ............................. [[32mOK[0m in 0.02s]
[0m06:28:27.391735 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_porte
[0m06:28:27.392242 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_produto_credito
[0m06:28:27.392242 [info ] [Thread-1 (]: 68 of 97 START sql table model main.dim_produto_credito ........................ [RUN]
[0m06:28:27.393246 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_porte, now model.bacen_ifdata_analytics.dim_produto_credito)
[0m06:28:27.393246 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_produto_credito
[0m06:28:27.398818 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m06:28:27.400503 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_produto_credito
[0m06:28:27.403254 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_produto_credito"
[0m06:28:27.405319 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m06:28:27.405319 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: BEGIN
[0m06:28:27.405319 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.407708 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.409071 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m06:28:27.409747 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_produto_credito__dbt_tmp"
  
    as (
      

SELECT 
    id_produto,
    nome_produto,
    tipo_pessoa,
    prefixo_coluna
FROM "gold_warehouse"."main"."seed_dim_produto_credito"
    );
  
  
[0m06:28:27.410532 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.413092 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m06:28:27.413600 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */
alter table "gold_warehouse"."main"."dim_produto_credito__dbt_tmp" rename to "dim_produto_credito"
[0m06:28:27.414120 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.416943 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m06:28:27.417959 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m06:28:27.417959 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: COMMIT
[0m06:28:27.419063 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.421243 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_produto_credito"
[0m06:28:27.421243 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_produto_credito"} */

      drop table if exists "gold_warehouse"."main"."dim_produto_credito__dbt_backup" cascade
    
[0m06:28:27.421874 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.422757 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_produto_credito: Close
[0m06:28:27.423352 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE6E83E0>]}
[0m06:28:27.423862 [info ] [Thread-1 (]: 68 of 97 OK created sql table model main.dim_produto_credito ................... [[32mOK[0m in 0.03s]
[0m06:28:27.424429 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_produto_credito
[0m06:28:27.424944 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_regiao
[0m06:28:27.425497 [info ] [Thread-1 (]: 69 of 97 START sql table model main.dim_regiao ................................. [RUN]
[0m06:28:27.426025 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_produto_credito, now model.bacen_ifdata_analytics.dim_regiao)
[0m06:28:27.426025 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_regiao
[0m06:28:27.428178 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_regiao"
[0m06:28:27.429682 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_regiao
[0m06:28:27.431886 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_regiao"
[0m06:28:27.432838 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m06:28:27.432838 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: BEGIN
[0m06:28:27.432838 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.433856 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.433856 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m06:28:27.433856 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_regiao__dbt_tmp"
  
    as (
      

SELECT 
    id_regiao,
    nome_regiao,
    coluna
FROM "gold_warehouse"."main"."seed_dim_regiao"
    );
  
  
[0m06:28:27.434855 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.437924 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m06:28:27.437924 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */
alter table "gold_warehouse"."main"."dim_regiao__dbt_tmp" rename to "dim_regiao"
[0m06:28:27.437924 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.439540 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m06:28:27.439540 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m06:28:27.439540 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: COMMIT
[0m06:28:27.440553 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.442802 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_regiao"
[0m06:28:27.444316 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_regiao"} */

      drop table if exists "gold_warehouse"."main"."dim_regiao__dbt_backup" cascade
    
[0m06:28:27.445412 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.447435 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_regiao: Close
[0m06:28:27.447435 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD142030>]}
[0m06:28:27.447435 [info ] [Thread-1 (]: 69 of 97 OK created sql table model main.dim_regiao ............................ [[32mOK[0m in 0.02s]
[0m06:28:27.448482 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_regiao
[0m06:28:27.448482 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_risco
[0m06:28:27.448482 [info ] [Thread-1 (]: 70 of 97 START sql table model main.dim_risco .................................. [RUN]
[0m06:28:27.450023 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_regiao, now model.bacen_ifdata_analytics.dim_risco)
[0m06:28:27.450591 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_risco
[0m06:28:27.453423 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_risco"
[0m06:28:27.454435 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_risco
[0m06:28:27.457458 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_risco"
[0m06:28:27.459476 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m06:28:27.459476 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: BEGIN
[0m06:28:27.460066 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.460697 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.460697 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m06:28:27.460697 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_risco__dbt_tmp"
  
    as (
      

SELECT 
    id_risco,
    nome_risco,
    coluna
FROM "gold_warehouse"."main"."seed_dim_risco"
    );
  
  
[0m06:28:27.461724 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.463967 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m06:28:27.463967 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */
alter table "gold_warehouse"."main"."dim_risco__dbt_tmp" rename to "dim_risco"
[0m06:28:27.464973 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.466165 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m06:28:27.466165 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m06:28:27.466165 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: COMMIT
[0m06:28:27.467195 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.469252 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_risco"
[0m06:28:27.469252 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_risco"} */

      drop table if exists "gold_warehouse"."main"."dim_risco__dbt_backup" cascade
    
[0m06:28:27.470251 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.471262 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_risco: Close
[0m06:28:27.471827 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD10E870>]}
[0m06:28:27.471827 [info ] [Thread-1 (]: 70 of 97 OK created sql table model main.dim_risco ............................. [[32mOK[0m in 0.02s]
[0m06:28:27.472395 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_risco
[0m06:28:27.472395 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_segmento
[0m06:28:27.473401 [info ] [Thread-1 (]: 71 of 97 START sql table model main.dim_segmento ............................... [RUN]
[0m06:28:27.473919 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_risco, now model.bacen_ifdata_analytics.dim_segmento)
[0m06:28:27.474484 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_segmento
[0m06:28:27.476015 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_segmento"
[0m06:28:27.478547 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_segmento
[0m06:28:27.482069 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_segmento"
[0m06:28:27.482611 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m06:28:27.483606 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: BEGIN
[0m06:28:27.483606 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.483606 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.484605 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m06:28:27.484605 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_segmento__dbt_tmp"
  
    as (
      

SELECT 
    md5(cast(codigo as varchar)) as id_segmento,
    codigo,
    descricao
FROM "gold_warehouse"."main"."seed_dim_segmento"
    );
  
  
[0m06:28:27.485606 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.488158 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m06:28:27.488158 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */
alter table "gold_warehouse"."main"."dim_segmento__dbt_tmp" rename to "dim_segmento"
[0m06:28:27.488158 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.489681 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m06:28:27.489681 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m06:28:27.490700 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: COMMIT
[0m06:28:27.492479 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.494020 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_segmento"
[0m06:28:27.494020 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_segmento"} */

      drop table if exists "gold_warehouse"."main"."dim_segmento__dbt_backup" cascade
    
[0m06:28:27.495676 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.495676 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_segmento: Close
[0m06:28:27.496699 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE6E2510>]}
[0m06:28:27.496699 [info ] [Thread-1 (]: 71 of 97 OK created sql table model main.dim_segmento .......................... [[32mOK[0m in 0.02s]
[0m06:28:27.497682 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_segmento
[0m06:28:27.497682 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m06:28:27.498730 [info ] [Thread-1 (]: 72 of 97 START test not_null_dim_classe_instituicao_id_classe .................. [RUN]
[0m06:28:27.498730 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267)
[0m06:28:27.498730 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m06:28:27.501243 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m06:28:27.502887 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m06:28:27.504532 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m06:28:27.505538 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m06:28:27.505538 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: BEGIN
[0m06:28:27.506669 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.507317 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.507847 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"
[0m06:28:27.507847 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_classe
from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is null



  
  
      
    ) dbt_internal_test
[0m06:28:27.508408 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.509923 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: ROLLBACK
[0m06:28:27.510944 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267'
[0m06:28:27.510944 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267: Close
[0m06:28:27.510944 [info ] [Thread-1 (]: 72 of 97 PASS not_null_dim_classe_instituicao_id_classe ........................ [[32mPASS[0m in 0.01s]
[0m06:28:27.512453 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267
[0m06:28:27.512453 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m06:28:27.514131 [info ] [Thread-1 (]: 73 of 97 START test relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [RUN]
[0m06:28:27.515147 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_classe_instituicao_id_classe.526dd4f267, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0)
[0m06:28:27.515147 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m06:28:27.522875 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m06:28:27.523912 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m06:28:27.527633 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m06:28:27.529631 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m06:28:27.530136 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: BEGIN
[0m06:28:27.530136 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.530136 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.531143 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"
[0m06:28:27.531143 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_classe as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_classe is not null
),

parent as (
    select id_classe as to_field
    from "gold_warehouse"."main"."dim_classe_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:27.533346 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:27.535357 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: ROLLBACK
[0m06:28:27.536352 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0'
[0m06:28:27.536352 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0: Close
[0m06:28:27.536352 [info ] [Thread-1 (]: 73 of 97 PASS relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_  [[32mPASS[0m in 0.02s]
[0m06:28:27.537353 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0
[0m06:28:27.537933 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m06:28:27.537933 [info ] [Thread-1 (]: 74 of 97 START test unique_dim_classe_instituicao_id_classe .................... [RUN]
[0m06:28:27.538624 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_classe__id_classe__ref_dim_classe_instituicao_.381d3aa6e0, now test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19)
[0m06:28:27.539639 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m06:28:27.543088 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m06:28:27.544070 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m06:28:27.545862 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m06:28:27.547458 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m06:28:27.547458 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: BEGIN
[0m06:28:27.547458 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.548465 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.548465 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"
[0m06:28:27.548465 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_classe as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_classe_instituicao"
where id_classe is not null
group by id_classe
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m06:28:27.550701 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.551260 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: ROLLBACK
[0m06:28:27.552847 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19'
[0m06:28:27.552847 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19: Close
[0m06:28:27.552847 [info ] [Thread-1 (]: 74 of 97 PASS unique_dim_classe_instituicao_id_classe .......................... [[32mPASS[0m in 0.01s]
[0m06:28:27.554370 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19
[0m06:28:27.554370 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m06:28:27.554935 [info ] [Thread-1 (]: 75 of 97 START test not_null_dim_consolidado_id_consolidado .................... [RUN]
[0m06:28:27.555449 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_classe_instituicao_id_classe.c95c4dcb19, now test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340)
[0m06:28:27.556456 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m06:28:27.558655 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m06:28:27.560191 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m06:28:27.562196 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m06:28:27.562196 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m06:28:27.563227 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: BEGIN
[0m06:28:27.563731 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.563731 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.563731 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"
[0m06:28:27.564738 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_consolidado
from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is null



  
  
      
    ) dbt_internal_test
[0m06:28:27.565244 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.566250 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: ROLLBACK
[0m06:28:27.567260 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340'
[0m06:28:27.567766 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340: Close
[0m06:28:27.567766 [info ] [Thread-1 (]: 75 of 97 PASS not_null_dim_consolidado_id_consolidado .......................... [[32mPASS[0m in 0.01s]
[0m06:28:27.568773 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340
[0m06:28:27.568773 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m06:28:27.568773 [info ] [Thread-1 (]: 76 of 97 START test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [RUN]
[0m06:28:27.568773 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_consolidado_id_consolidado.942629b340, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e)
[0m06:28:27.568773 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m06:28:27.574088 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m06:28:27.575200 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m06:28:27.577234 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m06:28:27.577775 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m06:28:27.578787 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: BEGIN
[0m06:28:27.578787 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.578787 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.579784 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"
[0m06:28:27.579784 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_consolidado as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_consolidado is not null
),

parent as (
    select id_consolidado as to_field
    from "gold_warehouse"."main"."dim_consolidado"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:27.581365 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.582367 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: ROLLBACK
[0m06:28:27.582872 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e'
[0m06:28:27.582872 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e: Close
[0m06:28:27.583879 [error] [Thread-1 (]: 76 of 97 FAIL 1852 relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_  [[31mFAIL 1852[0m in 0.02s]
[0m06:28:27.583879 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e
[0m06:28:27.584878 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m06:28:27.584878 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e' to be skipped because of status 'fail'.  Reason: Got 1852 results, configured to fail if != 0.
[0m06:28:27.584878 [info ] [Thread-1 (]: 77 of 97 START test unique_dim_consolidado_id_consolidado ...................... [RUN]
[0m06:28:27.586559 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_.2ca81db67e, now test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862)
[0m06:28:27.586559 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m06:28:27.591306 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m06:28:27.591847 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m06:28:27.595889 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m06:28:27.595889 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m06:28:27.597393 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: BEGIN
[0m06:28:27.597393 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.597393 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:27.598400 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"
[0m06:28:27.598400 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_consolidado as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_consolidado"
where id_consolidado is not null
group by id_consolidado
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m06:28:27.599911 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.600972 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: ROLLBACK
[0m06:28:27.600972 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862'
[0m06:28:27.600972 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862: Close
[0m06:28:27.603193 [info ] [Thread-1 (]: 77 of 97 PASS unique_dim_consolidado_id_consolidado ............................ [[32mPASS[0m in 0.02s]
[0m06:28:27.603724 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862
[0m06:28:27.604235 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m06:28:27.604839 [info ] [Thread-1 (]: 78 of 97 START test not_null_dim_controle_id_controle .......................... [RUN]
[0m06:28:27.605386 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_consolidado_id_consolidado.297d579862, now test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21)
[0m06:28:27.605386 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m06:28:27.608418 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m06:28:27.609992 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m06:28:27.613523 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m06:28:27.614027 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m06:28:27.615034 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: BEGIN
[0m06:28:27.615034 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.616046 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.616046 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"
[0m06:28:27.617082 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_controle
from "gold_warehouse"."main"."dim_controle"
where id_controle is null



  
  
      
    ) dbt_internal_test
[0m06:28:27.618315 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.619327 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: ROLLBACK
[0m06:28:27.620321 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21'
[0m06:28:27.620826 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21: Close
[0m06:28:27.621331 [info ] [Thread-1 (]: 78 of 97 PASS not_null_dim_controle_id_controle ................................ [[32mPASS[0m in 0.02s]
[0m06:28:27.622336 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21
[0m06:28:27.622336 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m06:28:27.622336 [info ] [Thread-1 (]: 79 of 97 START test relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [RUN]
[0m06:28:27.623430 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_controle_id_controle.10a8c0fa21, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f)
[0m06:28:27.623981 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m06:28:27.627788 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m06:28:27.628770 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m06:28:27.631839 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m06:28:27.632882 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m06:28:27.633552 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: BEGIN
[0m06:28:27.633552 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.634097 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.634097 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"
[0m06:28:27.635128 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_controle as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_controle is not null
),

parent as (
    select id_controle as to_field
    from "gold_warehouse"."main"."dim_controle"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:27.636109 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.637636 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: ROLLBACK
[0m06:28:27.637636 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f'
[0m06:28:27.638673 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f: Close
[0m06:28:27.638673 [info ] [Thread-1 (]: 79 of 97 PASS relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_  [[32mPASS[0m in 0.02s]
[0m06:28:27.639652 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f
[0m06:28:27.639652 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m06:28:27.639652 [info ] [Thread-1 (]: 80 of 97 START test unique_dim_controle_id_controle ............................ [RUN]
[0m06:28:27.640676 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_controle__id_controle__ref_dim_controle_.e308bf0f9f, now test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c)
[0m06:28:27.640676 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m06:28:27.644360 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m06:28:27.645366 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m06:28:27.647379 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m06:28:27.648387 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m06:28:27.648892 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: BEGIN
[0m06:28:27.648892 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.650409 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.650993 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"
[0m06:28:27.650993 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_controle as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_controle"
where id_controle is not null
group by id_controle
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m06:28:27.653204 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:28:27.655295 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: ROLLBACK
[0m06:28:27.655295 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c'
[0m06:28:27.656317 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c: Close
[0m06:28:27.656848 [info ] [Thread-1 (]: 80 of 97 PASS unique_dim_controle_id_controle .................................. [[32mPASS[0m in 0.02s]
[0m06:28:27.657354 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c
[0m06:28:27.657890 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m06:28:27.658487 [info ] [Thread-1 (]: 81 of 97 START sql table model main.fato_carteira_credito_atividade ............ [RUN]
[0m06:28:27.660007 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_controle_id_controle.b7e020982c, now model.bacen_ifdata_analytics.fato_carteira_credito_atividade)
[0m06:28:27.660007 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m06:28:27.662553 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m06:28:27.664090 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m06:28:27.668643 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m06:28:27.669644 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m06:28:27.670644 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: BEGIN
[0m06:28:27.671148 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:27.671697 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:27.671697 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m06:28:27.672259 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        a.id_atividade,
        f.id_faixa,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_atividade" a ON u.nome_coluna LIKE a.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_atividade as id_atividade_economica,
    id_faixa as id_faixa_vencimento,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m06:28:35.028206 [debug] [Thread-1 (]: SQL status: OK in 7.356 seconds
[0m06:28:35.030342 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m06:28:35.030342 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_tmp" rename to "fato_carteira_credito_atividade"
[0m06:28:35.030342 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:35.032963 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m06:28:35.033962 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m06:28:35.033962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: COMMIT
[0m06:28:35.158103 [debug] [Thread-1 (]: SQL status: OK in 0.124 seconds
[0m06:28:35.159689 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"
[0m06:28:35.159689 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_atividade"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_atividade__dbt_backup" cascade
    
[0m06:28:35.160291 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:35.161319 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_atividade: Close
[0m06:28:35.161319 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DD144CE0>]}
[0m06:28:35.162320 [info ] [Thread-1 (]: 81 of 97 OK created sql table model main.fato_carteira_credito_atividade ....... [[32mOK[0m in 7.50s]
[0m06:28:35.162826 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_atividade
[0m06:28:35.162826 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m06:28:35.163352 [info ] [Thread-1 (]: 82 of 97 START sql table model main.fato_carteira_credito_porte ................ [RUN]
[0m06:28:35.163898 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_atividade, now model.bacen_ifdata_analytics.fato_carteira_credito_porte)
[0m06:28:35.163898 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m06:28:35.167080 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m06:28:35.168085 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m06:28:35.169103 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m06:28:35.171264 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m06:28:35.171835 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: BEGIN
[0m06:28:35.171835 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:35.172375 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:35.172375 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m06:28:35.172375 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_nao_individualizado_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_porte,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_porte" p ON u.nome_coluna = p.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_porte,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m06:28:35.318837 [debug] [Thread-1 (]: SQL status: OK in 0.147 seconds
[0m06:28:35.322362 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m06:28:35.322362 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_tmp" rename to "fato_carteira_credito_porte"
[0m06:28:35.322362 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:35.324116 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m06:28:35.324864 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m06:28:35.325566 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: COMMIT
[0m06:28:35.334193 [debug] [Thread-1 (]: SQL status: OK in 0.008 seconds
[0m06:28:35.336869 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_porte"
[0m06:28:35.337381 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_porte"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_porte__dbt_backup" cascade
    
[0m06:28:35.337711 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:35.338213 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_porte: Close
[0m06:28:35.338213 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0EC524230>]}
[0m06:28:35.339925 [info ] [Thread-1 (]: 82 of 97 OK created sql table model main.fato_carteira_credito_porte ........... [[32mOK[0m in 0.17s]
[0m06:28:35.339925 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_porte
[0m06:28:35.340931 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m06:28:35.340931 [info ] [Thread-1 (]: 83 of 97 START sql table model main.fato_carteira_credito_produto .............. [RUN]
[0m06:28:35.341930 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_porte, now model.bacen_ifdata_analytics.fato_carteira_credito_produto)
[0m06:28:35.341930 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m06:28:35.345575 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m06:28:35.346596 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m06:28:35.348653 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m06:28:35.348653 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m06:28:35.348653 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: BEGIN
[0m06:28:35.350291 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:35.350291 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:35.350291 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m06:28:35.351320 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp"
  
    as (
      

WITH unpivoted_pf AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_fisica, total_exterior_pessoa_fisica
            ))
        )
    )
),
pf_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pf u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PF', 'Ambos')
),
unpivoted_pj AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_carteira_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base,
                total_da_carteira_de_pessoa_juridica, total_exterior_pessoa_juridica
            ))
        )
    )
),
pj_mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        p.id_produto,
        f.id_faixa,
        u.valor
    FROM unpivoted_pj u
    JOIN "gold_warehouse"."main"."dim_produto_credito" p ON u.nome_coluna LIKE p.prefixo_coluna || '%'
    JOIN "gold_warehouse"."main"."dim_faixa_vencimento" f ON u.nome_coluna LIKE '%' || f.sufixo_coluna
    WHERE p.tipo_pessoa IN ('PJ', 'Ambos')
),
combined AS (
    SELECT * FROM pf_mapped
    UNION ALL
    SELECT * FROM pj_mapped
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    id_produto,
    id_faixa as id_faixa_vencimento,
    valor
FROM combined
WHERE valor IS NOT NULL
    );
  
  
[0m06:28:46.513771 [debug] [Thread-1 (]: SQL status: OK in 11.163 seconds
[0m06:28:46.516944 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m06:28:46.517955 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_tmp" rename to "fato_carteira_credito_produto"
[0m06:28:46.518954 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:46.520471 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m06:28:46.520471 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m06:28:46.521486 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: COMMIT
[0m06:28:46.561305 [debug] [Thread-1 (]: SQL status: OK in 0.040 seconds
[0m06:28:46.563912 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_produto"
[0m06:28:46.563912 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_produto"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_produto__dbt_backup" cascade
    
[0m06:28:46.563912 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:46.566962 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_produto: Close
[0m06:28:46.566962 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0EC59F2C0>]}
[0m06:28:46.566962 [info ] [Thread-1 (]: 83 of 97 OK created sql table model main.fato_carteira_credito_produto ......... [[32mOK[0m in 11.23s]
[0m06:28:46.567970 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_produto
[0m06:28:46.567970 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m06:28:46.568970 [info ] [Thread-1 (]: 84 of 97 START sql table model main.fato_regiao_credito ........................ [RUN]
[0m06:28:46.568970 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_produto, now model.bacen_ifdata_analytics.fato_regiao_credito)
[0m06:28:46.570513 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_regiao_credito
[0m06:28:46.572525 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m06:28:46.574036 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_regiao_credito
[0m06:28:46.576083 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m06:28:46.577087 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m06:28:46.577087 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: BEGIN
[0m06:28:46.577087 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:46.578634 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:46.578634 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m06:28:46.578634 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_regiao,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_regiao" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_regiao,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m06:28:46.844540 [debug] [Thread-1 (]: SQL status: OK in 0.266 seconds
[0m06:28:46.847625 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m06:28:46.847625 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */
alter table "gold_warehouse"."main"."fato_regiao_credito__dbt_tmp" rename to "fato_regiao_credito"
[0m06:28:46.848720 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:46.849226 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m06:28:46.850231 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m06:28:46.850231 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: COMMIT
[0m06:28:46.862339 [debug] [Thread-1 (]: SQL status: OK in 0.011 seconds
[0m06:28:46.865038 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_regiao_credito"
[0m06:28:46.865038 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_regiao_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_regiao_credito__dbt_backup" cascade
    
[0m06:28:46.866044 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:46.867055 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_regiao_credito: Close
[0m06:28:46.867055 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DE797590>]}
[0m06:28:46.868060 [info ] [Thread-1 (]: 84 of 97 OK created sql table model main.fato_regiao_credito ................... [[32mOK[0m in 0.30s]
[0m06:28:46.869061 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_regiao_credito
[0m06:28:46.869061 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_risco_credito
[0m06:28:46.870566 [info ] [Thread-1 (]: 85 of 97 START sql table model main.fato_risco_credito ......................... [RUN]
[0m06:28:46.871678 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_regiao_credito, now model.bacen_ifdata_analytics.fato_risco_credito)
[0m06:28:46.871678 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_risco_credito
[0m06:28:46.875387 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m06:28:46.877975 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_risco_credito
[0m06:28:46.880717 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_risco_credito"
[0m06:28:46.883241 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m06:28:46.883241 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: BEGIN
[0m06:28:46.883241 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:46.884240 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:46.884240 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m06:28:46.884240 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_risco_credito__dbt_tmp"
  
    as (
      

WITH unpivoted AS (
    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )

    UNION ALL

    SELECT 
        codigo, 
        data_base, 
        nome_coluna, 
        valor
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNPIVOT (
        valor FOR nome_coluna IN (
            COLUMNS(* EXCLUDE (
                instituicao, codigo, consolidado_bancario, tipo_de_consolidacao, tipo_de_controle,
                segmento_resolucao, segmento, cidade, uf, regiao, data_base, total_geral
            ))
        )
    )
),
mapped AS (
    SELECT
        u.codigo,
        u.data_base,
        r.id_risco,
        u.valor
    FROM unpivoted u
    JOIN "gold_warehouse"."main"."dim_risco" r ON u.nome_coluna = r.coluna
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    id_risco as id_nivel_risco,
    valor
FROM mapped
WHERE valor IS NOT NULL
    );
  
  
[0m06:28:47.217818 [debug] [Thread-1 (]: SQL status: OK in 0.333 seconds
[0m06:28:47.218819 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m06:28:47.218819 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */
alter table "gold_warehouse"."main"."fato_risco_credito__dbt_tmp" rename to "fato_risco_credito"
[0m06:28:47.220324 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:47.221331 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m06:28:47.221836 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m06:28:47.222340 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: COMMIT
[0m06:28:47.263829 [debug] [Thread-1 (]: SQL status: OK in 0.041 seconds
[0m06:28:47.264834 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_risco_credito"
[0m06:28:47.266648 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_risco_credito"} */

      drop table if exists "gold_warehouse"."main"."fato_risco_credito__dbt_backup" cascade
    
[0m06:28:47.266648 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:47.267189 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_risco_credito: Close
[0m06:28:47.268215 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '489d8884-2da8-411b-b575-cfecdc493de2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0EC59B0B0>]}
[0m06:28:47.268215 [info ] [Thread-1 (]: 85 of 97 OK created sql table model main.fato_risco_credito .................... [[32mOK[0m in 0.40s]
[0m06:28:47.269193 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_risco_credito
[0m06:28:47.269193 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m06:28:47.269193 [info ] [Thread-1 (]: 86 of 97 START test not_null_dim_segmento_id_segmento .......................... [RUN]
[0m06:28:47.270193 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_risco_credito, now test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e)
[0m06:28:47.270193 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m06:28:47.274354 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m06:28:47.275501 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m06:28:47.277595 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m06:28:47.278203 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m06:28:47.279204 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: BEGIN
[0m06:28:47.279204 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:47.279204 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:47.280202 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"
[0m06:28:47.280202 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_segmento
from "gold_warehouse"."main"."dim_segmento"
where id_segmento is null



  
  
      
    ) dbt_internal_test
[0m06:28:47.281250 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.281771 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: ROLLBACK
[0m06:28:47.282800 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e'
[0m06:28:47.282800 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e: Close
[0m06:28:47.282800 [info ] [Thread-1 (]: 86 of 97 PASS not_null_dim_segmento_id_segmento ................................ [[32mPASS[0m in 0.01s]
[0m06:28:47.284784 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e
[0m06:28:47.284784 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m06:28:47.284784 [info ] [Thread-1 (]: 87 of 97 START test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [RUN]
[0m06:28:47.285784 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_segmento_id_segmento.6f9c02e79e, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e)
[0m06:28:47.285784 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m06:28:47.289559 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m06:28:47.290597 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m06:28:47.293170 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m06:28:47.294668 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m06:28:47.294668 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: BEGIN
[0m06:28:47.294668 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:47.295673 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:47.295673 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"
[0m06:28:47.295673 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_segmento as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_segmento is not null
),

parent as (
    select id_segmento as to_field
    from "gold_warehouse"."main"."dim_segmento"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:47.297677 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.298711 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: ROLLBACK
[0m06:28:47.298711 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e'
[0m06:28:47.300317 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e: Close
[0m06:28:47.300317 [error] [Thread-1 (]: 87 of 97 FAIL 1180 relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_  [[31mFAIL 1180[0m in 0.01s]
[0m06:28:47.301330 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e
[0m06:28:47.301330 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m06:28:47.301330 [debug] [Thread-4 (]: Marking all children of 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e' to be skipped because of status 'fail'.  Reason: Got 1180 results, configured to fail if != 0.
[0m06:28:47.302398 [info ] [Thread-1 (]: 88 of 97 START test unique_dim_segmento_id_segmento ............................ [RUN]
[0m06:28:47.302398 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_.d385c7766e, now test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a)
[0m06:28:47.303318 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m06:28:47.306758 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m06:28:47.307931 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m06:28:47.309517 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m06:28:47.310022 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m06:28:47.311028 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: BEGIN
[0m06:28:47.311028 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:47.311028 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.311028 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"
[0m06:28:47.312535 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_segmento as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_segmento"
where id_segmento is not null
group by id_segmento
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m06:28:47.314048 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.315565 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: ROLLBACK
[0m06:28:47.316069 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a'
[0m06:28:47.316069 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a: Close
[0m06:28:47.317100 [info ] [Thread-1 (]: 88 of 97 PASS unique_dim_segmento_id_segmento .................................. [[32mPASS[0m in 0.01s]
[0m06:28:47.318188 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a
[0m06:28:47.318188 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m06:28:47.318720 [info ] [Thread-1 (]: 89 of 97 START test not_null_fato_carteira_credito_atividade_id_instituicao .... [RUN]
[0m06:28:47.318720 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_segmento_id_segmento.50e31d7c3a, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1)
[0m06:28:47.318720 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m06:28:47.322282 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m06:28:47.323940 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m06:28:47.326130 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m06:28:47.327131 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m06:28:47.327131 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: BEGIN
[0m06:28:47.327131 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:47.328613 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.328613 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"
[0m06:28:47.328613 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_atividade"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:47.330115 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:47.331123 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: ROLLBACK
[0m06:28:47.331123 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1'
[0m06:28:47.332130 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1: Close
[0m06:28:47.332130 [info ] [Thread-1 (]: 89 of 97 PASS not_null_fato_carteira_credito_atividade_id_instituicao .......... [[32mPASS[0m in 0.01s]
[0m06:28:47.333136 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1
[0m06:28:47.333136 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m06:28:47.334685 [info ] [Thread-1 (]: 90 of 97 START test not_null_fato_carteira_credito_porte_id_instituicao ........ [RUN]
[0m06:28:47.334685 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_atividade_id_instituicao.6b395296d1, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74)
[0m06:28:47.335697 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m06:28:47.337690 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m06:28:47.339470 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m06:28:47.340477 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m06:28:47.341980 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m06:28:47.342986 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: BEGIN
[0m06:28:47.342986 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:47.342986 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:47.343986 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"
[0m06:28:47.343986 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_porte"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:47.344491 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:47.345496 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: ROLLBACK
[0m06:28:47.346504 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74'
[0m06:28:47.346504 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74: Close
[0m06:28:47.347504 [info ] [Thread-1 (]: 90 of 97 PASS not_null_fato_carteira_credito_porte_id_instituicao .............. [[32mPASS[0m in 0.01s]
[0m06:28:47.347504 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74
[0m06:28:47.348958 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m06:28:47.348958 [info ] [Thread-1 (]: 91 of 97 START test not_null_fato_carteira_credito_produto_id_data ............. [RUN]
[0m06:28:47.349629 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_porte_id_instituicao.69912b1a74, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5)
[0m06:28:47.350139 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m06:28:47.352963 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m06:28:47.354733 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m06:28:47.357053 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m06:28:47.358158 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m06:28:47.358158 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: BEGIN
[0m06:28:47.358158 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:47.359893 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:47.359893 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"
[0m06:28:47.359893 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:28:47.360902 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.362408 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: ROLLBACK
[0m06:28:47.362408 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5'
[0m06:28:47.363431 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5: Close
[0m06:28:47.363938 [info ] [Thread-1 (]: 91 of 97 PASS not_null_fato_carteira_credito_produto_id_data ................... [[32mPASS[0m in 0.01s]
[0m06:28:47.363938 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5
[0m06:28:47.363938 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m06:28:47.365448 [info ] [Thread-1 (]: 92 of 97 START test not_null_fato_carteira_credito_produto_id_instituicao ...... [RUN]
[0m06:28:47.366106 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_data.49d6874cd5, now test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d)
[0m06:28:47.366625 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m06:28:47.368777 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m06:28:47.370281 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m06:28:47.372295 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m06:28:47.373867 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m06:28:47.373867 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: BEGIN
[0m06:28:47.374873 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:47.375379 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:47.375379 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"
[0m06:28:47.375379 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_carteira_credito_produto"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:47.376970 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.377986 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: ROLLBACK
[0m06:28:47.377986 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d'
[0m06:28:47.379494 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d: Close
[0m06:28:47.380197 [info ] [Thread-1 (]: 92 of 97 PASS not_null_fato_carteira_credito_produto_id_instituicao ............ [[32mPASS[0m in 0.01s]
[0m06:28:47.380900 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d
[0m06:28:47.380900 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m06:28:47.380900 [info ] [Thread-1 (]: 93 of 97 START test not_null_fato_regiao_credito_id_instituicao ................ [RUN]
[0m06:28:47.380900 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_carteira_credito_produto_id_instituicao.a9a1599a0d, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836)
[0m06:28:47.382413 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m06:28:47.384421 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m06:28:47.386421 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m06:28:47.387926 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m06:28:47.387926 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m06:28:47.389505 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: BEGIN
[0m06:28:47.390551 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:47.390551 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.391513 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"
[0m06:28:47.392018 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:47.392018 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:47.393022 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: ROLLBACK
[0m06:28:47.394527 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836'
[0m06:28:47.394527 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836: Close
[0m06:28:47.394527 [info ] [Thread-1 (]: 93 of 97 PASS not_null_fato_regiao_credito_id_instituicao ...................... [[32mPASS[0m in 0.01s]
[0m06:28:47.396036 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836
[0m06:28:47.397550 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m06:28:47.397550 [info ] [Thread-1 (]: 94 of 97 START test not_null_fato_regiao_credito_id_regiao ..................... [RUN]
[0m06:28:47.398573 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_instituicao.3389ff3836, now test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21)
[0m06:28:47.398573 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m06:28:47.404187 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m06:28:47.406500 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m06:28:47.408173 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m06:28:47.408173 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m06:28:47.410542 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: BEGIN
[0m06:28:47.410874 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:47.411637 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.412647 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"
[0m06:28:47.413152 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_regiao
from "gold_warehouse"."main"."fato_regiao_credito"
where id_regiao is null



  
  
      
    ) dbt_internal_test
[0m06:28:47.413658 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:28:47.413658 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: ROLLBACK
[0m06:28:47.415436 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21'
[0m06:28:47.415436 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21: Close
[0m06:28:47.416444 [info ] [Thread-1 (]: 94 of 97 PASS not_null_fato_regiao_credito_id_regiao ........................... [[32mPASS[0m in 0.02s]
[0m06:28:47.416948 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21
[0m06:28:47.417954 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m06:28:47.418973 [info ] [Thread-1 (]: 95 of 97 START test relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [RUN]
[0m06:28:47.418973 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_regiao_credito_id_regiao.9facd79f21, now test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5)
[0m06:28:47.420481 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m06:28:47.424559 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m06:28:47.426792 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m06:28:47.429893 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m06:28:47.431125 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m06:28:47.431125 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: BEGIN
[0m06:28:47.431125 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:47.432634 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.432634 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"
[0m06:28:47.432634 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_regiao as from_field
    from "gold_warehouse"."main"."fato_regiao_credito"
    where id_regiao is not null
),

parent as (
    select id_regiao as to_field
    from "gold_warehouse"."main"."dim_regiao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:28:47.436638 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m06:28:47.437639 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: ROLLBACK
[0m06:28:47.438768 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5'
[0m06:28:47.439294 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5: Close
[0m06:28:47.439858 [info ] [Thread-1 (]: 95 of 97 PASS relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_  [[32mPASS[0m in 0.02s]
[0m06:28:47.439858 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5
[0m06:28:47.441455 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m06:28:47.441455 [info ] [Thread-1 (]: 96 of 97 START test not_null_fato_risco_credito_id_instituicao ................. [RUN]
[0m06:28:47.442628 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_regiao_credito_id_regiao__id_regiao__ref_dim_regiao_.b813c6fee5, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4)
[0m06:28:47.442628 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m06:28:47.446797 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m06:28:47.447794 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m06:28:47.450727 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m06:28:47.451231 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m06:28:47.451231 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: BEGIN
[0m06:28:47.452990 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:47.452990 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.452990 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"
[0m06:28:47.452990 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_risco_credito"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:28:47.454760 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.456778 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: ROLLBACK
[0m06:28:47.458147 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4'
[0m06:28:47.458689 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4: Close
[0m06:28:47.459676 [info ] [Thread-1 (]: 96 of 97 PASS not_null_fato_risco_credito_id_instituicao ....................... [[32mPASS[0m in 0.02s]
[0m06:28:47.460316 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4
[0m06:28:47.461349 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m06:28:47.462328 [info ] [Thread-1 (]: 97 of 97 START test not_null_fato_risco_credito_id_nivel_risco ................. [RUN]
[0m06:28:47.462328 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_instituicao.afce1aebb4, now test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393)
[0m06:28:47.463414 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m06:28:47.466840 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m06:28:47.467846 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m06:28:47.470357 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m06:28:47.471365 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m06:28:47.472662 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: BEGIN
[0m06:28:47.473421 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:28:47.473951 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.474525 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"
[0m06:28:47.475146 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_nivel_risco
from "gold_warehouse"."main"."fato_risco_credito"
where id_nivel_risco is null



  
  
      
    ) dbt_internal_test
[0m06:28:47.475686 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:28:47.477202 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: ROLLBACK
[0m06:28:47.477202 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393'
[0m06:28:47.478210 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393: Close
[0m06:28:47.478210 [info ] [Thread-1 (]: 97 of 97 PASS not_null_fato_risco_credito_id_nivel_risco ....................... [[32mPASS[0m in 0.02s]
[0m06:28:47.478210 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393
[0m06:28:47.480327 [debug] [MainThread]: Using duckdb connection "master"
[0m06:28:47.480327 [debug] [MainThread]: On master: BEGIN
[0m06:28:47.480327 [debug] [MainThread]: Opening a new connection, currently in state closed
[0m06:28:47.481878 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m06:28:47.482884 [debug] [MainThread]: On master: COMMIT
[0m06:28:47.482884 [debug] [MainThread]: Using duckdb connection "master"
[0m06:28:47.482884 [debug] [MainThread]: On master: COMMIT
[0m06:28:47.482884 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m06:28:47.483882 [debug] [MainThread]: On master: Close
[0m06:28:47.483882 [debug] [MainThread]: Connection 'master' was properly closed.
[0m06:28:47.483882 [debug] [MainThread]: Connection 'create_gold_warehouse_main' was properly closed.
[0m06:28:47.483882 [debug] [MainThread]: Connection 'list_gold_warehouse_main' was properly closed.
[0m06:28:47.483882 [debug] [MainThread]: Connection 'test.bacen_ifdata_analytics.not_null_fato_risco_credito_id_nivel_risco.a8efac3393' was properly closed.
[0m06:28:47.484882 [info ] [MainThread]: 
[0m06:28:47.484882 [info ] [MainThread]: Finished running 10 seeds, 26 table models, 61 data tests in 0 hours 0 minutes and 25.81 seconds (25.81s).
[0m06:28:47.492961 [debug] [MainThread]: Command end result
[0m06:28:47.525461 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m06:28:47.530214 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m06:28:47.537567 [debug] [MainThread]: Wrote artifact RunExecutionResult to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\run_results.json
[0m06:28:47.537567 [info ] [MainThread]: 
[0m06:28:47.538601 [info ] [MainThread]: [31mCompleted with 2 errors, 0 partial successes, and 0 warnings:[0m
[0m06:28:47.539602 [info ] [MainThread]: 
[0m06:28:47.540009 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_consolidado__id_consolidado__ref_dim_consolidado_ (models\gold\schema.yml)[0m
[0m06:28:47.540009 [error] [MainThread]:   Got 1852 results, configured to fail if != 0
[0m06:28:47.540009 [info ] [MainThread]: 
[0m06:28:47.541025 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_0eacdd127a052df6ef946b12273a2332.sql
[0m06:28:47.541528 [info ] [MainThread]: 
[0m06:28:47.542081 [error] [MainThread]: [31mFailure in test relationships_dim_instituicao_id_segmento__id_segmento__ref_dim_segmento_ (models\gold\schema.yml)[0m
[0m06:28:47.542081 [error] [MainThread]:   Got 1180 results, configured to fail if != 0
[0m06:28:47.543087 [info ] [MainThread]: 
[0m06:28:47.543087 [info ] [MainThread]:   compiled code at target\compiled\bacen_ifdata_analytics\models\gold\schema.yml\relationships_dim_instituicao_cf3f8176c8c99f31e0910db0802babb1.sql
[0m06:28:47.543087 [info ] [MainThread]: 
[0m06:28:47.544086 [info ] [MainThread]: Done. PASS=95 WARN=0 ERROR=2 SKIP=0 NO-OP=0 TOTAL=97
[0m06:28:47.544086 [warn ] [MainThread]: [[33mWARNING[0m][DeprecationsSummary]: Deprecated functionality
Summary of encountered deprecations:
- MissingArgumentsPropertyInGenericTestDeprecation: 21 occurrences
To see all deprecation instances instead of just the first occurrence of each,
run command again with the `--show-all-deprecations` flag. You may also need to
run with `--no-partial-parse` as some deprecations are only encountered during
parsing.
[0m06:28:47.545634 [debug] [MainThread]: Command `dbt build` failed at 06:28:47.545634 after 27.70 seconds
[0m06:28:47.545634 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DAFF2450>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DAFF1700>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001D0DAFF23C0>]}
[0m06:28:47.546641 [debug] [MainThread]: Flushing usage events
[0m06:28:48.335889 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m06:32:20.098646 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020375F57530>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020375F578C0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020375F57590>]}


============================== 06:32:20.102800 | 67ca3b42-e2af-4c9a-a85b-20b230a464e4 ==============================
[0m06:32:20.102800 [info ] [MainThread]: Running with dbt=1.11.5
[0m06:32:20.103425 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'None', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt clean', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m06:32:20.230827 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '67ca3b42-e2af-4c9a-a85b-20b230a464e4', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020375FCCB00>]}
[0m06:32:20.400923 [debug] [MainThread]: Command `dbt clean` succeeded at 06:32:20.400923 after 0.62 seconds
[0m06:32:20.400923 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203778A6CF0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000203758FC560>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000020376380CE0>]}
[0m06:32:20.401968 [debug] [MainThread]: Flushing usage events
[0m06:32:21.249556 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m06:33:42.587860 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001161E441A90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000011623C38830>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000011623C3B9E0>]}


============================== 06:33:42.593124 | de574a4d-01cb-4c2b-a600-632b8a2ae42e ==============================
[0m06:33:42.593124 [info ] [MainThread]: Running with dbt=1.11.5
[0m06:33:42.594083 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'invocation_command': 'dbt clean', 'indirect_selection': 'eager', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m06:33:42.700771 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'de574a4d-01cb-4c2b-a600-632b8a2ae42e', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000011624604590>]}
[0m06:33:42.720298 [debug] [MainThread]: Command `dbt clean` succeeded at 06:33:42.720298 after 0.34 seconds
[0m06:33:42.720298 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000011624124380>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000116244A4BF0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000011624569AF0>]}
[0m06:33:42.721308 [debug] [MainThread]: Flushing usage events
[0m06:33:43.536484 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m06:35:08.050225 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AC1089E030>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AC12F90E00>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AC12F91160>]}


============================== 06:35:08.054593 | 5b9eef86-69df-4ae6-8a69-df385d9c3d14 ==============================
[0m06:35:08.054593 [info ] [MainThread]: Running with dbt=1.11.5
[0m06:35:08.055125 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m06:35:08.064888 [error] [MainThread]: Encountered an error:
Parsing Error
  Env var required but not provided: 'GOLD_DB_PATH'
[0m06:35:08.064888 [debug] [MainThread]: Command `dbt build` failed at 06:35:08.064888 after 0.18 seconds
[0m06:35:08.066443 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AC13A508F0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AC139BFE60>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001AC137579B0>]}
[0m06:35:08.066443 [debug] [MainThread]: Flushing usage events
[0m06:35:08.836436 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m06:52:50.284684 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026EDE9E1B80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026EE16B8950>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026EE16B9880>]}


============================== 06:52:50.291521 | 42358d47-c3e0-4d0e-a158-8f095be12666 ==============================
[0m06:52:50.291521 [info ] [MainThread]: Running with dbt=1.11.5
[0m06:52:50.292030 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m06:52:50.538301 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '42358d47-c3e0-4d0e-a158-8f095be12666', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026EE10D2C90>]}
[0m06:52:50.585355 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '42358d47-c3e0-4d0e-a158-8f095be12666', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026EE32DB530>]}
[0m06:52:50.629833 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m06:52:51.124104 [error] [MainThread]: Encountered an error:
Compilation Error
  dbt found 1 package(s) specified in packages.yml, but only 0 package(s) installed in dbt_packages. Run "dbt deps" to install package dependencies.
[0m06:52:51.125428 [debug] [MainThread]: Command `dbt build` failed at 06:52:51.125428 after 1.07 seconds
[0m06:52:51.125428 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026EE176B470>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026EE32D9DC0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026EE32DB470>]}
[0m06:52:51.125428 [debug] [MainThread]: Flushing usage events
[0m06:52:51.932838 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m06:54:11.521830 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002613E861AF0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026140F510A0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026140F51010>]}


============================== 06:54:11.525589 | 12c41243-f999-43be-a93b-143e76b2d260 ==============================
[0m06:54:11.525589 [info ] [MainThread]: Running with dbt=1.11.5
[0m06:54:11.527621 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m06:54:11.729991 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '12c41243-f999-43be-a93b-143e76b2d260', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002614303CB00>]}
[0m06:54:11.790816 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '12c41243-f999-43be-a93b-143e76b2d260', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002614059BF80>]}
[0m06:54:11.793319 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m06:54:11.977791 [error] [MainThread]: Encountered an error:
Compilation Error
  dbt found 1 package(s) specified in packages.yml, but only 0 package(s) installed in dbt_packages. Run "dbt deps" to install package dependencies.
[0m06:54:11.978797 [debug] [MainThread]: Command `dbt build` failed at 06:54:11.978797 after 0.62 seconds
[0m06:54:11.978797 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026141E77860>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026141E5BAD0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000026141F116D0>]}
[0m06:54:11.978797 [debug] [MainThread]: Flushing usage events
[0m06:54:12.830346 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m06:56:03.064026 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000014A6F5E9B80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000014A6BF6E5D0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000014A6F5E8650>]}


============================== 06:56:03.067944 | 396ea3e8-55db-4944-bcbf-b98671ab03e1 ==============================
[0m06:56:03.067944 [info ] [MainThread]: Running with dbt=1.11.5
[0m06:56:03.068944 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'False', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'indirect_selection': 'eager', 'invocation_command': 'dbt build', 'use_colors': 'True', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m06:56:03.248592 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '396ea3e8-55db-4944-bcbf-b98671ab03e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000014A6C95F290>]}
[0m06:56:03.301791 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '396ea3e8-55db-4944-bcbf-b98671ab03e1', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000014A6FFA99A0>]}
[0m06:56:03.304433 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m06:56:03.480405 [error] [MainThread]: Encountered an error:
Compilation Error
  dbt found 1 package(s) specified in packages.yml, but only 0 package(s) installed in dbt_packages. Run "dbt deps" to install package dependencies.
[0m06:56:03.481971 [debug] [MainThread]: Command `dbt build` failed at 06:56:03.481971 after 0.53 seconds
[0m06:56:03.481971 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000014A6FE68440>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000014A6FF4FB60>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x0000014A7111B7D0>]}
[0m06:56:03.481971 [debug] [MainThread]: Flushing usage events
[0m06:56:04.349934 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m06:56:44.103018 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BD655A7D40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BD6891FA40>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BD67F7F7A0>]}


============================== 06:56:44.106519 | eb18b5ba-c248-4001-a419-8cab2922d4b2 ==============================
[0m06:56:44.106519 [info ] [MainThread]: Running with dbt=1.11.5
[0m06:56:44.107528 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\Users\\alexc\\.dbt', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt deps --project-dir src/bacen_ifdata/data_analytics', 'use_experimental_parser': 'False', 'log_path': 'src\\bacen_ifdata\\data_analytics\\logs'}
[0m06:56:44.226792 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'eb18b5ba-c248-4001-a419-8cab2922d4b2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BD6A71AF30>]}
[0m06:56:44.282088 [debug] [MainThread]: Set downloads directory='C:\Users\alexc\AppData\Local\Temp\dbt-downloads-5wwxkkra'
[0m06:56:44.283179 [debug] [MainThread]: Making package index registry request: GET https://hub.getdbt.com/api/v1/index.json
[0m06:56:44.550825 [debug] [MainThread]: Response from registry index: GET https://hub.getdbt.com/api/v1/index.json 200
[0m06:56:44.553250 [debug] [MainThread]: Making package registry request: GET https://hub.getdbt.com/api/v1/dbt-labs/dbt_utils.json
[0m06:56:44.636119 [debug] [MainThread]: Response from registry: GET https://hub.getdbt.com/api/v1/dbt-labs/dbt_utils.json 200
[0m06:56:44.645511 [info ] [MainThread]: Installing dbt-labs/dbt_utils
[0m06:56:45.111259 [info ] [MainThread]: Installed from version 1.3.0
[0m06:56:45.111259 [info ] [MainThread]: Updated version available: 1.3.3
[0m06:56:45.112259 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'package', 'label': 'eb18b5ba-c248-4001-a419-8cab2922d4b2', 'property_': 'install', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BD6A863D70>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BD6A6FD880>]}
[0m06:56:45.112259 [info ] [MainThread]: 
[0m06:56:45.112259 [info ] [MainThread]: Updates available for packages: ['dbt-labs/dbt_utils']                 
Update your versions in packages.yml, then run dbt deps
[0m06:56:45.113849 [debug] [MainThread]: Command `dbt deps` succeeded at 06:56:45.113849 after 1.12 seconds
[0m06:56:45.114880 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BD68DD8F80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BD68DDA390>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001BD666B3B90>]}
[0m06:56:45.114880 [debug] [MainThread]: Flushing usage events
[0m06:56:45.753828 [debug] [MainThread]: An error was encountered while trying to flush usage events
[0m06:57:03.975526 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBCEBCA870>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBCEBC8830>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBCEBCA6F0>]}


============================== 06:57:03.983390 | 9d596606-5b5a-4aa5-8117-3bdb6008cd9b ==============================
[0m06:57:03.983390 [info ] [MainThread]: Running with dbt=1.11.5
[0m06:57:03.983390 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'False', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'profiles_dir': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt build', 'use_experimental_parser': 'False', 'log_path': 'C:\\WorkspaceHub\\SourceHub\\bacen-ifdata-scraper\\src\\bacen_ifdata\\data_analytics\\logs'}
[0m06:57:04.180961 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBCF4E0E60>]}
[0m06:57:04.228099 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBCF0106E0>]}
[0m06:57:04.230240 [info ] [MainThread]: Registered adapter: duckdb=1.10.0
[0m06:57:04.478388 [debug] [MainThread]: checksum: 917838c7befe257b9b22a76c21e5785f6f23ac83ef0336e2870f03c9c3f28402, vars: {}, profile: , target: , version: 1.11.5
[0m06:57:04.480401 [info ] [MainThread]: Unable to do partial parsing because saved manifest not found. Starting full parse.
[0m06:57:04.480401 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBCF464860>]}
[0m06:57:10.284889 [warn ] [MainThread]: [[33mWARNING[0m][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `relationships` defined on 'dim_instituicao'
in package 'bacen_ifdata_analytics' (models\gold\schema.yml). Arguments to
generic tests should be nested under the `arguments` property.
[0m06:57:10.285888 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'deprecation', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'property_': 'warn', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD0B9E6C0>]}
[0m06:57:10.635565 [warn ] [MainThread]: [[33mWARNING[0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bacen_ifdata_analytics.silver
[0m06:57:10.646417 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD0FD0860>]}
[0m06:57:10.725513 [debug] [MainThread]: Wrote artifact WritableManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\manifest.json
[0m06:57:10.760594 [debug] [MainThread]: Wrote artifact SemanticManifest to C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\target\semantic_manifest.json
[0m06:57:10.807788 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'resource_counts', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD0D89A30>]}
[0m06:57:10.807788 [info ] [MainThread]: Found 26 models, 10 seeds, 61 data tests, 32 sources, 590 macros
[0m06:57:10.813626 [info ] [MainThread]: 
[0m06:57:10.813626 [info ] [MainThread]: Concurrency: 1 threads (target='dev')
[0m06:57:10.815265 [info ] [MainThread]: 
[0m06:57:10.817008 [debug] [MainThread]: Acquiring new duckdb connection 'master'
[0m06:57:10.822660 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse'
[0m06:57:17.131275 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse"
[0m06:57:17.132278 [debug] [ThreadPool]: On list_gold_warehouse: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse"} */

    
    select schema_name
    from system.information_schema.schemata
    
    where lower(catalog_name) = '"gold_warehouse"'
    
  
  
[0m06:57:17.132278 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m06:57:17.342265 [debug] [ThreadPool]: SQL status: OK in 0.210 seconds
[0m06:57:17.343272 [debug] [ThreadPool]: On list_gold_warehouse: Close
[0m06:57:17.343272 [debug] [ThreadPool]: Re-using an available connection from the pool (formerly list_gold_warehouse, now create_gold_warehouse_main)
[0m06:57:17.344316 [debug] [ThreadPool]: Creating schema "database: "gold_warehouse"
schema: "main"
"
[0m06:57:17.348516 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m06:57:17.350158 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
        select type from duckdb_databases()
        where lower(database_name)='gold_warehouse'
        and type='sqlite'
    
  
[0m06:57:17.350158 [debug] [ThreadPool]: Opening a new connection, currently in state closed
[0m06:57:17.350704 [debug] [ThreadPool]: SQL status: OK in 0.001 seconds
[0m06:57:17.351354 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m06:57:17.351354 [debug] [ThreadPool]: On create_gold_warehouse_main: BEGIN
[0m06:57:17.352577 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m06:57:17.352577 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m06:57:17.353098 [debug] [ThreadPool]: On create_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "create_gold_warehouse_main"} */

    
    
        create schema if not exists "gold_warehouse"."main"
    
[0m06:57:17.353098 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m06:57:17.354117 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m06:57:17.354758 [debug] [ThreadPool]: Using duckdb connection "create_gold_warehouse_main"
[0m06:57:17.354758 [debug] [ThreadPool]: On create_gold_warehouse_main: COMMIT
[0m06:57:17.355285 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m06:57:17.355285 [debug] [ThreadPool]: On create_gold_warehouse_main: Close
[0m06:57:17.357562 [debug] [ThreadPool]: Acquiring new duckdb connection 'list_gold_warehouse_main'
[0m06:57:17.360721 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m06:57:17.362227 [debug] [ThreadPool]: On list_gold_warehouse_main: BEGIN
[0m06:57:17.362227 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m06:57:17.362227 [debug] [ThreadPool]: SQL status: OK in 0.000 seconds
[0m06:57:17.362227 [debug] [ThreadPool]: Using duckdb connection "list_gold_warehouse_main"
[0m06:57:17.362227 [debug] [ThreadPool]: On list_gold_warehouse_main: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "connection_name": "list_gold_warehouse_main"} */
select
      'gold_warehouse' as database,
      table_name as name,
      table_schema as schema,
      CASE table_type
        WHEN 'BASE TABLE' THEN 'table'
        WHEN 'VIEW' THEN 'view'
        WHEN 'LOCAL TEMPORARY' THEN 'table'
        END as type
    from system.information_schema.tables
    where lower(table_schema) = 'main'
    and lower(table_catalog) = 'gold_warehouse'
  
[0m06:57:17.373905 [debug] [ThreadPool]: SQL status: OK in 0.011 seconds
[0m06:57:17.375041 [debug] [ThreadPool]: On list_gold_warehouse_main: ROLLBACK
[0m06:57:17.405658 [debug] [ThreadPool]: Failed to rollback 'list_gold_warehouse_main'
[0m06:57:17.405658 [debug] [ThreadPool]: On list_gold_warehouse_main: Close
[0m06:57:17.408035 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'runnable_timing', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD0D1E570>]}
[0m06:57:17.408035 [debug] [MainThread]: Using duckdb connection "master"
[0m06:57:17.408747 [debug] [MainThread]: On master: BEGIN
[0m06:57:17.408747 [debug] [MainThread]: Opening a new connection, currently in state init
[0m06:57:17.409758 [debug] [MainThread]: SQL status: OK in 0.001 seconds
[0m06:57:17.410269 [debug] [MainThread]: On master: COMMIT
[0m06:57:17.410269 [debug] [MainThread]: Using duckdb connection "master"
[0m06:57:17.410826 [debug] [MainThread]: On master: COMMIT
[0m06:57:17.410826 [debug] [MainThread]: SQL status: OK in 0.000 seconds
[0m06:57:17.410826 [debug] [MainThread]: On master: Close
[0m06:57:17.416577 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_instituicao
[0m06:57:17.417239 [info ] [Thread-1 (]: 1 of 97 START sql table model main.dim_instituicao ............................. [RUN]
[0m06:57:17.418259 [debug] [Thread-1 (]: Acquiring new duckdb connection 'model.bacen_ifdata_analytics.dim_instituicao'
[0m06:57:17.418259 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_instituicao
[0m06:57:17.432609 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:57:17.434939 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_instituicao
[0m06:57:17.463324 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:57:17.468236 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:57:17.468236 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: BEGIN
[0m06:57:17.468236 [debug] [Thread-1 (]: Opening a new connection, currently in state init
[0m06:57:17.469237 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:17.470740 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:57:17.472562 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_instituicao__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Prudencial' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."prudential_conglomerates_summary"
),

financial AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_summary"
),

individual AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        NULL as segmento,
        'Instituicao Individual' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        tipo_de_instituicao,
        conglomerado as nome_conglomerado
    FROM "silver"."main"."individual_institutions_summary"
),

exchange AS (
    SELECT 
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Instituição de Câmbio' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
),

-- Fallback: instituições presentes nas tabelas de portfólio (SCR) mas ausentes dos resumos.
-- Isso garante integridade referencial completa para todas as tabelas fato.
portfolio_fallback AS (
    SELECT DISTINCT
        codigo as codigo_origem,
        instituicao as nome,
        segmento_resolucao as segmento,
        'Conglomerado Financeiro (SCR)' as tipo_instituicao,
        cidade, uf, regiao,
        tipo_de_controle,
        consolidado_bancario,
        NULL as tipo_de_instituicao,
        NULL as nome_conglomerado
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE codigo NOT IN (
        SELECT DISTINCT codigo FROM "silver"."main"."financial_conglomerates_summary"
    )
),

unificacao AS (
    -- Conglomerados Prudenciais - Resumo
    SELECT codigo_origem, nome, segmento, tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, tipo_de_instituicao, nome_conglomerado FROM prudential
    UNION
    -- Conglomerados Prudenciais - Ativo
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Prudencial' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."prudential_conglomerates_assets"
    UNION
    -- Conglomerados Prudenciais - Passivo
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Prudencial' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."prudential_conglomerates_liabilities"
    UNION
    -- Conglomerados Prudenciais - Demonstração de Resultado
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Prudencial' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."prudential_conglomerates_income_statement"
    UNION
    -- Conglomerados Prudenciais - Informações de Capital
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Prudencial' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."prudential_conglomerates_capital_information"
    UNION
    -- Conglomerados Prudenciais - Segmentação
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Prudencial' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."prudential_conglomerates_segmentation"

    UNION

    -- Conglomerados Financeiros - Resumo
    SELECT codigo_origem, nome, segmento, tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, tipo_de_instituicao, nome_conglomerado FROM financial
    UNION
    -- Conglomerados Financeiros - Ativo
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_assets"
    UNION
    -- Conglomerados Financeiros - Passivo
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_liabilities"
    UNION
    -- Conglomerados Financeiros - Demonstração de Resultado
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_income_statement"
    UNION
    -- Conglomerados Financeiros - Informações de Capital
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_capital_information"

    UNION

    -- SCR Portfolios (Financial Conglomerates) - Carteira PJ Modalidade e Prazo
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Carteira PJ Modalidade e Prazo
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Carteira PJ Atividade Econômica
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Carteira PJ Porte
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Nível de Risco
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Região Geográfica
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Indexador
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_indexer"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Quantidade de Clientes
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"

    UNION

    -- SCR Portfolios Independent (Financial Conglomerates SCR) - Carteira PF Modalidade e Prazo
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNION
    -- SCR Portfolios Independent (Financial Conglomerates SCR) - Carteira PJ Modalidade e Prazo
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNION
    -- SCR Portfolios Independent (Financial Conglomerates SCR) - Carteira PJ Atividade Econômica
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNION
    -- SCR Portfolios Independent (Financial Conglomerates SCR) - Carteira PJ Porte
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNION
    -- SCR Portfolios Independent (Financial Conglomerates SCR) - Nível de Risco
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNION
    -- SCR Portfolios Independent (Financial Conglomerates SCR) - Região Geográfica
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNION
    -- SCR Portfolios Independent (Financial Conglomerates SCR) - Indexador
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    UNION
    -- SCR Portfolios Independent (Financial Conglomerates SCR) - Quantidade de Clientes
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro (SCR)' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"

    UNION

    -- Financial Conglomerates Portfolios (Standard) - Carteira PF Modalidade e Prazo
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNION
    -- Financial Conglomerates Portfolios (Standard) - Carteira PJ Modalidade e Prazo
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNION
    -- Financial Conglomerates Portfolios (Standard) - Carteira PJ Atividade Econômica
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNION
    -- Financial Conglomerates Portfolios (Standard) - Carteira PJ Porte
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNION
    -- Financial Conglomerates Portfolios (Standard) - Nível de Risco
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNION
    -- Financial Conglomerates Portfolios (Standard) - Região Geográfica
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNION
    -- Financial Conglomerates Portfolios (Standard) - Indexador
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_indexer"
    UNION
    -- Financial Conglomerates Portfolios (Standard) - Quantidade de Clientes
    SELECT codigo as codigo_origem, instituicao as nome, segmento_resolucao as segmento, 'Conglomerado Financeiro' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, NULL, NULL FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"

    UNION

    -- Instituições Individuais - Resumo
    SELECT codigo_origem, nome, segmento, tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, tipo_de_instituicao, nome_conglomerado FROM individual
    UNION
    -- Instituições Individuais - Ativo
    SELECT codigo as codigo_origem, instituicao as nome, NULL as segmento, 'Instituicao Individual' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, tipo_de_instituicao, conglomerado FROM "silver"."main"."individual_institutions_assets"
    UNION
    -- Instituições Individuais - Passivo
    SELECT codigo as codigo_origem, instituicao as nome, NULL as segmento, 'Instituicao Individual' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, tipo_de_instituicao, conglomerado FROM "silver"."main"."individual_institutions_liabilities"
    UNION
    -- Instituições Individuais - Demonstração de Resultado
    SELECT codigo as codigo_origem, instituicao as nome, NULL as segmento, 'Instituicao Individual' as tipo_instituicao, cidade, uf, regiao, tipo_de_controle, consolidado_bancario, tipo_de_instituicao, conglomerado FROM "silver"."main"."individual_institutions_income_statement"

    UNION

    -- Câmbio
    SELECT * FROM exchange

)

SELECT
    
    md5(cast(cast(codigo_origem as bigint) as varchar))
 as id_instituicao,
    codigo_origem,
    nome,
    tipo_instituicao,
    md5(cast(nullif(segmento, '') as varchar)) as id_segmento,
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    md5(cast(nullif(tipo_de_controle, '') as varchar)) as id_controle,
    md5(cast(nullif(consolidado_bancario, '') as varchar)) as id_consolidado,
    md5(cast(nullif(tipo_de_instituicao, '') as varchar)) as id_classe,
    nome_conglomerado
FROM unificacao
QUALIFY row_number() OVER (PARTITION BY codigo_origem ORDER BY tipo_instituicao) = 1
    );
  
  
[0m06:57:17.957165 [debug] [Thread-1 (]: SQL status: OK in 0.483 seconds
[0m06:57:17.962367 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:57:17.962367 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */
alter table "gold_warehouse"."main"."dim_instituicao__dbt_tmp" rename to "dim_instituicao"
[0m06:57:17.963373 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:17.975163 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m06:57:17.976192 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:57:17.976192 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: COMMIT
[0m06:57:17.985065 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m06:57:17.990715 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_instituicao"
[0m06:57:17.990715 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_instituicao"} */

      drop table if exists "gold_warehouse"."main"."dim_instituicao__dbt_backup" cascade
    
[0m06:57:17.991715 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:17.992895 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_instituicao: Close
[0m06:57:17.996164 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD1299670>]}
[0m06:57:17.996164 [info ] [Thread-1 (]: 1 of 97 OK created sql table model main.dim_instituicao ........................ [[32mOK[0m in 0.58s]
[0m06:57:17.996164 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_instituicao
[0m06:57:17.997705 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_localizacao
[0m06:57:17.997705 [info ] [Thread-1 (]: 2 of 97 START sql table model main.dim_localizacao ............................. [RUN]
[0m06:57:17.998711 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_instituicao, now model.bacen_ifdata_analytics.dim_localizacao)
[0m06:57:17.999216 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_localizacao
[0m06:57:18.001729 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:57:18.003933 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_localizacao
[0m06:57:18.008264 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:57:18.008264 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:57:18.009964 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: BEGIN
[0m06:57:18.009964 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:18.010973 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:18.010973 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:57:18.012481 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_localizacao__dbt_tmp"
  
    as (
      

WITH location_sources AS (
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."prudential_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_summary"
    WHERE cidade IS NOT NULL
    
    UNION
    
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."individual_institutions_summary"
    WHERE cidade IS NOT NULL

    UNION

    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
    WHERE cidade IS NOT NULL

    UNION

    -- Fallback: localizações de instituições presentes apenas nas tabelas SCR
    SELECT DISTINCT
        cidade,
        uf,
        regiao
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    WHERE cidade IS NOT NULL
)

SELECT
    -- Create a surrogate key based on the unique combination of location fields
    md5(cast(coalesce(cidade, '') || coalesce(uf, '') || coalesce(regiao, '') as varchar)) as id_localizacao,
    cidade,
    uf,
    regiao
FROM location_sources

UNION

-- Sentinel para instituições sem dados de localização (cidade, uf, regiao = NULL)
SELECT
    md5(cast('' as varchar)) as id_localizacao,
    NULL as cidade,
    NULL as uf,
    NULL as regiao
    );
  
  
[0m06:57:18.105148 [debug] [Thread-1 (]: SQL status: OK in 0.092 seconds
[0m06:57:18.108290 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:57:18.108290 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */
alter table "gold_warehouse"."main"."dim_localizacao__dbt_tmp" rename to "dim_localizacao"
[0m06:57:18.109301 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:18.110429 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m06:57:18.110429 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:57:18.110429 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: COMMIT
[0m06:57:18.112456 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:18.114986 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_localizacao"
[0m06:57:18.114986 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_localizacao"} */

      drop table if exists "gold_warehouse"."main"."dim_localizacao__dbt_backup" cascade
    
[0m06:57:18.116019 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:18.117166 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_localizacao: Close
[0m06:57:18.117166 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD1397F20>]}
[0m06:57:18.118206 [info ] [Thread-1 (]: 2 of 97 OK created sql table model main.dim_localizacao ........................ [[32mOK[0m in 0.12s]
[0m06:57:18.118206 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_localizacao
[0m06:57:18.119188 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.dim_tempo
[0m06:57:18.119188 [info ] [Thread-1 (]: 3 of 97 START sql table model main.dim_tempo ................................... [RUN]
[0m06:57:18.120187 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_localizacao, now model.bacen_ifdata_analytics.dim_tempo)
[0m06:57:18.120187 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.dim_tempo
[0m06:57:18.127988 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.dim_tempo"
[0m06:57:18.130714 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.dim_tempo
[0m06:57:18.136250 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.dim_tempo"
[0m06:57:18.137753 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m06:57:18.139388 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: BEGIN
[0m06:57:18.139388 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:18.140404 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:18.141409 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m06:57:18.141915 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

  
    
    

    create  table
      "gold_warehouse"."main"."dim_tempo__dbt_tmp"
  
    as (
      

WITH datas_unicas AS (
    -- Conglomerados Prudenciais - Resumo
    SELECT DISTINCT data_base as data
    FROM "silver"."main"."prudential_conglomerates_summary"
    UNION
    -- Conglomerados Prudenciais - Ativo
    SELECT DISTINCT data_base
    FROM "silver"."main"."prudential_conglomerates_assets"
    UNION
    -- Conglomerados Prudenciais - Passivo
    SELECT DISTINCT data_base
    FROM "silver"."main"."prudential_conglomerates_liabilities"
    UNION
    -- Conglomerados Prudenciais - Demonstração de Resultado
    SELECT DISTINCT data_base
    FROM "silver"."main"."prudential_conglomerates_income_statement"
    UNION
    -- Conglomerados Prudenciais - Informações de Capital
    SELECT DISTINCT data_base
    FROM "silver"."main"."prudential_conglomerates_capital_information"
    UNION
    -- Conglomerados Prudenciais - Segmentação
    SELECT DISTINCT data_base
    FROM "silver"."main"."prudential_conglomerates_segmentation"
    UNION
    -- Conglomerados Financeiros - Resumo
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_summary"
    UNION
    -- Conglomerados Financeiros - Ativo
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_assets"
    UNION
    -- Conglomerados Financeiros - Passivo
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_liabilities"
    UNION
    -- Conglomerados Financeiros - Demonstração de Resultado
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_income_statement"
    UNION
    -- Conglomerados Financeiros - Informações de Capital
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_capital_information"
    UNION
    -- Instituições Individuais - Resumo
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_summary"
    UNION
    -- Instituições Individuais - Ativo
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_assets"
    UNION
    -- Instituições Individuais - Passivo
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_liabilities"
    UNION
    -- Instituições Individuais - Demonstração de Resultado
    SELECT DISTINCT data_base
    FROM "silver"."main"."individual_institutions_income_statement"
    UNION
    -- Conglomerados Financeiros - Carteira PF Modalidade e Prazo
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"
    UNION
    -- Conglomerados Financeiros - Carteira PJ Modalidade e Prazo
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_type_maturity"
    UNION
    -- Conglomerados Financeiros - Carteira PJ Atividade Econômica
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"
    UNION
    -- Conglomerados Financeiros - Carteira PJ Porte
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_business_size"
    UNION
    -- Conglomerados Financeiros - Nível de Risco
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"
    UNION
    -- Conglomerados Financeiros - Região Geográfica
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_portfolio_geographic_region"
    UNION
    -- Conglomerados Financeiros - Indexador
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_portfolio_indexer"
    UNION
    -- Conglomerados Financeiros - Quantidade de Clientes
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Carteira PF Modalidade e Prazo
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Carteira PJ Modalidade e Prazo
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_type_maturity"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Carteira PJ Atividade Econômica
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Carteira PJ Porte
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_business_size"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Nível de Risco
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Região Geográfica
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_geographic_region"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Indexador
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    UNION
    -- SCR Portfolios (Financial Conglomerates) - Quantidade de Clientes
    SELECT DISTINCT data_base
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
    UNION
    -- Câmbio
    SELECT DISTINCT data_base
    FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
)

SELECT
    strftime(data, '%Y%m%d')::int as id_data,
    data,
    extract(year from data)::int as ano,
    extract(quarter from data)::int as trimestre,
    extract(month from data)::int as mes
FROM datas_unicas
    );
  
  
[0m06:57:18.226093 [debug] [Thread-1 (]: SQL status: OK in 0.083 seconds
[0m06:57:18.228609 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m06:57:18.228609 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */
alter table "gold_warehouse"."main"."dim_tempo__dbt_tmp" rename to "dim_tempo"
[0m06:57:18.229611 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:18.230117 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m06:57:18.231123 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m06:57:18.231123 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: COMMIT
[0m06:57:18.232126 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:18.235178 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.dim_tempo"
[0m06:57:18.235178 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.dim_tempo"} */

      drop table if exists "gold_warehouse"."main"."dim_tempo__dbt_backup" cascade
    
[0m06:57:18.236180 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:18.237204 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.dim_tempo: Close
[0m06:57:18.238315 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD1210620>]}
[0m06:57:18.238315 [info ] [Thread-1 (]: 3 of 97 OK created sql table model main.dim_tempo .............................. [[32mOK[0m in 0.12s]
[0m06:57:18.239834 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.dim_tempo
[0m06:57:18.239834 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m06:57:18.239834 [info ] [Thread-1 (]: 4 of 97 START sql table model main.fato_balanco_patrimonial .................... [RUN]
[0m06:57:18.241934 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.dim_tempo, now model.bacen_ifdata_analytics.fato_balanco_patrimonial)
[0m06:57:18.241934 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m06:57:18.246461 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:57:18.248473 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m06:57:18.251277 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:57:18.253474 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:57:18.253997 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: BEGIN
[0m06:57:18.254567 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:18.254567 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:18.255579 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:57:18.255579 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp"
  
    as (
      

WITH prudential AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l."obrigações_operações_compromissadas" as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l."outras_obrigações" as outras_obrigacoes,
        l."passivo_circulante_exigível_a_longo_prazo" as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."prudential_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."prudential_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

financial AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."financial_conglomerates_assets" a
    FULL OUTER JOIN "silver"."main"."financial_conglomerates_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

individual AS (
    SELECT
        COALESCE(a.codigo, l.codigo) as codigo,
        COALESCE(a.data_base, l.data_base) as data_base,
        -- Ativos
        a.disponibilidades,
        a.aplicacoes_interfinanceiras_liquidez,
        a.tvm_e_instrumentos_financeiros_derivativos as tvm_derivativos,
        a.operacoes_de_credito,
        a.provisao_operacoes_de_credito,
        a.operacoes_de_credito_liquidas_provisao,
        a.arrendamento_mercantil_a_receber,
        a.imobilizado_de_arrendamento,
        a.credores_antecipacao_valor_residual,
        a.provisao_arrendamento_mercantil,
        a.arrendamento_mercantil_liquido_de_provisao,
        a.outros_creditos_liquido_de_provisao,
        a.outros_ativos_realizaveis,
        a.permanente_ajustado,
        a.ativo_total_ajustado,
        a.ativo_total,
        -- Passivos
        l.deposito_total as depositos,
        l.obrigacoes_operacoes_compromissadas as captacoes_mercado_aberto,
        l.recursos_de_aceites_e_emissao_de_titulos as recursos_aceites_cambiais,
        l.obrigacoes_emprestimos_e_repasses as obrigacoes_emprestimos_repasses,
        l.instrumentos_derivativos as obrigacoes_por_instr_financeiros_derivativos,
        l.outras_obrigacoes,
        l.passivo_circulante_exigivel_a_longo_prazo as passivo_circulante_exigivel_longo_prazo,
        l.patrimonio_liquido,
        (a.ativo_total - l.patrimonio_liquido) as passivo_total,
        l.captacoes
    FROM "silver"."main"."individual_institutions_assets" a
    FULL OUTER JOIN "silver"."main"."individual_institutions_liabilities" l
      ON a.codigo = l.codigo AND a.data_base = l.data_base
),

unificacao AS (
    SELECT * FROM prudential
    UNION ALL
    SELECT * FROM financial
    UNION ALL
    SELECT * FROM individual
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    -- Ativos
    disponibilidades,
    aplicacoes_interfinanceiras_liquidez,
    tvm_derivativos,
    operacoes_de_credito,
    provisao_operacoes_de_credito,
    operacoes_de_credito_liquidas_provisao,
    arrendamento_mercantil_a_receber,
    imobilizado_de_arrendamento,
    credores_antecipacao_valor_residual,
    provisao_arrendamento_mercantil,
    arrendamento_mercantil_liquido_de_provisao,
    outros_creditos_liquido_de_provisao,
    outros_ativos_realizaveis,
    permanente_ajustado,
    ativo_total_ajustado,
    ativo_total,
    -- Passivos
    depositos,
    captacoes_mercado_aberto,
    recursos_aceites_cambiais,
    obrigacoes_emprestimos_repasses,
    obrigacoes_por_instr_financeiros_derivativos,
    outras_obrigacoes,
    passivo_circulante_exigivel_longo_prazo,
    patrimonio_liquido,
    passivo_total,
    captacoes
FROM unificacao
    );
  
  
[0m06:57:18.728369 [debug] [Thread-1 (]: SQL status: OK in 0.473 seconds
[0m06:57:18.730934 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:57:18.730934 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */
alter table "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_tmp" rename to "fato_balanco_patrimonial"
[0m06:57:18.732457 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:18.734472 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m06:57:18.735473 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:57:18.735473 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: COMMIT
[0m06:57:18.867680 [debug] [Thread-1 (]: SQL status: OK in 0.132 seconds
[0m06:57:18.869702 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_balanco_patrimonial"
[0m06:57:18.870686 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_balanco_patrimonial"} */

      drop table if exists "gold_warehouse"."main"."fato_balanco_patrimonial__dbt_backup" cascade
    
[0m06:57:18.870686 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:18.871735 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_balanco_patrimonial: Close
[0m06:57:18.872453 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD13C7C80>]}
[0m06:57:18.872453 [info ] [Thread-1 (]: 4 of 97 OK created sql table model main.fato_balanco_patrimonial ............... [[32mOK[0m in 0.63s]
[0m06:57:18.873468 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_balanco_patrimonial
[0m06:57:18.873972 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m06:57:18.874525 [info ] [Thread-1 (]: 5 of 97 START sql table model main.fato_capital_prudencial ..................... [RUN]
[0m06:57:18.874525 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_balanco_patrimonial, now model.bacen_ifdata_analytics.fato_capital_prudencial)
[0m06:57:18.874525 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m06:57:18.877920 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:57:18.878927 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m06:57:18.880434 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:57:18.882980 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:57:18.882980 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: BEGIN
[0m06:57:18.882980 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:18.883984 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:18.883984 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:57:18.883984 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp"
  
    as (
      

-- Prudential Conglomerates (has all columns)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    -- Capital & Patrimônio de Referência
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    -- RWA (Risk Weighted Assets) e suas parcelas
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    rwasp as rwa_servicos_pagamento,
    
    -- Detalhamento RWA Mercado
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    rwacva as rwa_cva,
    rwadrc as rwa_drc,
    
    -- Exposição e Índices
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    adicional_capital_principal

FROM "silver"."main"."prudential_conglomerates_capital_information"

UNION ALL

-- Financial Conglomerates (lacks: rwasp, rwacva, rwadrc, adicional_capital_principal)
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    capital_principal_para_comparacao_com_rwa as capital_principal,
    capital_complementar,
    patrimonio_referencia_nivel_i_para_comparacao_com_rwa as pr_nivel_1,
    capital_nivel_ii as capital_nivel_2,
    patrimonio_referencia_para_comparacao_com_rwa as pr_total,
    
    ativos_ponderados_pelo_risco_rwa as rwa_total,
    rwa_risco_credito,
    rwa_risco_mercado,
    rwa_risco_operacional,
    NULL as rwa_servicos_pagamento,
    
    rwacam as rwa_cambio,
    rwacom as rwa_commodities,
    rwajur as rwa_juros,
    rwaacs as rwa_acoes,
    NULL as rwa_cva,
    NULL as rwa_drc,
    
    exposicao_total,
    indice_capital_principal,
    indice_capital_nivel_i,
    indice_basileia,
    razao_alavancagem,
    indice_imobilizacao,
    NULL as adicional_capital_principal

FROM "silver"."main"."financial_conglomerates_capital_information"
    );
  
  
[0m06:57:19.070232 [debug] [Thread-1 (]: SQL status: OK in 0.186 seconds
[0m06:57:19.072295 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:57:19.072295 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */
alter table "gold_warehouse"."main"."fato_capital_prudencial__dbt_tmp" rename to "fato_capital_prudencial"
[0m06:57:19.073882 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:19.075420 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m06:57:19.075420 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:57:19.075420 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: COMMIT
[0m06:57:19.092148 [debug] [Thread-1 (]: SQL status: OK in 0.015 seconds
[0m06:57:19.094157 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_capital_prudencial"
[0m06:57:19.094157 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_capital_prudencial"} */

      drop table if exists "gold_warehouse"."main"."fato_capital_prudencial__dbt_backup" cascade
    
[0m06:57:19.094157 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:19.096486 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_capital_prudencial: Close
[0m06:57:19.097521 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD13629F0>]}
[0m06:57:19.098579 [info ] [Thread-1 (]: 5 of 97 OK created sql table model main.fato_capital_prudencial ................ [[32mOK[0m in 0.22s]
[0m06:57:19.098579 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_capital_prudencial
[0m06:57:19.098579 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m06:57:19.098579 [info ] [Thread-1 (]: 6 of 97 START sql table model main.fato_carteira_credito_indexador ............. [RUN]
[0m06:57:19.100198 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_capital_prudencial, now model.bacen_ifdata_analytics.fato_carteira_credito_indexador)
[0m06:57:19.100198 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m06:57:19.103315 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:57:19.104362 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m06:57:19.106438 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:57:19.108216 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:57:19.108216 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: BEGIN
[0m06:57:19.108216 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:19.109252 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:19.109252 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:57:19.110342 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp"
  
    as (
      

-- Financial Conglomerates Indexer
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_portfolio_indexer"

UNION ALL

-- Financial Conglomerates SCR Indexer
-- SCR table lacks: tlp, tcr_pre, tcr_pos, trfc_pre, trfc_pos
SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    
    total_geral as total_carteira,
    
    prefixado,
    selic,
    carteira_ativa_com_indexador_cdi as cdi,
    tr_tbf as tr,
    tjlp,
    NULL as tlp,
    libor,
    
    ipca,
    igpm,
    ipcc,
    outros_indices_de_preco,
    
    outras_taxas_pos_fixadas,
    outras_taxas_flutuantes,
    outros_indexadores,
    
    total_exterior,
    
    total_nao_individualizado

FROM "silver"."main"."financial_conglomerates_scr_portfolio_indexer"
    );
  
  
[0m06:57:19.171778 [debug] [Thread-1 (]: SQL status: OK in 0.061 seconds
[0m06:57:19.176089 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:57:19.177116 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_tmp" rename to "fato_carteira_credito_indexador"
[0m06:57:19.177651 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:19.181069 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m06:57:19.182105 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:57:19.182105 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: COMMIT
[0m06:57:19.213276 [debug] [Thread-1 (]: SQL status: OK in 0.030 seconds
[0m06:57:19.217098 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"
[0m06:57:19.218102 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_indexador"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_indexador__dbt_backup" cascade
    
[0m06:57:19.218102 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:19.219123 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_indexador: Close
[0m06:57:19.220124 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBEFE49D30>]}
[0m06:57:19.220124 [info ] [Thread-1 (]: 6 of 97 OK created sql table model main.fato_carteira_credito_indexador ........ [[32mOK[0m in 0.12s]
[0m06:57:19.220124 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_indexador
[0m06:57:19.221608 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m06:57:19.222827 [info ] [Thread-1 (]: 7 of 97 START sql table model main.fato_carteira_credito_totais ................ [RUN]
[0m06:57:19.224342 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_indexador, now model.bacen_ifdata_analytics.fato_carteira_credito_totais)
[0m06:57:19.224342 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m06:57:19.229921 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:57:19.230929 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m06:57:19.234123 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:57:19.235110 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:57:19.236133 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: BEGIN
[0m06:57:19.236133 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:19.238349 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:19.238349 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:57:19.238349 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp"
  
    as (
      

WITH totais AS (
    -- =================================================================================================
    -- PESSOA JURÍDICA (PJ)
    -- =================================================================================================
    
    -- Conglomerados Financeiros - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_carteira_pessoa_juridica as total_carteira_pj,
        total_nao_individualizado_pessoa_juridica as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_legal_person_economic_activity"

    UNION ALL

    -- SCR - Atividade Econômica
    SELECT 
        codigo,
        data_base,
        total_da_carteira_de_pessoa_juridica as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        total_exterior_pessoa_juridica as total_exterior_pj,
        NULL as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_legal_person_economic_activity"

    UNION ALL

    -- =================================================================================================
    -- RISCO (TOTAL GERAL)
    -- =================================================================================================

    -- Conglomerados Financeiros - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_risk_level"

    UNION ALL

    -- SCR - Risco
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        total_geral as total_geral_risco,
        NULL as total_carteira_pf,
        NULL as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_risk_level"

    UNION ALL

    -- =================================================================================================
    -- PESSOA FÍSICA (PF)
    -- =================================================================================================

    -- Conglomerados Financeiros - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_carteira_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_portfolio_individuals_type_maturity"

    UNION ALL

    -- SCR - PF Tipo/Vencimento
    SELECT
        codigo,
        data_base,
        NULL as total_carteira_pj,
        NULL as total_nao_individualizado_pj,
        NULL as total_exterior_pj,
        NULL as total_geral_risco,
        total_da_carteira_de_pessoa_fisica as total_carteira_pf,
        total_exterior_pessoa_fisica as total_exterior_pf
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_individuals_type_maturity"
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Agregando por instituição e data
    MAX(total_carteira_pj) as total_carteira_pj,
    MAX(total_nao_individualizado_pj) as total_nao_individualizado_pj,
    MAX(total_exterior_pj) as total_exterior_pj,
    MAX(total_geral_risco) as total_geral_risco,
    MAX(total_carteira_pf) as total_carteira_pf,
    MAX(total_exterior_pf) as total_exterior_pf
FROM totais
GROUP BY 1, 2
    );
  
  
[0m06:57:19.301895 [debug] [Thread-1 (]: SQL status: OK in 0.061 seconds
[0m06:57:19.305506 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:57:19.305506 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */
alter table "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_tmp" rename to "fato_carteira_credito_totais"
[0m06:57:19.306758 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:19.308464 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m06:57:19.308464 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:57:19.308464 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: COMMIT
[0m06:57:19.377053 [debug] [Thread-1 (]: SQL status: OK in 0.067 seconds
[0m06:57:19.378816 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_carteira_credito_totais"
[0m06:57:19.379780 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_carteira_credito_totais"} */

      drop table if exists "gold_warehouse"."main"."fato_carteira_credito_totais__dbt_backup" cascade
    
[0m06:57:19.380362 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:19.381953 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_carteira_credito_totais: Close
[0m06:57:19.382961 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBCDF7E0C0>]}
[0m06:57:19.382961 [info ] [Thread-1 (]: 7 of 97 OK created sql table model main.fato_carteira_credito_totais ........... [[32mOK[0m in 0.16s]
[0m06:57:19.383961 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_carteira_credito_totais
[0m06:57:19.383961 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m06:57:19.384962 [info ] [Thread-1 (]: 8 of 97 START sql table model main.fato_demonstracao_resultado ................. [RUN]
[0m06:57:19.384962 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_carteira_credito_totais, now model.bacen_ifdata_analytics.fato_demonstracao_resultado)
[0m06:57:19.385962 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m06:57:19.389497 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:57:19.391608 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m06:57:19.394108 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:57:19.395702 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:57:19.396709 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: BEGIN
[0m06:57:19.396709 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:19.397709 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:19.397709 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:57:19.398727 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp"
  
    as (
      

WITH summary_prudential AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."prudential_conglomerates_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

summary_financial AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."financial_conglomerates_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

summary_individual AS (
    SELECT 
        codigo, 
        data_base, 
        ativo_total,
        patrimonio_liquido,
        lucro_liquido 
    FROM "silver"."main"."individual_institutions_summary"
    QUALIFY ROW_NUMBER() OVER (PARTITION BY codigo, data_base ORDER BY ativo_total DESC) = 1
),

dre AS (
    -- Conglomerados Prudenciais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        NULL as juros_sobre_capital_social_cooperativas,
        dre.juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_income_statement" dre
    LEFT JOIN summary_prudential r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_income_statement" dre
    LEFT JOIN summary_financial r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base

    UNION ALL

    -- Instituições Individuais
    SELECT
        dre.codigo,
        dre.data_base,
        -- Receitas
        dre.receitas_intermediacao_financeira,
        dre.rendas_operacoes_de_credito,
        dre.rendas_operacoes_de_arrendamento_mercantil,
        dre.rendas_operacoes_tvm,
        dre.rendas_operacoes_instrumentos_financeiros_derivativos,
        dre.resultado_operacoes_cambio as rendas_operacoes_cambio,
        dre.rendas_aplicacoes_compulsorias,
        -- Despesas
        dre.despesas_intermediacao_financeira,
        dre.despesas_captacao,
        dre.despesas_obrigacoes_emprestimos_repasses,
        dre.despesas_operacoes_arrendamento_mercantil,
        dre.despesas_operacoes_cambio,
        dre.resultado_provisao_creditos_dificil_liquidacao,
        -- Resultados Intermediacao
        dre.resultado_intermediacao_financeira,
        -- Outras Receitas/Despesas
        dre.rendas_prestacao_servicos,
        dre.rendas_tarifas_bancarias,
        dre.despesas_pessoal,
        dre.despesas_administrativas,
        dre.despesas_tributarias,
        dre.resultado_participacoes,
        dre.outras_receitas_operacionais,
        dre.outras_despesas_operacionais,
        dre.outras_receitas_despesas_operacionais,
        -- Resultado Operacional
        dre.resultado_operacional,
        -- Resultado Nao Operacional
        dre.resultado_nao_operacional,
        -- Apuracao Final
        dre.resultado_antes_tributacao_lucro_participacao as resultado_antes_tributacao,
        dre.imposto_renda_contribuicao_social,
        dre.participacao_lucros,
        dre.lucro_liquido,
        dre.juros_sobre_capital_social_cooperativas,
        NULL as juros_sobre_capital_proprio,
        (r.lucro_liquido / NULLIF(r.patrimonio_liquido, 0)) as roe,
        (r.lucro_liquido / NULLIF(r.ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_income_statement" dre
    LEFT JOIN summary_individual r
      ON dre.codigo = r.codigo AND dre.data_base = r.data_base
)

SELECT
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(try_cast(data_base as date), '%Y%m%d')::int as id_data,
    -- Receitas
    receitas_intermediacao_financeira,
    rendas_operacoes_de_credito,
    rendas_operacoes_de_arrendamento_mercantil,
    rendas_operacoes_tvm,
    rendas_operacoes_instrumentos_financeiros_derivativos,
    rendas_operacoes_cambio,
    rendas_aplicacoes_compulsorias,
    -- Despesas
    despesas_intermediacao_financeira,
    despesas_captacao,
    despesas_obrigacoes_emprestimos_repasses,
    despesas_operacoes_arrendamento_mercantil,
    despesas_operacoes_cambio,
    resultado_provisao_creditos_dificil_liquidacao,
    -- Intermediacao
    resultado_intermediacao_financeira,
    -- Outras
    rendas_prestacao_servicos,
    rendas_tarifas_bancarias,
    despesas_pessoal,
    despesas_administrativas,
    despesas_tributarias,
    resultado_participacoes,
    outras_receitas_operacionais,
    outras_despesas_operacionais,
    outras_receitas_despesas_operacionais,
    -- Resultados
    resultado_operacional,
    resultado_nao_operacional,
    resultado_antes_tributacao,
    imposto_renda_contribuicao_social,
    participacao_lucros,
    lucro_liquido,
    juros_sobre_capital_social_cooperativas,
    juros_sobre_capital_proprio
FROM dre
    );
  
  
[0m06:57:19.996626 [debug] [Thread-1 (]: SQL status: OK in 0.598 seconds
[0m06:57:19.999958 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:57:20.000464 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */
alter table "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_tmp" rename to "fato_demonstracao_resultado"
[0m06:57:20.001044 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.001631 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m06:57:20.002636 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:57:20.002636 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: COMMIT
[0m06:57:20.124641 [debug] [Thread-1 (]: SQL status: OK in 0.122 seconds
[0m06:57:20.129959 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_demonstracao_resultado"
[0m06:57:20.130973 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_demonstracao_resultado"} */

      drop table if exists "gold_warehouse"."main"."fato_demonstracao_resultado__dbt_backup" cascade
    
[0m06:57:20.131971 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.134019 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_demonstracao_resultado: Close
[0m06:57:20.134019 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD1221F40>]}
[0m06:57:20.135017 [info ] [Thread-1 (]: 8 of 97 OK created sql table model main.fato_demonstracao_resultado ............ [[32mOK[0m in 0.75s]
[0m06:57:20.136021 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_demonstracao_resultado
[0m06:57:20.136021 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m06:57:20.137529 [info ] [Thread-1 (]: 9 of 97 START sql table model main.fato_movimentacao_cambio .................... [RUN]
[0m06:57:20.138539 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_demonstracao_resultado, now model.bacen_ifdata_analytics.fato_movimentacao_cambio)
[0m06:57:20.139543 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m06:57:20.148657 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:57:20.152687 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m06:57:20.157155 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:57:20.160918 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:57:20.160918 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: BEGIN
[0m06:57:20.160918 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:20.163462 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.164120 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:57:20.164120 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp"
  
    as (
      

SELECT
    -- Chaves Estrangeiras
    md5(cast(cast(codigo as bigint) as varchar)) as id_instituicao,
    strftime(data_base, '%Y%m%d')::int as id_data,
    
    -- Métricas de Operações Comerciais (Exportação/Importação)
    operacoes_comerciais_compra_numero_operacoes,
    operacoes_comerciais_compra_valor,
    operacoes_comerciais_venda_numero_operacoes,
    operacoes_comerciais_venda_valor,
    operacoes_comerciais_total_numero_operacoes,
    operacoes_comerciais_total_valor,

    -- Métricas de Operações Financeiras
    operacoes_financeiras_compra_numero_operacoes,
    operacoes_financeiras_compra_valor,
    operacoes_financeiras_venda_numero_operacoes,
    operacoes_financeiras_venda_valor,
    operacoes_financeiras_total_numero_operacoes,
    operacoes_financeiras_total_valor,

    -- Métricas do Mercado Primário
    mercado_primario_total_numero_operacoes,
    mercado_primario_total_valor,

    -- Métricas do Mercado Interbancário
    mercado_interbancario_compra_numero_operacoes,
    mercado_interbancario_compra_valor,
    mercado_interbancario_venda_numero_operacoes,
    mercado_interbancario_venda_valor,
    mercado_interbancario_total_numero_operacoes,
    mercado_interbancario_total_valor,

    -- Totais Gerais
    total_geral_numero_operacoes,
    total_geral_valor

FROM "silver"."main"."foreign_exchange_quarterly_foreign_currency_flow"
WHERE data_base IS NOT NULL
    );
  
  
[0m06:57:20.171902 [debug] [Thread-1 (]: SQL status: OK in 0.007 seconds
[0m06:57:20.175579 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:57:20.175579 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */
alter table "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_tmp" rename to "fato_movimentacao_cambio"
[0m06:57:20.177217 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.178230 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m06:57:20.178230 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:57:20.178230 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: COMMIT
[0m06:57:20.183972 [debug] [Thread-1 (]: SQL status: OK in 0.004 seconds
[0m06:57:20.188213 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_movimentacao_cambio"
[0m06:57:20.189752 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_movimentacao_cambio"} */

      drop table if exists "gold_warehouse"."main"."fato_movimentacao_cambio__dbt_backup" cascade
    
[0m06:57:20.190765 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.194289 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_movimentacao_cambio: Close
[0m06:57:20.195306 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD13C8560>]}
[0m06:57:20.196318 [info ] [Thread-1 (]: 9 of 97 OK created sql table model main.fato_movimentacao_cambio ............... [[32mOK[0m in 0.06s]
[0m06:57:20.197315 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_movimentacao_cambio
[0m06:57:20.197315 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m06:57:20.198513 [info ] [Thread-1 (]: 10 of 97 START sql table model main.fato_operacoes_clientes .................... [RUN]
[0m06:57:20.201381 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_movimentacao_cambio, now model.bacen_ifdata_analytics.fato_operacoes_clientes)
[0m06:57:20.202907 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m06:57:20.211233 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:57:20.213407 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m06:57:20.220552 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:57:20.223429 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:57:20.223429 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: BEGIN
[0m06:57:20.224555 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:20.225571 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.225571 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:57:20.227160 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp"
  
    as (
      

WITH operacoes AS (
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_portfolio_number_clients_operations"
    
    UNION ALL
    
    SELECT
        codigo,
        data_base,
        quantidade_de_clientes_com_operacoes_ativas as quantidade_clientes,
        quantidade_de_operacoes_ativas as quantidade_operacoes
    FROM "silver"."main"."financial_conglomerates_scr_portfolio_number_clients_operations"
)

SELECT
    
    md5(cast(cast(codigo as bigint) as varchar))
 as id_instituicao,
    
    strftime(try_cast(data_base as date), '%Y%m%d')::int
 as id_data,
    quantidade_clientes,
    quantidade_operacoes
FROM operacoes
    );
  
  
[0m06:57:20.263837 [debug] [Thread-1 (]: SQL status: OK in 0.036 seconds
[0m06:57:20.266881 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:57:20.267891 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */
alter table "gold_warehouse"."main"."fato_operacoes_clientes__dbt_tmp" rename to "fato_operacoes_clientes"
[0m06:57:20.268892 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.270401 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m06:57:20.271407 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:57:20.271407 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: COMMIT
[0m06:57:20.293011 [debug] [Thread-1 (]: SQL status: OK in 0.021 seconds
[0m06:57:20.295584 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_operacoes_clientes"
[0m06:57:20.296232 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_operacoes_clientes"} */

      drop table if exists "gold_warehouse"."main"."fato_operacoes_clientes__dbt_backup" cascade
    
[0m06:57:20.296232 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.297768 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_operacoes_clientes: Close
[0m06:57:20.297768 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD13B2F00>]}
[0m06:57:20.298804 [info ] [Thread-1 (]: 10 of 97 OK created sql table model main.fato_operacoes_clientes ............... [[32mOK[0m in 0.10s]
[0m06:57:20.299844 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_operacoes_clientes
[0m06:57:20.299844 [debug] [Thread-1 (]: Began running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m06:57:20.300379 [info ] [Thread-1 (]: 11 of 97 START sql table model main.fato_resumo_financeiro ..................... [RUN]
[0m06:57:20.300981 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_operacoes_clientes, now model.bacen_ifdata_analytics.fato_resumo_financeiro)
[0m06:57:20.300981 [debug] [Thread-1 (]: Began compiling node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m06:57:20.306130 [debug] [Thread-1 (]: Writing injected SQL for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:57:20.308163 [debug] [Thread-1 (]: Began executing node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m06:57:20.313560 [debug] [Thread-1 (]: Writing runtime sql for node "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:57:20.315287 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:57:20.315287 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: BEGIN
[0m06:57:20.315287 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:20.316829 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.316829 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:57:20.316829 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

  
    
    

    create  table
      "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp"
  
    as (
      

WITH dados_brutos AS (
    -- Conglomerados Prudenciais
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."prudential_conglomerates_summary"

    UNION ALL

    -- Conglomerados Financeiros
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."financial_conglomerates_summary"

    UNION ALL

    -- Instituições Independentes
    SELECT
        codigo,
        data_base,
        ativo_total,
        carteira_de_credito_classificada as carteira_credito,
        passivo_circulante_e_exigivel_a_longo_prazo as passivo_exigivel,
        captacoes,
        patrimonio_liquido,
        lucro_liquido,
        numero_de_agencias as quantidade_agencias,
        numero_de_postos_de_atendimento as quantidade_postos_atendimento,
        (lucro_liquido / NULLIF(patrimonio_liquido, 0)) as roe,
        (lucro_liquido / NULLIF(ativo_total, 0)) as roa
    FROM "silver"."main"."individual_institutions_summary"
)

SELECT
    
    md5(cast(cast(d.codigo as bigint) as varchar))
 as id_instituicao, -- FK para dim_instituicao
    
    strftime(try_cast(d.data_base as date), '%Y%m%d')::int
 as id_data,  -- FK para dim_tempo

    -- Métricas
    d.ativo_total,
    d.carteira_credito,
    d.passivo_exigivel,
    d.captacoes,
    d.patrimonio_liquido,
    d.lucro_liquido,
    d.quantidade_agencias,
    d.quantidade_postos_atendimento,
    d.roe,
    d.roa

FROM dados_brutos d
    );
  
  
[0m06:57:20.613576 [debug] [Thread-1 (]: SQL status: OK in 0.296 seconds
[0m06:57:20.616262 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:57:20.616262 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */
alter table "gold_warehouse"."main"."fato_resumo_financeiro__dbt_tmp" rename to "fato_resumo_financeiro"
[0m06:57:20.617584 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.618615 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m06:57:20.619281 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:57:20.619281 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: COMMIT
[0m06:57:20.782274 [debug] [Thread-1 (]: SQL status: OK in 0.163 seconds
[0m06:57:20.785332 [debug] [Thread-1 (]: Using duckdb connection "model.bacen_ifdata_analytics.fato_resumo_financeiro"
[0m06:57:20.785332 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "model.bacen_ifdata_analytics.fato_resumo_financeiro"} */

      drop table if exists "gold_warehouse"."main"."fato_resumo_financeiro__dbt_backup" cascade
    
[0m06:57:20.785332 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.786321 [debug] [Thread-1 (]: On model.bacen_ifdata_analytics.fato_resumo_financeiro: Close
[0m06:57:20.787336 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBEFE7E750>]}
[0m06:57:20.787866 [info ] [Thread-1 (]: 11 of 97 OK created sql table model main.fato_resumo_financeiro ................ [[32mOK[0m in 0.49s]
[0m06:57:20.787866 [debug] [Thread-1 (]: Finished running node model.bacen_ifdata_analytics.fato_resumo_financeiro
[0m06:57:20.787866 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m06:57:20.787866 [info ] [Thread-1 (]: 12 of 97 START seed file main.seed_dim_atividade ............................... [RUN]
[0m06:57:20.789780 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly model.bacen_ifdata_analytics.fato_resumo_financeiro, now seed.bacen_ifdata_analytics.seed_dim_atividade)
[0m06:57:20.789780 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m06:57:20.790327 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m06:57:20.808457 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m06:57:20.809564 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: BEGIN
[0m06:57:20.809564 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:20.810187 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.810187 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m06:57:20.810187 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_atividade"} */

    create table "gold_warehouse"."main"."seed_dim_atividade" ("id_atividade" integer,"nome_atividade" text,"prefixo_coluna" text)
  
[0m06:57:20.811200 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.819115 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m06:57:20.819115 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: 
          COPY "gold_warehouse"."main"."seed_dim_atividade" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_atividade.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:57:20.823340 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m06:57:20.827998 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m06:57:20.831245 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m06:57:20.832213 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_atividade"
[0m06:57:20.832721 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: COMMIT
[0m06:57:20.835723 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:20.835723 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_atividade: Close
[0m06:57:20.835723 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD129B950>]}
[0m06:57:20.837230 [info ] [Thread-1 (]: 12 of 97 OK loaded seed file main.seed_dim_atividade ........................... [[32mINSERT 10[0m in 0.05s]
[0m06:57:20.837884 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_atividade
[0m06:57:20.838463 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m06:57:20.838463 [info ] [Thread-1 (]: 13 of 97 START seed file main.seed_dim_classe_instituicao ...................... [RUN]
[0m06:57:20.839973 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_atividade, now seed.bacen_ifdata_analytics.seed_dim_classe_instituicao)
[0m06:57:20.839973 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m06:57:20.839973 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m06:57:20.844136 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m06:57:20.844136 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: BEGIN
[0m06:57:20.844664 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:20.844664 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.844664 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m06:57:20.845670 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"} */

    create table "gold_warehouse"."main"."seed_dim_classe_instituicao" ("codigo" integer,"descricao" text)
  
[0m06:57:20.845670 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.847707 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m06:57:20.848243 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: 
          COPY "gold_warehouse"."main"."seed_dim_classe_instituicao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_classe_instituicao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:57:20.848765 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.848765 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m06:57:20.851146 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m06:57:20.851146 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_classe_instituicao"
[0m06:57:20.851146 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: COMMIT
[0m06:57:20.854084 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.856845 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_classe_instituicao: Close
[0m06:57:20.858188 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD0D7AE40>]}
[0m06:57:20.858188 [info ] [Thread-1 (]: 13 of 97 OK loaded seed file main.seed_dim_classe_instituicao .................. [[32mINSERT 26[0m in 0.02s]
[0m06:57:20.858188 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_classe_instituicao
[0m06:57:20.858188 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m06:57:20.858188 [info ] [Thread-1 (]: 14 of 97 START seed file main.seed_dim_consolidado ............................. [RUN]
[0m06:57:20.860527 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_classe_instituicao, now seed.bacen_ifdata_analytics.seed_dim_consolidado)
[0m06:57:20.861540 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m06:57:20.863048 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m06:57:20.870255 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m06:57:20.871779 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: BEGIN
[0m06:57:20.872377 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:20.873386 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.873386 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m06:57:20.873386 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_consolidado"} */

    create table "gold_warehouse"."main"."seed_dim_consolidado" ("codigo" text,"descricao" text)
  
[0m06:57:20.874623 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.875226 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m06:57:20.875226 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: 
          COPY "gold_warehouse"."main"."seed_dim_consolidado" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_consolidado.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:57:20.877749 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.877749 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m06:57:20.879755 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m06:57:20.880277 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_consolidado"
[0m06:57:20.880277 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: COMMIT
[0m06:57:20.881864 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.881864 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_consolidado: Close
[0m06:57:20.882872 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD1223F20>]}
[0m06:57:20.882872 [info ] [Thread-1 (]: 14 of 97 OK loaded seed file main.seed_dim_consolidado ......................... [[32mINSERT 8[0m in 0.02s]
[0m06:57:20.883869 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_consolidado
[0m06:57:20.883869 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m06:57:20.884869 [info ] [Thread-1 (]: 15 of 97 START seed file main.seed_dim_controle ................................ [RUN]
[0m06:57:20.884869 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_consolidado, now seed.bacen_ifdata_analytics.seed_dim_controle)
[0m06:57:20.885516 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_controle
[0m06:57:20.885516 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_controle
[0m06:57:20.889920 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m06:57:20.889920 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: BEGIN
[0m06:57:20.889920 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:20.889920 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.889920 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m06:57:20.891556 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_controle"} */

    create table "gold_warehouse"."main"."seed_dim_controle" ("codigo" integer,"descricao" text)
  
[0m06:57:20.892181 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.892181 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m06:57:20.893188 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: 
          COPY "gold_warehouse"."main"."seed_dim_controle" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_controle.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:57:20.895591 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:20.896601 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m06:57:20.898609 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m06:57:20.898609 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_controle"
[0m06:57:20.898609 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: COMMIT
[0m06:57:20.900173 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.901475 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_controle: Close
[0m06:57:20.902484 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBEFE5BEC0>]}
[0m06:57:20.902989 [info ] [Thread-1 (]: 15 of 97 OK loaded seed file main.seed_dim_controle ............................ [[32mINSERT 3[0m in 0.02s]
[0m06:57:20.903998 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_controle
[0m06:57:20.904504 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m06:57:20.904504 [info ] [Thread-1 (]: 16 of 97 START seed file main.seed_dim_faixa_vencimento ........................ [RUN]
[0m06:57:20.905510 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_controle, now seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento)
[0m06:57:20.906017 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m06:57:20.906017 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m06:57:20.910227 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m06:57:20.911263 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: BEGIN
[0m06:57:20.911263 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:20.912231 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.912231 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m06:57:20.912231 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"} */

    create table "gold_warehouse"."main"."seed_dim_faixa_vencimento" ("id_faixa" integer,"nome_faixa" text,"ordem" integer,"sufixo_coluna" text)
  
[0m06:57:20.913268 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.913823 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m06:57:20.913823 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: 
          COPY "gold_warehouse"."main"."seed_dim_faixa_vencimento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_faixa_vencimento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:57:20.916883 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:20.917930 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m06:57:20.920470 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m06:57:20.921051 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento"
[0m06:57:20.921051 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: COMMIT
[0m06:57:20.922289 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.922289 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento: Close
[0m06:57:20.922289 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD13CD850>]}
[0m06:57:20.923859 [info ] [Thread-1 (]: 16 of 97 OK loaded seed file main.seed_dim_faixa_vencimento .................... [[32mINSERT 7[0m in 0.02s]
[0m06:57:20.924875 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento
[0m06:57:20.925379 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m06:57:20.925379 [info ] [Thread-1 (]: 17 of 97 START seed file main.seed_dim_porte ................................... [RUN]
[0m06:57:20.925379 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_faixa_vencimento, now seed.bacen_ifdata_analytics.seed_dim_porte)
[0m06:57:20.926948 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_porte
[0m06:57:20.926948 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_porte
[0m06:57:20.930014 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m06:57:20.930014 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: BEGIN
[0m06:57:20.931021 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:20.931021 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.931021 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m06:57:20.932021 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_porte"} */

    create table "gold_warehouse"."main"."seed_dim_porte" ("id_porte" integer,"nome_porte" text,"coluna" text)
  
[0m06:57:20.932526 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.933537 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m06:57:20.933537 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: 
          COPY "gold_warehouse"."main"."seed_dim_porte" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_porte.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:57:20.935534 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.936533 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m06:57:20.938710 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m06:57:20.938710 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_porte"
[0m06:57:20.939235 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: COMMIT
[0m06:57:20.939839 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.939839 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_porte: Close
[0m06:57:20.941378 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD13CFEF0>]}
[0m06:57:20.941378 [info ] [Thread-1 (]: 17 of 97 OK loaded seed file main.seed_dim_porte ............................... [[32mINSERT 6[0m in 0.01s]
[0m06:57:20.941958 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_porte
[0m06:57:20.941958 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m06:57:20.942962 [info ] [Thread-1 (]: 18 of 97 START seed file main.seed_dim_produto_credito ......................... [RUN]
[0m06:57:20.943963 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_porte, now seed.bacen_ifdata_analytics.seed_dim_produto_credito)
[0m06:57:20.943963 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m06:57:20.943963 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m06:57:20.945929 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m06:57:20.947875 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: BEGIN
[0m06:57:20.947875 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:20.948400 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.948929 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m06:57:20.948929 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_produto_credito"} */

    create table "gold_warehouse"."main"."seed_dim_produto_credito" ("id_produto" integer,"nome_produto" text,"tipo_pessoa" text,"prefixo_coluna" text)
  
[0m06:57:20.949972 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.951284 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m06:57:20.951284 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: 
          COPY "gold_warehouse"."main"."seed_dim_produto_credito" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_produto_credito.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:57:20.952908 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:20.954504 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m06:57:20.956562 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m06:57:20.956562 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_produto_credito"
[0m06:57:20.957569 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: COMMIT
[0m06:57:20.958648 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.960160 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_produto_credito: Close
[0m06:57:20.960160 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD13A6630>]}
[0m06:57:20.961165 [info ] [Thread-1 (]: 18 of 97 OK loaded seed file main.seed_dim_produto_credito ..................... [[32mINSERT 14[0m in 0.02s]
[0m06:57:20.961165 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_produto_credito
[0m06:57:20.962168 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m06:57:20.962673 [info ] [Thread-1 (]: 19 of 97 START seed file main.seed_dim_regiao .................................. [RUN]
[0m06:57:20.963711 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_produto_credito, now seed.bacen_ifdata_analytics.seed_dim_regiao)
[0m06:57:20.964334 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m06:57:20.964853 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m06:57:20.969165 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m06:57:20.970164 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: BEGIN
[0m06:57:20.970164 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:20.971174 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.971174 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m06:57:20.971730 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_regiao"} */

    create table "gold_warehouse"."main"."seed_dim_regiao" ("id_regiao" integer,"nome_regiao" text,"coluna" text)
  
[0m06:57:20.972268 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.972268 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m06:57:20.972268 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: 
          COPY "gold_warehouse"."main"."seed_dim_regiao" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_regiao.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:57:20.974385 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.975416 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m06:57:20.977031 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m06:57:20.977031 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_regiao"
[0m06:57:20.977031 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: COMMIT
[0m06:57:20.978585 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.980105 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_regiao: Close
[0m06:57:20.980105 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD129D850>]}
[0m06:57:20.981114 [info ] [Thread-1 (]: 19 of 97 OK loaded seed file main.seed_dim_regiao .............................. [[32mINSERT 7[0m in 0.02s]
[0m06:57:20.981114 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_regiao
[0m06:57:20.981114 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m06:57:20.982113 [info ] [Thread-1 (]: 20 of 97 START seed file main.seed_dim_risco ................................... [RUN]
[0m06:57:20.982113 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_regiao, now seed.bacen_ifdata_analytics.seed_dim_risco)
[0m06:57:20.982113 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_risco
[0m06:57:20.983306 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_risco
[0m06:57:20.987305 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m06:57:20.987811 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: BEGIN
[0m06:57:20.987811 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:20.987811 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.988818 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m06:57:20.988818 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_risco"} */

    create table "gold_warehouse"."main"."seed_dim_risco" ("id_risco" integer,"nome_risco" text,"coluna" text)
  
[0m06:57:20.989323 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:20.989948 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m06:57:20.989948 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: 
          COPY "gold_warehouse"."main"."seed_dim_risco" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_risco.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:57:20.992126 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:20.993132 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m06:57:20.994638 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m06:57:20.994638 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_risco"
[0m06:57:20.994638 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: COMMIT
[0m06:57:20.996153 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:20.996153 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_risco: Close
[0m06:57:20.996153 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD137BBF0>]}
[0m06:57:20.997657 [info ] [Thread-1 (]: 20 of 97 OK loaded seed file main.seed_dim_risco ............................... [[32mINSERT 10[0m in 0.01s]
[0m06:57:20.997657 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_risco
[0m06:57:20.998662 [debug] [Thread-1 (]: Began running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m06:57:20.998662 [info ] [Thread-1 (]: 21 of 97 START seed file main.seed_dim_segmento ................................ [RUN]
[0m06:57:20.998662 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_risco, now seed.bacen_ifdata_analytics.seed_dim_segmento)
[0m06:57:21.000211 [debug] [Thread-1 (]: Began compiling node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m06:57:21.000211 [debug] [Thread-1 (]: Began executing node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m06:57:21.002925 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m06:57:21.002925 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: BEGIN
[0m06:57:21.004557 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.005571 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:21.007022 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m06:57:21.007696 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "seed.bacen_ifdata_analytics.seed_dim_segmento"} */

    create table "gold_warehouse"."main"."seed_dim_segmento" ("codigo" text,"descricao" text)
  
[0m06:57:21.009920 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.012863 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m06:57:21.014054 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: 
          COPY "gold_warehouse"."main"."seed_dim_segmento" FROM 'C:\WorkspaceHub\SourceHub\bacen-ifdata-scraper\src\bacen_ifdata\data_analytics\seeds\seed_dim_segmento.csv' (FORMAT CSV, HEADER TRUE, DELIMITER ',')
        ...
[0m06:57:21.017956 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:21.018957 [debug] [Thread-1 (]: Writing runtime SQL for node "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m06:57:21.027201 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m06:57:21.028393 [debug] [Thread-1 (]: Using duckdb connection "seed.bacen_ifdata_analytics.seed_dim_segmento"
[0m06:57:21.028991 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: COMMIT
[0m06:57:21.031302 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:21.033009 [debug] [Thread-1 (]: On seed.bacen_ifdata_analytics.seed_dim_segmento: Close
[0m06:57:21.033625 [debug] [Thread-1 (]: Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '9d596606-5b5a-4aa5-8117-3bdb6008cd9b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000001FBD1366DB0>]}
[0m06:57:21.034739 [info ] [Thread-1 (]: 21 of 97 OK loaded seed file main.seed_dim_segmento ............................ [[32mINSERT 5[0m in 0.03s]
[0m06:57:21.036415 [debug] [Thread-1 (]: Finished running node seed.bacen_ifdata_analytics.seed_dim_segmento
[0m06:57:21.037541 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m06:57:21.038151 [info ] [Thread-1 (]: 22 of 97 START test not_null_dim_instituicao_id_instituicao .................... [RUN]
[0m06:57:21.039319 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly seed.bacen_ifdata_analytics.seed_dim_segmento, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed)
[0m06:57:21.041252 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m06:57:21.057877 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m06:57:21.058613 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m06:57:21.072324 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m06:57:21.074451 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m06:57:21.074451 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: BEGIN
[0m06:57:21.074451 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.075480 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.075480 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"
[0m06:57:21.075480 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:57:21.077099 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.078123 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: ROLLBACK
[0m06:57:21.080195 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed'
[0m06:57:21.080195 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed: Close
[0m06:57:21.080195 [info ] [Thread-1 (]: 22 of 97 PASS not_null_dim_instituicao_id_instituicao .......................... [[32mPASS[0m in 0.04s]
[0m06:57:21.081198 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed
[0m06:57:21.081198 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m06:57:21.082202 [info ] [Thread-1 (]: 23 of 97 START test not_null_dim_instituicao_id_localizacao .................... [RUN]
[0m06:57:21.082712 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_instituicao.e7ffecebed, now test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957)
[0m06:57:21.082712 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m06:57:21.085728 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m06:57:21.088000 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m06:57:21.092066 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m06:57:21.093818 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m06:57:21.094911 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: BEGIN
[0m06:57:21.095449 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.096536 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.097078 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"
[0m06:57:21.097617 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_instituicao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m06:57:21.098741 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.100408 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: ROLLBACK
[0m06:57:21.101569 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957'
[0m06:57:21.102122 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957: Close
[0m06:57:21.102730 [info ] [Thread-1 (]: 23 of 97 PASS not_null_dim_instituicao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m06:57:21.103988 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957
[0m06:57:21.104522 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m06:57:21.105107 [info ] [Thread-1 (]: 24 of 97 START test unique_dim_instituicao_id_instituicao ...................... [RUN]
[0m06:57:21.105625 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_instituicao_id_localizacao.1d4024c957, now test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37)
[0m06:57:21.106256 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m06:57:21.111135 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m06:57:21.112718 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m06:57:21.114851 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m06:57:21.116424 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m06:57:21.116965 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: BEGIN
[0m06:57:21.117474 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.118116 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.118647 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"
[0m06:57:21.119220 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_instituicao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_instituicao"
where id_instituicao is not null
group by id_instituicao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m06:57:21.121514 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:21.123194 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: ROLLBACK
[0m06:57:21.124271 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37'
[0m06:57:21.124822 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37: Close
[0m06:57:21.125360 [info ] [Thread-1 (]: 24 of 97 PASS unique_dim_instituicao_id_instituicao ............................ [[32mPASS[0m in 0.02s]
[0m06:57:21.126364 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37
[0m06:57:21.126868 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m06:57:21.126868 [info ] [Thread-1 (]: 25 of 97 START test not_null_dim_localizacao_id_localizacao .................... [RUN]
[0m06:57:21.127872 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_instituicao_id_instituicao.8d88b5eb37, now test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd)
[0m06:57:21.127872 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m06:57:21.131883 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m06:57:21.133891 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m06:57:21.135892 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m06:57:21.137399 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m06:57:21.138410 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: BEGIN
[0m06:57:21.138410 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.139413 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.139413 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"
[0m06:57:21.140412 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_localizacao
from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is null



  
  
      
    ) dbt_internal_test
[0m06:57:21.141407 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.142915 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: ROLLBACK
[0m06:57:21.144966 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd'
[0m06:57:21.144966 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd: Close
[0m06:57:21.146007 [info ] [Thread-1 (]: 25 of 97 PASS not_null_dim_localizacao_id_localizacao .......................... [[32mPASS[0m in 0.02s]
[0m06:57:21.146924 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd
[0m06:57:21.147920 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m06:57:21.148917 [info ] [Thread-1 (]: 26 of 97 START test relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [RUN]
[0m06:57:21.149922 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_localizacao_id_localizacao.b7b72d01cd, now test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42)
[0m06:57:21.149922 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m06:57:21.156020 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m06:57:21.158060 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m06:57:21.161021 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m06:57:21.162025 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m06:57:21.162025 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: BEGIN
[0m06:57:21.163535 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.163535 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.164542 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"
[0m06:57:21.164542 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_localizacao as from_field
    from "gold_warehouse"."main"."dim_instituicao"
    where id_localizacao is not null
),

parent as (
    select id_localizacao as to_field
    from "gold_warehouse"."main"."dim_localizacao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:57:21.167543 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:21.169544 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: ROLLBACK
[0m06:57:21.171542 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42'
[0m06:57:21.171542 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42: Close
[0m06:57:21.172541 [info ] [Thread-1 (]: 26 of 97 PASS relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_  [[32mPASS[0m in 0.02s]
[0m06:57:21.174051 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42
[0m06:57:21.174051 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m06:57:21.175063 [info ] [Thread-1 (]: 27 of 97 START test unique_dim_localizacao_id_localizacao ...................... [RUN]
[0m06:57:21.176062 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_dim_instituicao_id_localizacao__id_localizacao__ref_dim_localizacao_.f94399be42, now test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb)
[0m06:57:21.176062 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m06:57:21.183068 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m06:57:21.184576 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m06:57:21.187584 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m06:57:21.189584 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m06:57:21.189584 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: BEGIN
[0m06:57:21.190583 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.190583 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.191583 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"
[0m06:57:21.191583 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_localizacao as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_localizacao"
where id_localizacao is not null
group by id_localizacao
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m06:57:21.193584 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:21.196104 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: ROLLBACK
[0m06:57:21.198104 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb'
[0m06:57:21.198104 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb: Close
[0m06:57:21.199103 [info ] [Thread-1 (]: 27 of 97 PASS unique_dim_localizacao_id_localizacao ............................ [[32mPASS[0m in 0.02s]
[0m06:57:21.200100 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb
[0m06:57:21.200100 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m06:57:21.201100 [info ] [Thread-1 (]: 28 of 97 START test not_null_dim_tempo_id_data ................................. [RUN]
[0m06:57:21.202104 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_localizacao_id_localizacao.7ffdbf30fb, now test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40)
[0m06:57:21.202104 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m06:57:21.207623 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m06:57:21.209629 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m06:57:21.211624 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m06:57:21.212624 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m06:57:21.213623 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: BEGIN
[0m06:57:21.214623 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.214623 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.216132 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"
[0m06:57:21.216132 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."dim_tempo"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:57:21.217143 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.218140 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: ROLLBACK
[0m06:57:21.219141 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40'
[0m06:57:21.220141 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40: Close
[0m06:57:21.221140 [info ] [Thread-1 (]: 28 of 97 PASS not_null_dim_tempo_id_data ....................................... [[32mPASS[0m in 0.02s]
[0m06:57:21.222141 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40
[0m06:57:21.222141 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m06:57:21.223140 [info ] [Thread-1 (]: 29 of 97 START test unique_dim_tempo_id_data ................................... [RUN]
[0m06:57:21.224140 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_dim_tempo_id_data.a5b84d4e40, now test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e)
[0m06:57:21.224140 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m06:57:21.228265 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m06:57:21.230410 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m06:57:21.231972 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m06:57:21.232985 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m06:57:21.232985 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: BEGIN
[0m06:57:21.233983 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.233983 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.234983 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"
[0m06:57:21.234983 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

select
    id_data as unique_field,
    count(*) as n_records

from "gold_warehouse"."main"."dim_tempo"
where id_data is not null
group by id_data
having count(*) > 1



  
  
      
    ) dbt_internal_test
[0m06:57:21.237484 [debug] [Thread-1 (]: SQL status: OK in 0.002 seconds
[0m06:57:21.238489 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: ROLLBACK
[0m06:57:21.239999 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e'
[0m06:57:21.239999 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e: Close
[0m06:57:21.239999 [info ] [Thread-1 (]: 29 of 97 PASS unique_dim_tempo_id_data ......................................... [[32mPASS[0m in 0.02s]
[0m06:57:21.241502 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e
[0m06:57:21.241502 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m06:57:21.242032 [info ] [Thread-1 (]: 30 of 97 START test not_null_fato_balanco_patrimonial_id_data .................. [RUN]
[0m06:57:21.243039 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.unique_dim_tempo_id_data.1a1f165e3e, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6)
[0m06:57:21.243039 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m06:57:21.247068 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m06:57:21.248164 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m06:57:21.251053 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m06:57:21.252677 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m06:57:21.253226 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: BEGIN
[0m06:57:21.253763 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.254806 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.255351 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"
[0m06:57:21.255882 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:57:21.257580 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.259271 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: ROLLBACK
[0m06:57:21.260831 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6'
[0m06:57:21.260831 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6: Close
[0m06:57:21.261471 [info ] [Thread-1 (]: 30 of 97 PASS not_null_fato_balanco_patrimonial_id_data ........................ [[32mPASS[0m in 0.02s]
[0m06:57:21.261975 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6
[0m06:57:21.262487 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m06:57:21.263096 [info ] [Thread-1 (]: 31 of 97 START test not_null_fato_balanco_patrimonial_id_instituicao ........... [RUN]
[0m06:57:21.264150 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_data.4df3b968e6, now test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939)
[0m06:57:21.264667 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m06:57:21.267493 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m06:57:21.268572 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m06:57:21.272639 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m06:57:21.274797 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m06:57:21.275340 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: BEGIN
[0m06:57:21.275340 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.275340 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:21.275340 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"
[0m06:57:21.275340 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_balanco_patrimonial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:57:21.276915 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:21.277921 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: ROLLBACK
[0m06:57:21.279485 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939'
[0m06:57:21.280034 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939: Close
[0m06:57:21.280034 [info ] [Thread-1 (]: 31 of 97 PASS not_null_fato_balanco_patrimonial_id_instituicao ................. [[32mPASS[0m in 0.02s]
[0m06:57:21.280642 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939
[0m06:57:21.281184 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m06:57:21.281184 [info ] [Thread-1 (]: 32 of 97 START test relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m06:57:21.281720 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_balanco_patrimonial_id_instituicao.1179884939, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25)
[0m06:57:21.282292 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m06:57:21.362643 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m06:57:21.363672 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m06:57:21.366170 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m06:57:21.367695 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m06:57:21.367695 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: BEGIN
[0m06:57:21.367695 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.368701 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.368701 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"
[0m06:57:21.368701 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_data as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_data is not null
),

parent as (
    select id_data as to_field
    from "gold_warehouse"."main"."dim_tempo"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:57:21.372845 [debug] [Thread-1 (]: SQL status: OK in 0.003 seconds
[0m06:57:21.373858 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: ROLLBACK
[0m06:57:21.376368 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25'
[0m06:57:21.376896 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25: Close
[0m06:57:21.377478 [info ] [Thread-1 (]: 32 of 97 PASS relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_  [[32mPASS[0m in 0.10s]
[0m06:57:21.378048 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25
[0m06:57:21.378048 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m06:57:21.378590 [info ] [Thread-1 (]: 33 of 97 START test relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [RUN]
[0m06:57:21.379136 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_data__id_data__ref_dim_tempo_.cddce82a25, now test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01)
[0m06:57:21.379136 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m06:57:21.384076 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m06:57:21.385156 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m06:57:21.387350 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m06:57:21.388053 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m06:57:21.388053 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: BEGIN
[0m06:57:21.389594 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.390620 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.390620 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"
[0m06:57:21.391605 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test
[0m06:57:21.400867 [debug] [Thread-1 (]: SQL status: OK in 0.009 seconds
[0m06:57:21.401390 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: ROLLBACK
[0m06:57:21.402950 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01'
[0m06:57:21.402950 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01: Close
[0m06:57:21.402950 [info ] [Thread-1 (]: 33 of 97 PASS relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_  [[32mPASS[0m in 0.02s]
[0m06:57:21.404474 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01
[0m06:57:21.404474 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m06:57:21.404474 [info ] [Thread-1 (]: 34 of 97 START test not_null_fato_capital_prudencial_id_data ................... [RUN]
[0m06:57:21.405519 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.relationships_fato_balanco_patrimonial_id_instituicao__id_instituicao__ref_dim_instituicao_.f2884dbc01, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3)
[0m06:57:21.405519 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m06:57:21.408613 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m06:57:21.410123 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m06:57:21.412301 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m06:57:21.412301 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m06:57:21.412301 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: BEGIN
[0m06:57:21.414069 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.414069 [debug] [Thread-1 (]: SQL status: OK in 0.000 seconds
[0m06:57:21.414069 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"
[0m06:57:21.415076 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_data
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_data is null



  
  
      
    ) dbt_internal_test
[0m06:57:21.416830 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.418590 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: ROLLBACK
[0m06:57:21.419681 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3'
[0m06:57:21.420218 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3: Close
[0m06:57:21.420805 [info ] [Thread-1 (]: 34 of 97 PASS not_null_fato_capital_prudencial_id_data ......................... [[32mPASS[0m in 0.02s]
[0m06:57:21.422414 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3
[0m06:57:21.422966 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m06:57:21.424025 [info ] [Thread-1 (]: 35 of 97 START test not_null_fato_capital_prudencial_id_instituicao ............ [RUN]
[0m06:57:21.424563 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_data.c005db50b3, now test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55)
[0m06:57:21.425708 [debug] [Thread-1 (]: Began compiling node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m06:57:21.431247 [debug] [Thread-1 (]: Writing injected SQL for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m06:57:21.432764 [debug] [Thread-1 (]: Began executing node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m06:57:21.435773 [debug] [Thread-1 (]: Writing runtime sql for node "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m06:57:21.437328 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m06:57:21.437328 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: BEGIN
[0m06:57:21.437867 [debug] [Thread-1 (]: Opening a new connection, currently in state closed
[0m06:57:21.438517 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.438517 [debug] [Thread-1 (]: Using duckdb connection "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"
[0m06:57:21.438517 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: /* {"app": "dbt", "dbt_version": "1.11.5", "profile_name": "bacen_ifdata", "target_name": "dev", "node_id": "test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55"} */

    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    



select id_instituicao
from "gold_warehouse"."main"."fato_capital_prudencial"
where id_instituicao is null



  
  
      
    ) dbt_internal_test
[0m06:57:21.440028 [debug] [Thread-1 (]: SQL status: OK in 0.001 seconds
[0m06:57:21.440028 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: ROLLBACK
[0m06:57:21.442295 [debug] [Thread-1 (]: Failed to rollback 'test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55'
[0m06:57:21.442919 [debug] [Thread-1 (]: On test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55: Close
[0m06:57:21.442919 [info ] [Thread-1 (]: 35 of 97 PASS not_null_fato_capital_prudencial_id_instituicao .................. [[32mPASS[0m in 0.02s]
[0m06:57:21.444532 [debug] [Thread-1 (]: Finished running node test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55
[0m06:57:21.444532 [debug] [Thread-1 (]: Began running node test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391
[0m06:57:21.445544 [info ] [Thread-1 (]: 36 of 97 START test relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_  [RUN]
[0m06:57:21.446054 [debug] [Thread-1 (]: Re-using an available connection from the pool (formerly test.bacen_ifdata_analytics.not_null_fato_capital_prudencial_id_instituicao.7ed7e7db55, now test.bacen_ifdata_analytics.relationships_fato_capital_prudencial_id_data__id_data__ref_dim_tempo_.5faa199391)
